Re: [PATCH 24/59] drm/i915: Update do_switch() to take a request structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19/03/2015 12:30, John.C.Harrison@xxxxxxxxx wrote:
From: John Harrison <John.C.Harrison@xxxxxxxxx>

Updated do_switch() to take a request pointer instead of a ring/context pair.

For: VIZ-5115
Signed-off-by: John Harrison <John.C.Harrison@xxxxxxxxx>

v2: Removed some overzealous req-> dereferencing.
---
  drivers/gpu/drm/i915/i915_gem_context.c |    7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 26d5816..78e9c9c 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -560,9 +560,10 @@ mi_set_context(struct intel_engine_cs *ring,
  	return ret;
  }

-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;
@@ -726,7 +727,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)


Reviewed-by: Tomas Elf <tomas.elf@xxxxxxxxx>

Thanks,
Tomas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux