diff mbox series

[1/3] drm/i915/gt: Consider multi-gt instead of to_gt()

Message ID 20230419060036.3422635-2-tejas.upadhyay@intel.com (mailing list archive)
State New, archived
Headers show
Series Consider multi-gt instead of to_gt() | expand

Commit Message

Upadhyay, Tejas April 19, 2023, 6 a.m. UTC
In order to enable complete multi-GT, use the GT
reference obtained directly from the engine, rather
than relying on the to_gt(), which only provides a
reference to the primary GT.

Problem appear when it runs on platform like MTL
where different set of engines are possible on
different GTs.

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

Comments

Andi Shyti April 19, 2023, 8:17 a.m. UTC | #1
Hi Tejas,

On Wed, Apr 19, 2023 at 11:30:34AM +0530, Tejas Upadhyay wrote:
> In order to enable complete multi-GT, use the GT
> reference obtained directly from the engine, rather
> than relying on the to_gt(), which only provides a
> reference to the primary GT.
> 
> Problem appear when it runs on platform like MTL
> where different set of engines are possible on
> different GTs.
> 
> Cc: Andi Shyti <andi.shyti@linux.intel.com>
> Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>

Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> 

Thanks,
Andi
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_engine_user.c b/drivers/gpu/drm/i915/gt/intel_engine_user.c
index cd4f1b126f75..dcedff41a825 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_user.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_user.c
@@ -117,7 +117,7 @@  static void set_scheduler_caps(struct drm_i915_private *i915)
 			disabled |= (I915_SCHEDULER_CAP_ENABLED |
 				     I915_SCHEDULER_CAP_PRIORITY);
 
-		if (intel_uc_uses_guc_submission(&to_gt(i915)->uc))
+		if (intel_uc_uses_guc_submission(&engine->gt->uc))
 			enabled |= I915_SCHEDULER_CAP_STATIC_PRIORITY_MAP;
 
 		for (i = 0; i < ARRAY_SIZE(map); i++) {