summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-10-12 16:10:47 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-10-12 16:10:47 +0200
commit540c64c378daafaad1c3f63faf5af81f39388665 (patch)
tree5a30f057b23b97a0d4a2b752eb6a544b907574e2
parent10150df02b7062b9975661ccd82b475cd23c8839 (diff)
Bugfixes.
-rw-r--r--linux-core/drm_agpsupport.c2
-rw-r--r--linux-core/drm_bo.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/linux-core/drm_agpsupport.c b/linux-core/drm_agpsupport.c
index 902b8947..d9fd9c92 100644
--- a/linux-core/drm_agpsupport.c
+++ b/linux-core/drm_agpsupport.c
@@ -559,7 +559,7 @@ int drm_agp_unbind_memory(DRM_AGP_MEM * handle)
*/
static int drm_agp_needs_unbind_cache_adjust(drm_ttm_backend_t *backend) {
- return ((backend->flags & DRM_BE_FLAG_BOUND_CACHED) ? 1 : 0);
+ return ((backend->flags & DRM_BE_FLAG_BOUND_CACHED) ? 0 : 1);
}
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c
index a84734ab..c24f8d57 100644
--- a/linux-core/drm_bo.c
+++ b/linux-core/drm_bo.c
@@ -1718,6 +1718,7 @@ int drm_mm_init_ioctl(DRM_IOCTL_ARGS)
atomic_set(&bm->count, 0);
bm->cur_pages = 0;
bm->max_pages = arg.req.max_locked_pages;
+ mutex_unlock(&dev->struct_mutex);
break;
case mm_takedown:
LOCK_TEST_WITH_RETURN(dev, filp);
@@ -1732,7 +1733,6 @@ int drm_mm_init_ioctl(DRM_IOCTL_ARGS)
return -EINVAL;
}
- mutex_unlock(&dev->struct_mutex);
if (ret)
return ret;