diff mbox series

[1/2] drm/i915/gt: Apply RCS workarounds to the render class

Message ID 20190705124325.14270-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/i915/gt: Apply RCS workarounds to the render class | expand

Commit Message

Chris Wilson July 5, 2019, 12:43 p.m. UTC
Treat all render engines to the RCS workarounds, simply to avoid using
engine->id when we are trying to think in terms of classes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_workarounds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Summers, Stuart July 8, 2019, 9:07 p.m. UTC | #1
On Fri, 2019-07-05 at 13:43 +0100, Chris Wilson wrote:
> Treat all render engines to the RCS workarounds, simply to avoid
> using
> engine->id when we are trying to think in terms of classes.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/gt/intel_workarounds.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> index d7da094170be..9e069286d3ce 100644
> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> @@ -1354,7 +1354,7 @@ engine_init_workarounds(struct intel_engine_cs
> *engine, struct i915_wa_list *wal
>  	if (I915_SELFTEST_ONLY(INTEL_GEN(engine->i915) < 8))
>  		return;
>  
> -	if (engine->id == RCS0)
> +	if (engine->class == RENDER_CLASS)

Makes sense.

Reviewed-by: Stuart Summers <stuart.summers@intel.com>

>  		rcs_engine_wa_init(engine, wal);
>  	else
>  		xcs_engine_wa_init(engine, wal);
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
index d7da094170be..9e069286d3ce 100644
--- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
+++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
@@ -1354,7 +1354,7 @@  engine_init_workarounds(struct intel_engine_cs *engine, struct i915_wa_list *wal
 	if (I915_SELFTEST_ONLY(INTEL_GEN(engine->i915) < 8))
 		return;
 
-	if (engine->id == RCS0)
+	if (engine->class == RENDER_CLASS)
 		rcs_engine_wa_init(engine, wal);
 	else
 		xcs_engine_wa_init(engine, wal);