All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: <John.C.Harrison@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>,
	Intel-GFX@lists.freedesktop.org, DRI-Devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 4/4] drm/i915/mtl: Add module parameter override for Wa_16019325821/Wa_14019159160
Date: Thu, 2 Nov 2023 16:55:45 -0400	[thread overview]
Message-ID: <ZUQM0aBad0YKK9SL@intel.com> (raw)
In-Reply-To: <20231027211814.2696398-5-John.C.Harrison@Intel.com>

On Fri, Oct 27, 2023 at 02:18:14PM -0700, John.C.Harrison@Intel.com wrote:
> From: John Harrison <John.C.Harrison@Intel.com>
> 
> These w/a's can have signficant performance implications for any
> workload which uses both RCS and CCS. On the other hand, the hang
> itself is only seen in one or two very specific workloads. So add a
> module parameter to control whether the w/a's are enabled or not and
> default to not.

No, we are not adding a module parameter for a hardware workaround.

we need data to decide what's the impact and decide if we will live
the workaround enabled or disabled and we are not allowing toggle.

we also need to push back on hardware teams to continue pursuing
better and more feasible workaround.

or we need to disable the feature itself. But no module parameter
for hardware workarounds.

> 
> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_guc.c            | 3 ++-
>  drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c        | 3 ++-
>  drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 3 ++-
>  drivers/gpu/drm/i915/i915_params.c                | 3 +++
>  drivers/gpu/drm/i915/i915_params.h                | 1 +
>  5 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> index 6252f32d67011..4c89983b1e907 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> @@ -296,7 +296,8 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
>  
>  	/* Wa_16019325821 */
>  	/* Wa_14019159160 */
> -	if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)))
> +	if (gt->i915->params.enable_mtl_rcs_ccs_wa &&
> +	    IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)))
>  		flags |= GUC_WA_RCS_CCS_SWITCHOUT;
>  
>  	/*
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
> index 8f7298cbbc322..78757e78bce88 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
> @@ -845,7 +845,8 @@ static void guc_waklv_init(struct intel_guc *guc)
>  	remain = guc_ads_waklv_size(guc);
>  
>  	/* Wa_14019159160 */
> -	if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71))) {
> +	if (gt->i915->params.enable_mtl_rcs_ccs_wa &&
> +	    IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71))) {
>  		size = guc_waklv_ra_mode(guc, offset, remain);
>  		offset += size;
>  		remain -= size;
> 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 225812b299524..4de54a100c451 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -4384,7 +4384,8 @@ static void guc_default_vfuncs(struct intel_engine_cs *engine)
>  
>  	/* Wa_16019325821 */
>  	/* Wa_14019159160 */
> -	if ((engine->class == COMPUTE_CLASS || engine->class == RENDER_CLASS) &&
> +	if (engine->i915->params.enable_mtl_rcs_ccs_wa &&
> +	    (engine->class == COMPUTE_CLASS || engine->class == RENDER_CLASS) &&
>  	    IS_GFX_GT_IP_RANGE(engine->gt, IP_VER(12, 70), IP_VER(12, 71)))
>  		engine->flags |= I915_ENGINE_USES_WA_HOLD_SWITCHOUT;
>  
> diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> index de43048543e8b..1004171d99943 100644
> --- a/drivers/gpu/drm/i915/i915_params.c
> +++ b/drivers/gpu/drm/i915/i915_params.c
> @@ -134,6 +134,9 @@ i915_param_named_unsafe(lmem_size, uint, 0400,
>  i915_param_named_unsafe(lmem_bar_size, uint, 0400,
>  			"Set the lmem bar size(in MiB).");
>  
> +i915_param_named(enable_mtl_rcs_ccs_wa, bool, 0400,
> +	"Enable the RCS/CCS switchout hold workaround for MTL (only some workloads are affected by issue and w/a has a performance penalty) (default:false)");
> +
>  static void _param_print_bool(struct drm_printer *p, const char *name,
>  			      bool val)
>  {
> diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
> index 1315d7fac850f..971a765d74f56 100644
> --- a/drivers/gpu/drm/i915/i915_params.h
> +++ b/drivers/gpu/drm/i915/i915_params.h
> @@ -62,6 +62,7 @@ struct drm_printer;
>  	param(unsigned int, lmem_size, 0, 0400) \
>  	param(unsigned int, lmem_bar_size, 0, 0400) \
>  	/* leave bools at the end to not create holes */ \
> +	param(bool, enable_mtl_rcs_ccs_wa, false, 0x400) \
>  	param(bool, enable_hangcheck, true, 0600) \
>  	param(bool, error_capture, true, IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) ? 0600 : 0) \
>  	param(bool, enable_gvt, false, IS_ENABLED(CONFIG_DRM_I915_GVT) ? 0400 : 0)
> -- 
> 2.41.0
> 

WARNING: multiple messages have this Message-ID (diff)
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: <John.C.Harrison@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>,
	Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	Intel-GFX@lists.freedesktop.org, DRI-Devel@lists.freedesktop.org
Subject: Re: [PATCH v2 4/4] drm/i915/mtl: Add module parameter override for Wa_16019325821/Wa_14019159160
Date: Thu, 2 Nov 2023 16:55:45 -0400	[thread overview]
Message-ID: <ZUQM0aBad0YKK9SL@intel.com> (raw)
In-Reply-To: <20231027211814.2696398-5-John.C.Harrison@Intel.com>

On Fri, Oct 27, 2023 at 02:18:14PM -0700, John.C.Harrison@Intel.com wrote:
> From: John Harrison <John.C.Harrison@Intel.com>
> 
> These w/a's can have signficant performance implications for any
> workload which uses both RCS and CCS. On the other hand, the hang
> itself is only seen in one or two very specific workloads. So add a
> module parameter to control whether the w/a's are enabled or not and
> default to not.

No, we are not adding a module parameter for a hardware workaround.

we need data to decide what's the impact and decide if we will live
the workaround enabled or disabled and we are not allowing toggle.

we also need to push back on hardware teams to continue pursuing
better and more feasible workaround.

or we need to disable the feature itself. But no module parameter
for hardware workarounds.

> 
> Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
> ---
>  drivers/gpu/drm/i915/gt/uc/intel_guc.c            | 3 ++-
>  drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c        | 3 ++-
>  drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 3 ++-
>  drivers/gpu/drm/i915/i915_params.c                | 3 +++
>  drivers/gpu/drm/i915/i915_params.h                | 1 +
>  5 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> index 6252f32d67011..4c89983b1e907 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> @@ -296,7 +296,8 @@ static u32 guc_ctl_wa_flags(struct intel_guc *guc)
>  
>  	/* Wa_16019325821 */
>  	/* Wa_14019159160 */
> -	if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)))
> +	if (gt->i915->params.enable_mtl_rcs_ccs_wa &&
> +	    IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)))
>  		flags |= GUC_WA_RCS_CCS_SWITCHOUT;
>  
>  	/*
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
> index 8f7298cbbc322..78757e78bce88 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c
> @@ -845,7 +845,8 @@ static void guc_waklv_init(struct intel_guc *guc)
>  	remain = guc_ads_waklv_size(guc);
>  
>  	/* Wa_14019159160 */
> -	if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71))) {
> +	if (gt->i915->params.enable_mtl_rcs_ccs_wa &&
> +	    IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71))) {
>  		size = guc_waklv_ra_mode(guc, offset, remain);
>  		offset += size;
>  		remain -= size;
> 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 225812b299524..4de54a100c451 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -4384,7 +4384,8 @@ static void guc_default_vfuncs(struct intel_engine_cs *engine)
>  
>  	/* Wa_16019325821 */
>  	/* Wa_14019159160 */
> -	if ((engine->class == COMPUTE_CLASS || engine->class == RENDER_CLASS) &&
> +	if (engine->i915->params.enable_mtl_rcs_ccs_wa &&
> +	    (engine->class == COMPUTE_CLASS || engine->class == RENDER_CLASS) &&
>  	    IS_GFX_GT_IP_RANGE(engine->gt, IP_VER(12, 70), IP_VER(12, 71)))
>  		engine->flags |= I915_ENGINE_USES_WA_HOLD_SWITCHOUT;
>  
> diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> index de43048543e8b..1004171d99943 100644
> --- a/drivers/gpu/drm/i915/i915_params.c
> +++ b/drivers/gpu/drm/i915/i915_params.c
> @@ -134,6 +134,9 @@ i915_param_named_unsafe(lmem_size, uint, 0400,
>  i915_param_named_unsafe(lmem_bar_size, uint, 0400,
>  			"Set the lmem bar size(in MiB).");
>  
> +i915_param_named(enable_mtl_rcs_ccs_wa, bool, 0400,
> +	"Enable the RCS/CCS switchout hold workaround for MTL (only some workloads are affected by issue and w/a has a performance penalty) (default:false)");
> +
>  static void _param_print_bool(struct drm_printer *p, const char *name,
>  			      bool val)
>  {
> diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
> index 1315d7fac850f..971a765d74f56 100644
> --- a/drivers/gpu/drm/i915/i915_params.h
> +++ b/drivers/gpu/drm/i915/i915_params.h
> @@ -62,6 +62,7 @@ struct drm_printer;
>  	param(unsigned int, lmem_size, 0, 0400) \
>  	param(unsigned int, lmem_bar_size, 0, 0400) \
>  	/* leave bools at the end to not create holes */ \
> +	param(bool, enable_mtl_rcs_ccs_wa, false, 0x400) \
>  	param(bool, enable_hangcheck, true, 0600) \
>  	param(bool, error_capture, true, IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) ? 0600 : 0) \
>  	param(bool, enable_gvt, false, IS_ENABLED(CONFIG_DRM_I915_GVT) ? 0400 : 0)
> -- 
> 2.41.0
> 

  reply	other threads:[~2023-11-02 20:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 21:18 [Intel-gfx] [PATCH v2 0/4] Enable Wa_14019159160 and Wa_16019325821 for MTL John.C.Harrison
2023-10-27 21:18 ` John.C.Harrison
2023-10-27 21:18 ` [Intel-gfx] [PATCH v2 1/4] drm/i915: Enable Wa_16019325821 John.C.Harrison
2023-10-27 21:18   ` John.C.Harrison
2023-12-14  7:37   ` [Intel-gfx] " Belgaumkar, Vinay
2023-10-27 21:18 ` [Intel-gfx] [PATCH v2 2/4] drm/i915/guc: Add support for w/a KLVs John.C.Harrison
2023-10-27 21:18   ` John.C.Harrison
2023-12-14  7:27   ` [Intel-gfx] " Belgaumkar, Vinay
2023-10-27 21:18 ` [Intel-gfx] [PATCH v2 3/4] drm/i915/guc: Enable Wa_14019159160 John.C.Harrison
2023-10-27 21:18   ` John.C.Harrison
2023-12-14  7:35   ` [Intel-gfx] " Belgaumkar, Vinay
2023-10-27 21:18 ` [Intel-gfx] [PATCH v2 4/4] drm/i915/mtl: Add module parameter override for Wa_16019325821/Wa_14019159160 John.C.Harrison
2023-10-27 21:18   ` John.C.Harrison
2023-11-02 20:55   ` Rodrigo Vivi [this message]
2023-11-02 20:55     ` Rodrigo Vivi
2023-10-28  1:44 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Enable Wa_14019159160 and Wa_16019325821 for MTL (rev2) Patchwork
2023-10-28  1:44 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-10-28  1:57 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-10-30 22:30 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZUQM0aBad0YKK9SL@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=DRI-Devel@lists.freedesktop.org \
    --cc=Intel-GFX@lists.freedesktop.org \
    --cc=John.C.Harrison@intel.com \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.