[Intel-xe] [PATCH] drm/xe/mtl: Disable RNE in SF Unit

Matt Roper matthew.d.roper at intel.com
Fri Aug 11 00:56:04 UTC 2023


Generally for workarounds like this, it's best to just focus the title
and commit message on the identity of the workaround (e.g., something
like "drm/xe/mtl: Add Wa_15010599737").  Trying to explain what the
various chicken bits do isn't really advisable; generally they deal with
such low-level details of the hardware that the explanation doesn't mean
anything to the people reading the commit message and doesn't provide
any information that isn't already included in the registers' macro
names.

On Wed, Aug 09, 2023 at 12:12:13PM +0530, Shekhar Chauhan wrote:
> Workaround to disable the round to nearest even in SF unit
> 
> BSpec: 45818
> Signed-off-by: Shekhar Chauhan <shekhar.chauhan at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_wa.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_wa.c b/drivers/gpu/drm/xe/xe_wa.c
> index 36c80e9fb758..9e511ba69878 100644
> --- a/drivers/gpu/drm/xe/xe_wa.c
> +++ b/drivers/gpu/drm/xe/xe_wa.c
> @@ -602,6 +602,10 @@ static const struct xe_rtp_entry_sr lrc_was[] = {
>  	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1270, 1271)),
>  	  XE_RTP_ACTIONS(SET(CACHE_MODE_1, MSAA_OPTIMIZATION_REDUC_DISABLE))
>  	},
> +	{ XE_RTP_NAME("15010599737"),
> +	  XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1270, 1271), ENGINE_CLASS(RENDER)),

We actually don't want to program this one in the kernel driver.
Although it's not well-explained in the formal text for the workaround,
this workaround is only intended for DirectX9 workloads; it's not
supposed to be applied when any other rendering API is in use.  Since
this is a non-privileged register, the userspace 3D driver already has
the ability to update the register value and apply the workaround
if/when DX9 is being used (and on Linux that's probably going to be
"never" since even if you're running a DirectX program under Wine or
Proton or something, it's being translated into a different rendering
API where the workaround doesn't apply).

That does remind me --- we actually need to drop this workaround from
i915 on DG2; the details about the DX9-specific nature aren't super
clear in the workaround database and only came to light a few months ago
when I was having an offline email discussion with some of the hardware
architects about a different problem with this workaround.


Matt

> +	  XE_RTP_ACTIONS(SET(CHICKEN_RASTER_1, DIS_SF_ROUND_NEAREST_EVEN))
> +	},
>  
>  	{}
>  };
> -- 
> 2.34.1
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


More information about the Intel-xe mailing list