]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: Update do_switch() to take a request structure
authorJohn Harrison <John.C.Harrison@Intel.com>
Fri, 29 May 2015 16:43:42 +0000 (17:43 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 23 Jun 2015 12:02:10 +0000 (14:02 +0200)
Updated do_switch() to take a request pointer instead of a ring/context pair.

v2: Removed some overzealous req-> dereferencing.

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

index f8902bcc393976937cdb621f3dcdcfa8505d6a13..116c98394507b7b1cc9daa7f9b7a0d2e4a3c65e7 100644 (file)
@@ -614,9 +614,10 @@ needs_pd_load_post(struct intel_engine_cs *ring, struct intel_context *to,
        return false;
 }
 
-static int do_switch(struct intel_engine_cs *ring,
-                    struct intel_context *to)
+static int do_switch(struct drm_i915_gem_request *req)
 {
+       struct intel_context *to = req->ctx;
+       struct intel_engine_cs *ring = req->ring;
        struct drm_i915_private *dev_priv = ring->dev->dev_private;
        struct intel_context *from = ring->last_context;
        u32 hw_flags = 0;
@@ -804,7 +805,7 @@ int i915_switch_context(struct drm_i915_gem_request *req)
                return 0;
        }
 
-       return do_switch(req->ring, req->ctx);
+       return do_switch(req);
 }
 
 static bool contexts_enabled(struct drm_device *dev)