* [PATCH] drm/i915: Noop lrc_init_wa_ctx() on recent/future platforms
@ 2022-09-07 23:08 Lucas De Marchi
2022-09-22 8:16 ` [Intel-gfx] " Balasubramani Vivekanandan
0 siblings, 1 reply; 2+ messages in thread
From: Lucas De Marchi @ 2022-09-07 23:08 UTC (permalink / raw)
To: intel-gfx; +Cc: Lucas De Marchi, dri-devel
Except for graphics version 8 and 9, nothing is done in
lrc_init_wa_ctx(). Assume this won't be needed on future platforms as
well and remove the warning.
Note that this function is not called for anything below version 8 since
those don't use either guc or execlist, i.e. HAS_EXECLISTS() is false.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
drivers/gpu/drm/i915/gt/intel_lrc.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 070cec4ff8a4..43fa7b3422c4 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -1695,24 +1695,16 @@ void lrc_init_wa_ctx(struct intel_engine_cs *engine)
unsigned int i;
int err;
- if (!(engine->flags & I915_ENGINE_HAS_RCS_REG_STATE))
+ if (GRAPHICS_VER(engine->i915) >= 11 ||
+ !(engine->flags & I915_ENGINE_HAS_RCS_REG_STATE))
return;
- switch (GRAPHICS_VER(engine->i915)) {
- case 12:
- case 11:
- return;
- case 9:
+ if (GRAPHICS_VER(engine->i915) == 9) {
wa_bb_fn[0] = gen9_init_indirectctx_bb;
wa_bb_fn[1] = NULL;
- break;
- case 8:
+ } else if (GRAPHICS_VER(engine->i915) == 8) {
wa_bb_fn[0] = gen8_init_indirectctx_bb;
wa_bb_fn[1] = NULL;
- break;
- default:
- MISSING_CASE(GRAPHICS_VER(engine->i915));
- return;
}
err = lrc_create_wa_ctx(engine);
--
2.37.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: Noop lrc_init_wa_ctx() on recent/future platforms
2022-09-07 23:08 [PATCH] drm/i915: Noop lrc_init_wa_ctx() on recent/future platforms Lucas De Marchi
@ 2022-09-22 8:16 ` Balasubramani Vivekanandan
0 siblings, 0 replies; 2+ messages in thread
From: Balasubramani Vivekanandan @ 2022-09-22 8:16 UTC (permalink / raw)
To: Lucas De Marchi, intel-gfx; +Cc: dri-devel
On 07.09.2022 16:08, Lucas De Marchi wrote:
> Except for graphics version 8 and 9, nothing is done in
> lrc_init_wa_ctx(). Assume this won't be needed on future platforms as
> well and remove the warning.
>
> Note that this function is not called for anything below version 8 since
> those don't use either guc or execlist, i.e. HAS_EXECLISTS() is false.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_lrc.c | 16 ++++------------
> 1 file changed, 4 insertions(+), 12 deletions(-)
Reviewed-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 070cec4ff8a4..43fa7b3422c4 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -1695,24 +1695,16 @@ void lrc_init_wa_ctx(struct intel_engine_cs *engine)
> unsigned int i;
> int err;
>
> - if (!(engine->flags & I915_ENGINE_HAS_RCS_REG_STATE))
> + if (GRAPHICS_VER(engine->i915) >= 11 ||
> + !(engine->flags & I915_ENGINE_HAS_RCS_REG_STATE))
> return;
>
> - switch (GRAPHICS_VER(engine->i915)) {
> - case 12:
> - case 11:
> - return;
> - case 9:
> + if (GRAPHICS_VER(engine->i915) == 9) {
> wa_bb_fn[0] = gen9_init_indirectctx_bb;
> wa_bb_fn[1] = NULL;
> - break;
> - case 8:
> + } else if (GRAPHICS_VER(engine->i915) == 8) {
> wa_bb_fn[0] = gen8_init_indirectctx_bb;
> wa_bb_fn[1] = NULL;
> - break;
> - default:
> - MISSING_CASE(GRAPHICS_VER(engine->i915));
> - return;
> }
>
> err = lrc_create_wa_ctx(engine);
> --
> 2.37.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-22 8:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07 23:08 [PATCH] drm/i915: Noop lrc_init_wa_ctx() on recent/future platforms Lucas De Marchi
2022-09-22 8:16 ` [Intel-gfx] " Balasubramani Vivekanandan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).