diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-11 16:12:58 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-13 06:53:28 -0400 |
commit | 28f0cbf71f5ed9b080878c04158c754b090a674a (patch) | |
tree | 6ffe2c4a81d59b5d064796e2059b20496832b766 /drivers/gpu/drm/i915/intel_ringbuffer.c | |
parent | 8620a3a908da34e1a0db9ad457136bc96340911f (diff) |
drm/i915: don't set up gem ring functions on gen5 for !kms
We already disallow initialition of gem in this case in the
corresponding ioctl, so don't bother setting up the gem support ring
functions in the legacy dri render ring init.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index ac05c749104a..6b3ff37e752c 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -1342,21 +1342,17 @@ int intel_render_ring_init_dri(struct drm_device *dev, u64 start, u32 size) | |||
1342 | if (INTEL_INFO(dev)->gen >= 6) { | 1342 | if (INTEL_INFO(dev)->gen >= 6) { |
1343 | /* non-kms not supported on gen6+ */ | 1343 | /* non-kms not supported on gen6+ */ |
1344 | return -ENODEV; | 1344 | return -ENODEV; |
1345 | } else if (IS_GEN5(dev)) { | ||
1346 | ring->add_request = pc_render_add_request; | ||
1347 | ring->flush = render_ring_flush; | ||
1348 | ring->get_seqno = pc_render_get_seqno; | ||
1349 | ring->irq_get = gen5_ring_get_irq; | ||
1350 | ring->irq_put = gen5_ring_put_irq; | ||
1351 | ring->irq_enable_mask = GT_USER_INTERRUPT | GT_PIPE_NOTIFY; | ||
1352 | } else { | ||
1353 | ring->add_request = i9xx_add_request; | ||
1354 | ring->flush = render_ring_flush; | ||
1355 | ring->get_seqno = ring_get_seqno; | ||
1356 | ring->irq_get = i9xx_ring_get_irq; | ||
1357 | ring->irq_put = i9xx_ring_put_irq; | ||
1358 | ring->irq_enable_mask = I915_USER_INTERRUPT; | ||
1359 | } | 1345 | } |
1346 | |||
1347 | /* Note: gem is not supported on gen5/ilk without kms (the corresponding | ||
1348 | * gem_init ioctl returns with -ENODEV). Hence we do not need to set up | ||
1349 | * the special gen5 functions. */ | ||
1350 | ring->add_request = i9xx_add_request; | ||
1351 | ring->flush = render_ring_flush; | ||
1352 | ring->get_seqno = ring_get_seqno; | ||
1353 | ring->irq_get = i9xx_ring_get_irq; | ||
1354 | ring->irq_put = i9xx_ring_put_irq; | ||
1355 | ring->irq_enable_mask = I915_USER_INTERRUPT; | ||
1360 | ring->write_tail = ring_write_tail; | 1356 | ring->write_tail = ring_write_tail; |
1361 | if (INTEL_INFO(dev)->gen >= 4) | 1357 | if (INTEL_INFO(dev)->gen >= 4) |
1362 | ring->dispatch_execbuffer = i965_dispatch_execbuffer; | 1358 | ring->dispatch_execbuffer = i965_dispatch_execbuffer; |