From: Matthew Brost <matthew.brost@intel.com>
To: "Welty, Brian" <brian.welty@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/xe: Add build on bug to assert page fault queue works
Date: Wed, 10 Jan 2024 01:05:49 +0000 [thread overview]
Message-ID: <ZZ3tbZjm5+4MDM6y@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <5dde9f65-29c1-4d74-bf3b-83672546c969@intel.com>
On Tue, Jan 09, 2024 at 01:52:06PM -0800, Welty, Brian wrote:
>
>
> On 1/9/2024 9:28 AM, Matthew Brost wrote:
> > If NUM_PF_QUEUE % PF_MSG_LEN_DW != 0 then the page fault queue logic
> > does not work when wrapping occurs. Add a build bug on to assert
> > NUM_PF_QUEUE % PF_MSG_LEN_DW == 0 to enforce this restriction and
> > document the code.
>
> I'm a bit confused. Number of queues is independent.
>
> Don't you mean to test against size of queue in DWs?
> So this for the check?
> BUILD_BUG_ON(PF_QUEUE_NUM_DW % PF_MSG_LEN_DW);
>
Yes. This the check I wanted. Thanks, will fix.
Matt
>
> >
> > Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> > Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_gt_pagefault.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_gt_pagefault.c b/drivers/gpu/drm/xe/xe_gt_pagefault.c
> > index 4489aadc7a52..16cea47d9e15 100644
> > --- a/drivers/gpu/drm/xe/xe_gt_pagefault.c
> > +++ b/drivers/gpu/drm/xe/xe_gt_pagefault.c
> > @@ -328,6 +328,11 @@ int xe_guc_pagefault_handler(struct xe_guc *guc, u32 *msg, u32 len)
> > u32 asid;
> > bool full;
> > + /*
> > + * The below logic doesn't work unless NUM_PF_QUEUE % PF_MSG_LEN_DW == 0
> > + */
> > + BUILD_BUG_ON(NUM_PF_QUEUE % PF_MSG_LEN_DW);
> > +
> > if (unlikely(len != PF_MSG_LEN_DW))
> > return -EPROTO;
next prev parent reply other threads:[~2024-01-10 1:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 17:28 [PATCH 0/4] Page fault logic clean ups Matthew Brost
2024-01-09 17:28 ` [PATCH 1/4] drm/xe: Add build on bug to assert page fault queue works Matthew Brost
2024-01-09 21:52 ` Welty, Brian
2024-01-10 1:05 ` Matthew Brost [this message]
2024-01-09 17:28 ` [PATCH 2/4] drm/xe: Invert page fault queue head / tail Matthew Brost
2024-01-09 17:28 ` [PATCH 3/4] drm/xe: Add build on bug to assert access counter queue works Matthew Brost
2024-01-09 17:28 ` [PATCH 4/4] drm/xe: Invert access counter queue head / tail Matthew Brost
2024-01-09 19:06 ` ✓ CI.Patch_applied: success for Page fault logic clean ups Patchwork
2024-01-09 19:06 ` ✓ CI.checkpatch: " Patchwork
2024-01-09 19:07 ` ✓ CI.KUnit: " Patchwork
2024-01-09 19:15 ` ✓ CI.Build: " Patchwork
2024-01-09 19:15 ` ✓ CI.Hooks: " Patchwork
2024-01-09 19:17 ` ✓ CI.checksparse: " Patchwork
2024-01-09 19:51 ` ✓ CI.BAT: " 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=ZZ3tbZjm5+4MDM6y@DUT025-TGLU.fm.intel.com \
--to=matthew.brost@intel.com \
--cc=brian.welty@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@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