summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-08-14 09:14:14 +1000
committerDave Airlie <airlied@redhat.com>2008-08-14 09:14:14 +1000
commitb0ee12e6bb55655c92184483a065780529c8aa63 (patch)
tree36d76bada6e0572ea81b36e515b91690b2a113f3
parent18020e5e9647e218caf8f1566cdc053aac126f23 (diff)
radeon: use mm_enabled variable to denote memory manager running
-rw-r--r--linux-core/radeon_gem.c5
-rw-r--r--shared-core/radeon_drv.h2
-rw-r--r--shared-core/radeon_state.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/linux-core/radeon_gem.c b/linux-core/radeon_gem.c
index 058131e9..ebba3cfe 100644
--- a/linux-core/radeon_gem.c
+++ b/linux-core/radeon_gem.c
@@ -645,7 +645,7 @@ int radeon_gem_mm_init(struct drm_device *dev)
if (ret)
return -EINVAL;
-
+ dev_priv->mm_enabled = true;
return 0;
}
@@ -685,6 +685,9 @@ void radeon_gem_mm_fini(struct drm_device *dev)
}
mutex_unlock(&dev->struct_mutex);
+
+ drm_bo_driver_finish(dev);
+ dev_priv->mm_enabled = false;
}
int radeon_gem_object_pin(struct drm_gem_object *obj,
diff --git a/shared-core/radeon_drv.h b/shared-core/radeon_drv.h
index aa5b4ba8..df08b8d3 100644
--- a/shared-core/radeon_drv.h
+++ b/shared-core/radeon_drv.h
@@ -399,7 +399,7 @@ typedef struct drm_radeon_private {
int num_gb_pipes;
- int mm_disabled; /* on OSes with no MM this will be 1*/
+ bool mm_enabled;
struct radeon_mm_info mm;
drm_local_map_t *mmio;
diff --git a/shared-core/radeon_state.c b/shared-core/radeon_state.c
index 1a828be8..4520a35d 100644
--- a/shared-core/radeon_state.c
+++ b/shared-core/radeon_state.c
@@ -3125,7 +3125,7 @@ static int radeon_cp_getparam(struct drm_device *dev, void *data, struct drm_fil
value = 1;
break;
case RADEON_PARAM_KERNEL_MM:
- value = !dev_priv->mm_disabled;
+ value = dev_priv->mm_enabled;
break;
default:
DRM_DEBUG( "Invalid parameter %d\n", param->param );