aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-10-19 05:13:00 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-10-20 05:51:51 -0400
commit87acb0a550694ff1a7725ea3a73b80d8ccf56180 (patch)
treeda29fd24edf57a01c69d094490da80ae3511cc48 /drivers/gpu/drm/i915/i915_dma.c
parent9af90d19f8a166694753b3f0558d3a8bcd66c0b5 (diff)
drm/i915: Simplify most HAS_BSD() checks
... by always initialising the empty ringbuffer it is always then safe to check whether it is active. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 35d121c70a1f..1ffeb1c5e7c4 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -132,8 +132,7 @@ static int i915_dma_cleanup(struct drm_device * dev)
132 132
133 mutex_lock(&dev->struct_mutex); 133 mutex_lock(&dev->struct_mutex);
134 intel_cleanup_ring_buffer(dev, &dev_priv->render_ring); 134 intel_cleanup_ring_buffer(dev, &dev_priv->render_ring);
135 if (HAS_BSD(dev)) 135 intel_cleanup_ring_buffer(dev, &dev_priv->bsd_ring);
136 intel_cleanup_ring_buffer(dev, &dev_priv->bsd_ring);
137 mutex_unlock(&dev->struct_mutex); 136 mutex_unlock(&dev->struct_mutex);
138 137
139 /* Clear the HWS virtual address at teardown */ 138 /* Clear the HWS virtual address at teardown */
@@ -1199,9 +1198,6 @@ static int i915_load_modeset_init(struct drm_device *dev,
1199 /* Basic memrange allocator for stolen space (aka mm.vram) */ 1198 /* Basic memrange allocator for stolen space (aka mm.vram) */
1200 drm_mm_init(&dev_priv->mm.vram, 0, prealloc_size); 1199 drm_mm_init(&dev_priv->mm.vram, 0, prealloc_size);
1201 1200
1202 /* We're off and running w/KMS */
1203 dev_priv->mm.suspended = 0;
1204
1205 /* Let GEM Manage from end of prealloc space to end of aperture. 1201 /* Let GEM Manage from end of prealloc space to end of aperture.
1206 * 1202 *
1207 * However, leave one page at the end still bound to the scratch page. 1203 * However, leave one page at the end still bound to the scratch page.
@@ -1271,6 +1267,10 @@ static int i915_load_modeset_init(struct drm_device *dev,
1271 goto cleanup_irq; 1267 goto cleanup_irq;
1272 1268
1273 drm_kms_helper_poll_init(dev); 1269 drm_kms_helper_poll_init(dev);
1270
1271 /* We're off and running w/KMS */
1272 dev_priv->mm.suspended = 0;
1273
1274 return 0; 1274 return 0;
1275 1275
1276cleanup_irq: 1276cleanup_irq: