]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/i915: don't set up gem ring functions on gen5 for !kms
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 11 Apr 2012 20:12:58 +0000 (22:12 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 13 Apr 2012 10:53:28 +0000 (12:53 +0200)
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>
drivers/gpu/drm/i915/intel_ringbuffer.c

index ac05c749104a81739e50cd2ad2b22a65c3de3d07..6b3ff37e752c4f15bb97a54cc2c8ee7553f0fdca 100644 (file)
@@ -1342,21 +1342,17 @@ int intel_render_ring_init_dri(struct drm_device *dev, u64 start, u32 size)
        if (INTEL_INFO(dev)->gen >= 6) {
                /* non-kms not supported on gen6+ */
                return -ENODEV;
-       } else if (IS_GEN5(dev)) {
-               ring->add_request = pc_render_add_request;
-               ring->flush = render_ring_flush;
-               ring->get_seqno = pc_render_get_seqno;
-               ring->irq_get = gen5_ring_get_irq;
-               ring->irq_put = gen5_ring_put_irq;
-               ring->irq_enable_mask = GT_USER_INTERRUPT | GT_PIPE_NOTIFY;
-       } else {
-               ring->add_request = i9xx_add_request;
-               ring->flush = render_ring_flush;
-               ring->get_seqno = ring_get_seqno;
-               ring->irq_get = i9xx_ring_get_irq;
-               ring->irq_put = i9xx_ring_put_irq;
-               ring->irq_enable_mask = I915_USER_INTERRUPT;
        }
+
+       /* Note: gem is not supported on gen5/ilk without kms (the corresponding
+        * gem_init ioctl returns with -ENODEV). Hence we do not need to set up
+        * the special gen5 functions. */
+       ring->add_request = i9xx_add_request;
+       ring->flush = render_ring_flush;
+       ring->get_seqno = ring_get_seqno;
+       ring->irq_get = i9xx_ring_get_irq;
+       ring->irq_put = i9xx_ring_put_irq;
+       ring->irq_enable_mask = I915_USER_INTERRUPT;
        ring->write_tail = ring_write_tail;
        if (INTEL_INFO(dev)->gen >= 4)
                ring->dispatch_execbuffer = i965_dispatch_execbuffer;