From: Matthew Auld <matthew.auld@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>,
Tejas Upadhyay <tejas.upadhyay@intel.com>
Cc: intel-xe@lists.freedesktop.org,
Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [PATCH 1/2] drm/xe: Init MCR before any mcr register read
Date: Fri, 9 Aug 2024 09:55:12 +0100 [thread overview]
Message-ID: <4a41b168-10de-432f-8535-a719d321823a@intel.com> (raw)
In-Reply-To: <20240808195114.GE5091@mdroper-desk1.amr.corp.intel.com>
On 08/08/2024 20:51, Matt Roper wrote:
> On Thu, Aug 08, 2024 at 02:58:25PM +0530, Tejas Upadhyay wrote:
>> enable host l2 VRAM is example where MCR register is
>> getting read before fully MCR init is done. Lets move
>
> "is example" makes it sound like this is just one of multiple places
> where we're incorrectly using MCR registers before MCR handling is
> initialized. If there are indeed other cases, then I'd expect to see
> more patches in this series making other changes as well.
>
> Also, the title seems slightly misleading as well; it makes it sound
> like we're changing where we do the MCR init (which would run into other
> chicken-and-egg problems with topology and GuC init), but in reality
> we're just moving the L2 thing for Wa_16023588340 a bit later in the
> init process, so it might be best to focus the wording on that.
>
> From a quick skim of Wa_16023588340 it just says that we need to do this
> as part of initialization (and GT reset) without really specifying any
> specific ordering with respect to other initialization tasks. If I
> remember this workaround correctly it's probably something that we want
> to do before we start having a bunch of CPU writes to the LMEMBAR. I
> think there are some CPU -> VRAM writes during GuC initialization (e.g.,
> the GuC ADS), but maybe not enough to require doing this workaround
> earlier; we should probably test this carefully and/or double check with
> the architects on whether they think this would be a concern. I know
> the really heavy CPU -> LMEMBAR traffic would probably come later once
> we initialize display and the fbcon starts writing to the fbdev
> framebuffer, so the new placement is still early enough to avoid those
> at least.
Yeah, it seemed reasonable to enable the host l2 caching before we
started touching vram from the host. I don't recall if it was this
version of the WA or the one that did the timer reg write thing, but I
do seem to remember the placement being sensitive even during module
load (IIRC gt_init vs gt_init_early), where if done too late (gt_init)
you would sometimes still get the issue with the register read timing
out in the interrupt handler. But in xe_gt_init_hwconfig perhaps not an
issue, since it is still quite early.
>
>
> Matt
>
>> enable host l2 VRAM after MCR init.
>>
>> V1(Lucas):
>> - Reorder patch and reorder flow of L2 VRAM enable
>>
>> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>> Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_gt.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c
>> index 58895ed22f6e..238c7d1053f0 100644
>> --- a/drivers/gpu/drm/xe/xe_gt.c
>> +++ b/drivers/gpu/drm/xe/xe_gt.c
>> @@ -557,7 +557,6 @@ int xe_gt_init_hwconfig(struct xe_gt *gt)
>>
>> xe_gt_mcr_init_early(gt);
>> xe_pat_init(gt);
>> - xe_gt_enable_host_l2_vram(gt);
>>
>> err = xe_uc_init(>->uc);
>> if (err)
>> @@ -569,6 +568,7 @@ int xe_gt_init_hwconfig(struct xe_gt *gt)
>>
>> xe_gt_topology_init(gt);
>> xe_gt_mcr_init(gt);
>> + xe_gt_enable_host_l2_vram(gt);
>>
>> out_fw:
>> xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
>> --
>> 2.25.1
>>
>
next prev parent reply other threads:[~2024-08-09 8:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 9:28 [PATCH 0/2] Shuffle enable_host_l2_vram order and use MCR reg Tejas Upadhyay
2024-08-08 9:28 ` [PATCH 1/2] drm/xe: Init MCR before any mcr register read Tejas Upadhyay
2024-08-08 19:51 ` Matt Roper
2024-08-09 8:55 ` Matthew Auld [this message]
2024-08-09 9:11 ` Upadhyay, Tejas
2024-08-09 9:21 ` Matthew Auld
2024-08-09 10:32 ` Upadhyay, Tejas
2024-08-14 6:15 ` Upadhyay, Tejas
2024-08-08 9:28 ` [PATCH 2/2] drm/xe: Write all slices if its mcr register Tejas Upadhyay
2024-08-08 9:46 ` ✓ CI.Patch_applied: success for Shuffle enable_host_l2_vram order and use MCR reg Patchwork
2024-08-08 9:46 ` ✓ CI.checkpatch: " Patchwork
2024-08-08 9:47 ` ✓ CI.KUnit: " Patchwork
2024-08-08 9:59 ` ✓ CI.Build: " Patchwork
2024-08-08 10:02 ` ✓ CI.Hooks: " Patchwork
2024-08-08 10:03 ` ✓ CI.checksparse: " Patchwork
2024-08-08 10:24 ` ✓ CI.BAT: " Patchwork
2024-08-08 13:23 ` ✓ CI.FULL: " 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=4a41b168-10de-432f-8535-a719d321823a@intel.com \
--to=matthew.auld@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=tejas.upadhyay@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