drm/i915: Update switch_mm() to take a request structure
authorJohn Harrison <John.C.Harrison@Intel.com>
Fri, 29 May 2015 16:43:56 +0000 (17:43 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 23 Jun 2015 12:02:21 +0000 (14:02 +0200)
Updated the switch_mm() code paths to take a request instead of a ring. This
includes the myriad *_mm_switch functions themselves and a bunch of PDP related
helper functions.

v2: Rebased to newer tree.

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_gem_context.c
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_gem_gtt.h

index a9dd7e9..a223c9d 100644 (file)
@@ -652,7 +652,7 @@ static int do_switch(struct drm_i915_gem_request *req)
                 * Register Immediate commands in Ring Buffer before submitting
                 * a context."*/
                trace_switch_mm(ring, to);
-               ret = to->ppgtt->switch_mm(to->ppgtt, ring);
+               ret = to->ppgtt->switch_mm(to->ppgtt, req);
                if (ret)
                        goto unpin_out;
 
@@ -703,7 +703,7 @@ static int do_switch(struct drm_i915_gem_request *req)
         */
        if (needs_pd_load_post(ring, to, hw_flags)) {
                trace_switch_mm(ring, to);
-               ret = to->ppgtt->switch_mm(to->ppgtt, ring);
+               ret = to->ppgtt->switch_mm(to->ppgtt, req);
                /* The hardware context switch is emitted, but we haven't
                 * actually changed the state - so it's probably safe to bail
                 * here. Still, let the user know something dangerous has
Simple merge
Simple merge