public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Vinod Govindapillai <vinod.govindapillai@intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	uma.shankar@intel.com, dri-devel@lists.freedesktop.org,
	"Christian Koenig" <christian.koenig@amd.com>,
	"Huang Rui" <ray.huang@amd.com>,
	"Matthew Auld" <matthew.auld@intel.com>,
	"Matthew Brost" <matthew.brost@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Subject: Re: [PATCH 1/6] drm/xe/fbdev: Fix BIOS FB vs.s stolen size check
Date: Fri, 6 Feb 2026 14:41:56 +0200	[thread overview]
Message-ID: <aYXhVgRXcHgTKnA-@intel.com> (raw)
In-Reply-To: <20260205140235.338410-2-vinod.govindapillai@intel.com>

On Thu, Feb 05, 2026 at 04:02:30PM +0200, Vinod Govindapillai wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Looks like stolen->size is in bytes, not pages. Remove the
> bogus PAGE_SHIFT stuff.

It looks to me like ttm itself is the problem here. It appears
to be a mismash of pages and bytes, and missing documentation
on which unit applies where.

Even worse, it looks like different drivers use different conventions
on what units to use. Eg. ttm_resource_manager_init() sometimes gets
passed the size in pages, sometimes in bytes. xe even uses both
units in one driver: pages in xe_ttm_sys_mgr_init(), bytes in
__xe_ttm_vram_mgr_init().

Cc'ing some ttm folks...

> 
> Also for some rnadom reason xe rejects the FB if it takes up
> exactly half of stolen, whereas i915 allows it to be used
> in that case. Adjust xe to follow the i915 rule for consistency.
> 
> v2: rebase related updates
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
> ---
>  drivers/gpu/drm/xe/display/xe_initial_plane.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/display/xe_initial_plane.c b/drivers/gpu/drm/xe/display/xe_initial_plane.c
> index 4cfeafcc158d..38ecc201ac4e 100644
> --- a/drivers/gpu/drm/xe/display/xe_initial_plane.c
> +++ b/drivers/gpu/drm/xe/display/xe_initial_plane.c
> @@ -99,7 +99,7 @@ initial_plane_bo(struct xe_device *xe,
>  		 * features.
>  		 */
>  		if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) &&
> -		    plane_config->size * 2 >> PAGE_SHIFT >= stolen->size)
> +		    plane_config->size * 2 > stolen->size)
>  			return NULL;
>  	}
>  
> -- 
> 2.43.0

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2026-02-06 12:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 14:02 [PATCH 0/6] update the stolen memory allocation preference Vinod Govindapillai
2026-02-05 14:02 ` [PATCH 1/6] drm/xe/fbdev: Fix BIOS FB vs.s stolen size check Vinod Govindapillai
2026-02-06 12:41   ` Ville Syrjälä [this message]
2026-02-05 14:02 ` [PATCH 2/6] drm/i915/display: remove the usage of dev_priv Vinod Govindapillai
2026-02-05 14:02 ` [PATCH 3/6] drm/i915/fbdev: Extract intel_fbdev_fb_prefer_stolen() Vinod Govindapillai
2026-02-10  9:30   ` Jani Nikula
2026-02-24 18:34   ` Shankar, Uma
2026-02-05 14:02 ` [PATCH 4/6] drm/xe/fbdev: " Vinod Govindapillai
2026-02-05 14:02 ` [PATCH 5/6] drm/xe/fbdev: print info about stolen memory preference for fbdev Vinod Govindapillai
2026-02-05 14:02 ` [PATCH 6/6] drm/i915/fbdev: " Vinod Govindapillai
2026-02-05 14:41 ` ✓ CI.KUnit: success for update the stolen memory allocation preference Patchwork
2026-02-05 15:00 ` ✗ CI.checksparse: warning " Patchwork
2026-02-05 15:42 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-02-06 13:33 ` ✗ Xe.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=aYXhVgRXcHgTKnA-@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=ray.huang@amd.com \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=uma.shankar@intel.com \
    --cc=vinod.govindapillai@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