drm/i915: Remove unneeded drm_device pointer from intel_ring_init_seqno()
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 7 Apr 2016 06:29:12 +0000 (07:29 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 Apr 2016 10:43:25 +0000 (11:43 +0100)
We only use drm_i915_private within the function, so delete the unneeded
drm_device local.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1460010558-10705-3-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_ringbuffer.c

index 2e864b7a528b06be3eb2c674ef1af4a8309c9bfc..371f4c1fc33cbd047431bf422f48ba6763007de0 100644 (file)
@@ -2550,13 +2550,12 @@ int intel_ring_cacheline_align(struct drm_i915_gem_request *req)
 
 void intel_ring_init_seqno(struct intel_engine_cs *engine, u32 seqno)
 {
-       struct drm_device *dev = engine->dev;
-       struct drm_i915_private *dev_priv = dev->dev_private;
+       struct drm_i915_private *dev_priv = to_i915(engine->dev);
 
-       if (INTEL_INFO(dev)->gen == 6 || INTEL_INFO(dev)->gen == 7) {
+       if (INTEL_INFO(dev_priv)->gen == 6 || INTEL_INFO(dev_priv)->gen == 7) {
                I915_WRITE(RING_SYNC_0(engine->mmio_base), 0);
                I915_WRITE(RING_SYNC_1(engine->mmio_base), 0);
-               if (HAS_VEBOX(dev))
+               if (HAS_VEBOX(dev_priv))
                        I915_WRITE(RING_SYNC_2(engine->mmio_base), 0);
        }