diff mbox series

[v3,4/4] drm/i915/guc: Use the ce_to_guc() wrapper whenever possible

Message ID 20231206204644.105064-5-andi.shyti@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series Add gt_to_guc() helper | expand

Commit Message

Andi Shyti Dec. 6, 2023, 8:46 p.m. UTC
Get the guc reference from the ce using the ce_to_guc() helper.
Just a leftover from previous cleanups.

Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nirmoy Das Dec. 21, 2023, 12:18 p.m. UTC | #1
On 12/6/2023 9:46 PM, Andi Shyti wrote:
> Get the guc reference from the ce using the ce_to_guc() helper.
> Just a leftover from previous cleanups.
>
> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>   drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> index 4f51cc5f1604..3c7821ae9f0d 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -3513,7 +3513,7 @@ static inline void sub_context_inflight_prio(struct intel_context *ce,
>   
>   static inline void update_context_prio(struct intel_context *ce)
>   {
> -	struct intel_guc *guc = &ce->engine->gt->uc.guc;
> +	struct intel_guc *guc = ce_to_guc(ce);
>   	int i;
>   
>   	BUILD_BUG_ON(GUC_CLIENT_PRIORITY_KMD_HIGH != 0);
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index 4f51cc5f1604..3c7821ae9f0d 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -3513,7 +3513,7 @@  static inline void sub_context_inflight_prio(struct intel_context *ce,
 
 static inline void update_context_prio(struct intel_context *ce)
 {
-	struct intel_guc *guc = &ce->engine->gt->uc.guc;
+	struct intel_guc *guc = ce_to_guc(ce);
 	int i;
 
 	BUILD_BUG_ON(GUC_CLIENT_PRIORITY_KMD_HIGH != 0);