Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: Maarten Lankhorst <dev@lankhorst.se>, intel-xe@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/xe/display: Do not allocate into stolen for new framebuffers.
Date: Wed, 1 Jul 2026 11:33:52 +0100	[thread overview]
Message-ID: <9c677ba6-eb09-443e-8fbe-7bfc4efae913@intel.com> (raw)
In-Reply-To: <20260630135523.1775379-4-dev@lankhorst.se>

On 30/06/2026 14:55, Maarten Lankhorst wrote:
> Prefer to use system memory for global framebuffers, and reserve
> the space for FBC use only.
> 
> Now that multiple CRTC's can use FBC's, the simple heuristic
> of using less than half of stolen is no longer sufficient.

I think worth mentioning that we have major issues around stolen + CPU 
access on xe2+?

> 
> Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/7513
> Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>

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

> ---
>   drivers/gpu/drm/xe/display/xe_display_bo.c | 33 ++++------------------
>   1 file changed, 6 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/display/xe_display_bo.c b/drivers/gpu/drm/xe/display/xe_display_bo.c
> index 677ae3af9ac0c..04d4204b37a53 100644
> --- a/drivers/gpu/drm/xe/display/xe_display_bo.c
> +++ b/drivers/gpu/drm/xe/display/xe_display_bo.c
> @@ -154,33 +154,12 @@ static struct drm_gem_object *xe_display_bo_fbdev_create(struct drm_device *drm,
>   	struct xe_device *xe = to_xe_device(drm);
>   	struct xe_bo *obj;
>   
> -	obj = ERR_PTR(-ENODEV);
> -
> -	if (xe_display_bo_fbdev_prefer_stolen(xe, size)) {
> -		obj = xe_bo_create_pin_map_novm(xe, xe_device_get_root_tile(xe),
> -						size,
> -						ttm_bo_type_kernel,
> -						XE_BO_FLAG_FORCE_WC |
> -						XE_BO_FLAG_STOLEN |
> -						XE_BO_FLAG_GGTT,
> -						false);
> -		if (!IS_ERR(obj))
> -			drm_info(&xe->drm, "Allocated fbdev into stolen\n");
> -		else
> -			drm_info(&xe->drm, "Allocated fbdev into stolen failed: %li\n", PTR_ERR(obj));
> -	} else {
> -		drm_info(&xe->drm, "Allocating fbdev: Stolen memory not preferred.\n");
> -	}
> -
> -	if (IS_ERR(obj)) {
> -		obj = xe_bo_create_pin_map_novm(xe, xe_device_get_root_tile(xe), size,
> -						ttm_bo_type_kernel,
> -						XE_BO_FLAG_FORCE_WC |
> -						XE_BO_FLAG_VRAM_IF_DGFX(xe_device_get_root_tile(xe)) |
> -						XE_BO_FLAG_GGTT,
> -						false);
> -	}
> -
> +	obj = xe_bo_create_pin_map_novm(xe, xe_device_get_root_tile(xe), size,
> +					ttm_bo_type_kernel,
> +					XE_BO_FLAG_FORCE_WC |
> +					XE_BO_FLAG_VRAM_IF_DGFX(xe_device_get_root_tile(xe)) |
> +					XE_BO_FLAG_GGTT,
> +					false);
>   	if (IS_ERR(obj)) {
>   		drm_err(&xe->drm, "failed to allocate framebuffer (%pe)\n", obj);
>   		return ERR_PTR(-ENOMEM);


  reply	other threads:[~2026-07-01 10:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 13:55 [PATCH 0/3] drm/xe: Disable stolen memory for driver allocations Maarten Lankhorst
2026-06-30 13:55 ` [PATCH 1/3] drm/xe: Avoid using stolen memory for DPT Maarten Lankhorst
2026-06-30 14:10   ` Matthew Auld
2026-07-01 10:14     ` Maarten Lankhorst
2026-07-01 10:20       ` Matthew Auld
2026-06-30 13:55 ` [PATCH 2/3] drm/xe/display: Avoid using stolen memory for framebuffer when media gt exists Maarten Lankhorst
2026-07-01 10:27   ` Matthew Auld
2026-07-01 10:28     ` Matthew Auld
2026-06-30 13:55 ` [PATCH 3/3] drm/xe/display: Do not allocate into stolen for new framebuffers Maarten Lankhorst
2026-07-01 10:33   ` Matthew Auld [this message]
2026-06-30 14:25 ` ✓ CI.KUnit: success for drm/xe: Disable stolen memory for driver allocations Patchwork
2026-06-30 14:59 ` ✓ Xe.CI.BAT: " Patchwork
2026-07-01  6:40 ` ✓ 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=9c677ba6-eb09-443e-8fbe-7bfc4efae913@intel.com \
    --to=matthew.auld@intel.com \
    --cc=dev@lankhorst.se \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    /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