Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-xe@lists.freedesktop.org
Cc: Matthew Brost <matthew.brost@intel.com>
Subject: Re: [PATCH] drm/xe: Ensure XE_BO_FLAG_CPU_ADDR_MIRROR has a unique value
Date: Mon, 7 Apr 2025 08:14:16 +0100	[thread overview]
Message-ID: <f875d21f-42d2-44d7-9403-25f5ef067849@intel.com> (raw)
In-Reply-To: <20250404220053.1758356-2-matthew.d.roper@intel.com>

On 04/04/2025 23:00, Matt Roper wrote:
> When XE_BO_FLAG_PINNED_NORESTORE and XE_BO_FLAG_PINNED_LATE_RESTORE were
> added, they were assigned BO flag values in the middle of the flag
> range, requiring renumbering of the higher flags.  In both cases,
> XE_BO_FLAG_CPU_ADDR_MIRROR was overlooked during renumbering because it
> was defined below XE_BO_FLAG_GGTT_ALL and thus was not immediately
> visible in code diffs changing this area of the code; this resulted in
> XE_BO_FLAG_CPU_ADDR_MIRROR clashing with another flag.
> 
> Assign XE_BO_FLAG_CPU_ADDR_MIRROR a unique value, and also move the
> definition of XE_BO_FLAG_GGTT_ALL down below all of the individual flags
> so that this kind of mistake is less likely in the future.  Also, while
> we're at it, fix up some space vs tab whitespace inconsistency in these
> flag definitions.
> 
> Fixes: 7f387e6012b6 ("drm/xe: add XE_BO_FLAG_PINNED_LATE_RESTORE")
> Fixes: 045448da87bf ("drm/xe: Add XE_BO_FLAG_PINNED_NORESTORE")
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>

Sorry for missing this,
Reviewed-by: Matthew Auld <matthew.auld@intel.com>

> ---
>   drivers/gpu/drm/xe/xe_bo.h | 21 +++++++++++----------
>   1 file changed, 11 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h
> index f7e716f59948..0a19b50045b2 100644
> --- a/drivers/gpu/drm/xe/xe_bo.h
> +++ b/drivers/gpu/drm/xe/xe_bo.h
> @@ -40,21 +40,22 @@
>   #define XE_BO_FLAG_NEEDS_2M		BIT(16)
>   #define XE_BO_FLAG_GGTT_INVALIDATE	BIT(17)
>   #define XE_BO_FLAG_PINNED_NORESTORE	BIT(18)
> -#define XE_BO_FLAG_PINNED_LATE_RESTORE BIT(19)
> -#define XE_BO_FLAG_GGTT0                BIT(20)
> -#define XE_BO_FLAG_GGTT1                BIT(21)
> -#define XE_BO_FLAG_GGTT2                BIT(22)
> -#define XE_BO_FLAG_GGTT3                BIT(23)
> -#define XE_BO_FLAG_GGTT_ALL             (XE_BO_FLAG_GGTT0 | \
> -					 XE_BO_FLAG_GGTT1 | \
> -					 XE_BO_FLAG_GGTT2 | \
> -					 XE_BO_FLAG_GGTT3)
> -#define XE_BO_FLAG_CPU_ADDR_MIRROR	BIT(22)
> +#define XE_BO_FLAG_PINNED_LATE_RESTORE	BIT(19)
> +#define XE_BO_FLAG_GGTT0		BIT(20)
> +#define XE_BO_FLAG_GGTT1		BIT(21)
> +#define XE_BO_FLAG_GGTT2		BIT(22)
> +#define XE_BO_FLAG_GGTT3		BIT(23)
> +#define XE_BO_FLAG_CPU_ADDR_MIRROR	BIT(24)
>   
>   /* this one is trigger internally only */
>   #define XE_BO_FLAG_INTERNAL_TEST	BIT(30)
>   #define XE_BO_FLAG_INTERNAL_64K		BIT(31)
>   
> +#define XE_BO_FLAG_GGTT_ALL		(XE_BO_FLAG_GGTT0 | \
> +					 XE_BO_FLAG_GGTT1 | \
> +					 XE_BO_FLAG_GGTT2 | \
> +					 XE_BO_FLAG_GGTT3)
> +
>   #define XE_BO_FLAG_GGTTx(tile) \
>   	(XE_BO_FLAG_GGTT0 << (tile)->id)
>   


  parent reply	other threads:[~2025-04-07  7:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-04 22:00 [PATCH] drm/xe: Ensure XE_BO_FLAG_CPU_ADDR_MIRROR has a unique value Matt Roper
2025-04-04 22:26 ` ✓ CI.Patch_applied: success for " Patchwork
2025-04-04 22:26 ` ✓ CI.checkpatch: " Patchwork
2025-04-04 22:27 ` ✓ CI.KUnit: " Patchwork
2025-04-04 22:44 ` ✓ CI.Build: " Patchwork
2025-04-04 22:46 ` ✓ CI.Hooks: " Patchwork
2025-04-04 22:47 ` ✓ CI.checksparse: " Patchwork
2025-04-04 23:33 ` ✓ Xe.CI.BAT: " Patchwork
2025-04-07  7:14 ` Matthew Auld [this message]
2025-04-07 18:52   ` [PATCH] " Matthew Brost
2025-04-07 18:46 ` ✗ Xe.CI.Full: failure for " 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=f875d21f-42d2-44d7-9403-25f5ef067849@intel.com \
    --to=matthew.auld@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.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