Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: Shuicheng Lin <shuicheng.lin@intel.com>, intel-xe@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH] drm/xe: Fix stolen size check to allow equal WOPCM size
Date: Fri, 17 Oct 2025 09:54:53 +0100	[thread overview]
Message-ID: <466c6ba9-7bdc-44b0-bdcc-89fd51150f03@intel.com> (raw)
In-Reply-To: <20251016225506.2256127-2-shuicheng.lin@intel.com>

On 16/10/2025 23:55, Shuicheng Lin wrote:
> On some platforms without dedicated stolen memory, the calculated
> stolen size may be exactly equal to the WOPCM size. The current
> assertion incorrectly requires it to be strictly greater, causing
> a false failure. Relax the check to allow equality.
> 
> Fixes: 65369b8e2961 ("drm/xe: Change return type of detect_bar2_dgfx() from s64 to u64")
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6359
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>

Looking at the logs for PVC it has previously never been probed with an 
actual usable stolen area it seems, so this looks correct to me.

Reviewed-by: Matthew Auld <matthew.auld@intel.com>

> ---
>   drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
> index e368b2a36bac..1bddecfb723a 100644
> --- a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
> +++ b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
> @@ -106,7 +106,7 @@ static u64 detect_bar2_dgfx(struct xe_device *xe, struct xe_ttm_stolen_mgr *mgr)
>   
>   	stolen_size = tile_size - mgr->stolen_base;
>   
> -	xe_assert(xe, stolen_size > wopcm_size);
> +	xe_assert(xe, stolen_size >= wopcm_size);
>   	stolen_size -= wopcm_size;
>   
>   	/* Verify usage fits in the actual resource available */


  parent reply	other threads:[~2025-10-17  8:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16 22:55 [PATCH] drm/xe: Fix stolen size check to allow equal WOPCM size Shuicheng Lin
2025-10-16 23:04 ` ✓ CI.KUnit: success for " Patchwork
2025-10-16 23:42 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-17  8:54 ` Matthew Auld [this message]
2025-10-21 16:09   ` [PATCH] " Lin, Shuicheng
2025-10-21 17:11     ` Rodrigo Vivi
2025-10-17 20:53 ` ✓ Xe.CI.Full: success 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=466c6ba9-7bdc-44b0-bdcc-89fd51150f03@intel.com \
    --to=matthew.auld@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=shuicheng.lin@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