Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Chauhan, Shekhar" <shekhar.chauhan@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>,
	Gustavo Sousa <gustavo.sousa@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	Lucas De Marchi <lucas.de.marchi@gmail.com>
Subject: Re: [PATCH] drm/xe/xe2lpg: Extend Wa_14020338487
Date: Thu, 18 Apr 2024 10:36:39 +0530	[thread overview]
Message-ID: <631354ff-db80-4b39-bee3-bf63896ed4f5@intel.com> (raw)
In-Reply-To: <20240417222747.GN6571@mdroper-desk1.amr.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 4879 bytes --]


On 4/18/2024 03:57, Matt Roper wrote:
> On Wed, Apr 17, 2024 at 06:45:47PM -0300, Gustavo Sousa wrote:
>> Quoting Gustavo Sousa (2024-04-17 18:25:01-03:00)
>>> Wa_14020338487 also applies to Xe2_LPG. Replicate the existing entry to
>>> one specific for Xe2_LPG.
>> I would also like to take this as an opportunity to discuss the way we
>> are currently arranging the RTP entries for the workaround. Using this
>> one as example, created a copy of the entry and edited the argument of
>> GRAPHICS_VERSION() to match Xe2_LPG. There are multiple cases already
>> following the same pattern, mainly because we are grouping entries by
>> IP release.
>>
>> Do we want to continue following that pattern and keep the code
>> duplication? Or should we think of a way to avoid code duplication here?
>>
>> A very simple approach that I think of is having a single entry for each
>> lineage. But I guess that's not really feasible today because I guess we
>> do not have a way of expressing logical disjunction in XE_RTP_RULES().
> Yeah, there are basically two options here:
>   - Keep them separate for now and combine some of them down the road
>     once we're sure no additional SKUs or refresh platforms are going to
>     show up with versions 20.02 and 20.03
>   - Combine them as "general Xe2" workarounds now with a version range of
>     20.01 - 20.04, and then split them back appart in the future if/when
>     some new SKU/platform that doesn't need the workaround shows up to
>     take the currently unused version numbers.
>
> I think we've been going with the first approach because during early
> enablement of the platform it makes it slightly easier to quickly
> compare the driver's workaround list against the workaround database's
> list for a specific platform.  But we can also get a runtime list (i.e.,
> what's _actually_ applied) from debugfs, so maybe that's not very
> important.
>
> As long as we do it consistently and put in a comment warning about
> future changes, I don't see a problem with grouping some of these shared
> workarounds into a new "All Xe2" category with the understanding that
> some of them may need to be separated back out into individual entries
> if/when 20.02 or 20.03 platforms show up in the future.
But would this really solve the current problem we're talking about? 
When the new platforms arrive, we'll be again segregating them based off 
their IP versions and then again combine them as we're talking right now 
{under a range 20.01 to 20.04 (assuming 20.02 and 20.03 doesn't show 
up)}. This would result in redundant work, implementing the w/a and then 
later on, grouping it again under the list of platforms currently at our 
disposal. Instead, can we brainstorm on something within XE_RTP_RULES, 
so that, at least for the same IP version, we can group all of the 
workarounds available? Based off of what Gustavo said, about having to 
change the IP version to match Xe2_LPG, I see a couple (maybe more) of 
workarounds, which have the same IP, same ENGINE_CLASS and yet having 
multiple entries.
An example:

/* Xe2_LPM */{ XE_RTP_NAME("14017421178"), 
XE_RTP_RULES(MEDIA_VERSION(2000), ENGINE_CLASS(VIDEO_DECODE)), 
XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F10(0), IECPUNIT_CLKGATE_DIS)), 
XE_RTP_ENTRY_FLAG(FOREACH_ENGINE), }, { XE_RTP_NAME("16021867713"), 
XE_RTP_RULES(MEDIA_VERSION(2000), ENGINE_CLASS(VIDEO_DECODE)), 
XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F1C(0), MFXPIPE_CLKGATE_DIS)), 
XE_RTP_ENTRY_FLAG(FOREACH_ENGINE), }, { XE_RTP_NAME("14019449301"), 
XE_RTP_RULES(MEDIA_VERSION(2000), ENGINE_CLASS(VIDEO_DECODE)), 
XE_RTP_ACTIONS(SET(VDBOX_CGCTL3F08(0), CG3DDISHRS_CLKGATE_DIS)), 
XE_RTP_ENTRY_FLAG(FOREACH_ENGINE), },

By the way, while we're at it, can someone explain me the use of XE_RTP_ENTRY_FLAG(FOREACH_ENGINE)?

/shekhar/

>
>
> Matt
>
>> --
>> Gustavo Sousa
>>
>>> Signed-off-by: Gustavo Sousa<gustavo.sousa@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 632bd9066f8d..dcf7ed51757c 100644
>>> --- a/drivers/gpu/drm/xe/xe_wa.c
>>> +++ b/drivers/gpu/drm/xe/xe_wa.c
>>> @@ -445,6 +445,10 @@ static const struct xe_rtp_entry_sr engine_was[] = {
>>>                         FUNC(xe_rtp_match_first_render_or_compute)),
>>>            XE_RTP_ACTIONS(SET(HALF_SLICE_CHICKEN5, DISABLE_SAMPLE_G_PERFORMANCE))
>>>          },
>>> +        { XE_RTP_NAME("14020338487"),
>>> +          XE_RTP_RULES(GRAPHICS_VERSION(2004), FUNC(xe_rtp_match_first_render_or_compute)),
>>> +          XE_RTP_ACTIONS(SET(ROW_CHICKEN3, XE2_EUPEND_CHK_FLUSH_DIS))
>>> +        },
>>>          { XE_RTP_NAME("16021540221"),
>>>            XE_RTP_RULES(GRAPHICS_VERSION(2004), GRAPHICS_STEP(A0, B0),
>>>                         FUNC(xe_rtp_match_first_render_or_compute)),
>>> -- 
>>> 2.44.0
>>>
-- 
-shekhar

[-- Attachment #2: Type: text/html, Size: 8477 bytes --]

  reply	other threads:[~2024-04-18  5:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17 21:25 [PATCH] drm/xe/xe2lpg: Extend Wa_14020338487 Gustavo Sousa
2024-04-17 21:40 ` Matt Roper
2024-04-17 21:45 ` Gustavo Sousa
2024-04-17 22:27   ` Matt Roper
2024-04-18  5:06     ` Chauhan, Shekhar [this message]
2024-04-18 14:55     ` Gustavo Sousa
2024-04-17 22:35   ` Lucas De Marchi
2024-04-18  4:50     ` Chauhan, Shekhar
2024-04-18  5:00       ` Lucas De Marchi
2024-04-18  5:09         ` Chauhan, Shekhar
2024-04-18 14:31     ` Gustavo Sousa
2024-04-18  1:57 ` ✓ CI.Patch_applied: success for " Patchwork
2024-04-18  1:57 ` ✓ CI.checkpatch: " Patchwork
2024-04-18  1:58 ` ✓ CI.KUnit: " Patchwork
2024-04-18  2:18 ` ✓ CI.Build: " Patchwork
2024-04-18  2:21 ` ✓ CI.Hooks: " Patchwork
2024-04-18  2:22 ` ✓ CI.checksparse: " Patchwork
2024-04-18  3:16 ` ✓ CI.BAT: " Patchwork
2024-04-18 20:12   ` Matt Roper
2024-04-19 18:41 ` ✗ CI.FULL: 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=631354ff-db80-4b39-bee3-bf63896ed4f5@intel.com \
    --to=shekhar.chauhan@intel.com \
    --cc=gustavo.sousa@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.de.marchi@gmail.com \
    --cc=matthew.d.roper@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox