drm/i915: Update l3_remap to take a request structure
authorJohn Harrison <John.C.Harrison@Intel.com>
Fri, 29 May 2015 16:43:51 +0000 (17:43 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 23 Jun 2015 12:02:17 +0000 (14:02 +0200)
Converted i915_gem_l3_remap() to take a request structure instead of a ring.

For: VIZ-5115
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Tomas Elf <tomas.elf@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_context.c

index 74a437f0ae68556910499470e7567d79bbd69a31..5aea6ddd509153ad003042f859990ebd2f570631 100644 (file)
@@ -2885,7 +2885,7 @@ bool i915_gem_clflush_object(struct drm_i915_gem_object *obj, bool force);
 int __must_check i915_gem_init(struct drm_device *dev);
 int i915_gem_init_rings(struct drm_device *dev);
 int __must_check i915_gem_init_hw(struct drm_device *dev);
-int i915_gem_l3_remap(struct intel_engine_cs *ring, int slice);
+int i915_gem_l3_remap(struct drm_i915_gem_request *req, int slice);
 void i915_gem_init_swizzling(struct drm_device *dev);
 void i915_gem_cleanup_ringbuffer(struct drm_device *dev);
 int __must_check i915_gpu_idle(struct drm_device *dev);
index 19a24415191302e6e66c7e268db47ca8425957a1..79c4c328984db50f03d651f2e48098a7502b4c90 100644 (file)
@@ -4882,8 +4882,9 @@ err:
        return ret;
 }
 
-int i915_gem_l3_remap(struct intel_engine_cs *ring, int slice)
+int i915_gem_l3_remap(struct drm_i915_gem_request *req, int slice)
 {
+       struct intel_engine_cs *ring = req->ring;
        struct drm_device *dev = ring->dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
        u32 reg_base = GEN7_L3LOG_BASE + (slice * 0x200);
@@ -5105,7 +5106,7 @@ i915_gem_init_hw(struct drm_device *dev)
 
                if (ring->id == RCS) {
                        for (j = 0; j < NUM_L3_SLICES(dev); j++)
-                               i915_gem_l3_remap(ring, j);
+                               i915_gem_l3_remap(req, j);
                }
 
                ret = i915_ppgtt_init_ring(req);
index ea959abb8e2ce78482f13b6d4e05aaa16dd9bc78..8e52f3c58f61b35edeb45ddcb00c96057c134a60 100644 (file)
@@ -720,7 +720,7 @@ static int do_switch(struct drm_i915_gem_request *req)
                if (!(to->remap_slice & (1<<i)))
                        continue;
 
-               ret = i915_gem_l3_remap(ring, i);
+               ret = i915_gem_l3_remap(req, i);
                /* If it failed, try again next round */
                if (ret)
                        DRM_DEBUG_DRIVER("L3 remapping failed\n");