All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Maarten Lankhorst" <dev@lankhorst.se>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v4 4/5] HACK: Always fallback
Date: Thu, 05 Nov 2026 16:40:54 +0000	[thread overview]
Message-ID: <sashiko-outbox-199515@kernel.org> (raw)
In-Reply-To: <20261105161444.593259-11-dev@lankhorst.se>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/xe/display: debug return false in xe_display_bo_fbdev_prefer_stolen()
--

commit 6c3a580cc3d1b156a2c5d921989c5c7a936adda3
Author: Maarten Lankhorst <dev@lankhorst.se>

HACK: Always fallback

This commit adds an unconditional return false to
xe_display_bo_fbdev_prefer_stolen() in the xe display driver.

> diff --git a/drivers/gpu/drm/xe/display/xe_display_bo.c b/drivers/gpu/drm/xe/display/xe_display_bo.c
> index 9385026a80b97..d78d893210c4f 100644
> --- a/drivers/gpu/drm/xe/display/xe_display_bo.c
> +++ b/drivers/gpu/drm/xe/display/xe_display_bo.c
> @@ -142,6 +142,8 @@ bool xe_display_bo_fbdev_prefer_stolen(struct xe_device *xe, unsigned int size)
>  	if (XE_DEVICE_WA(xe, 22019338487_display))
>  		return false;
>  
> +	return false;

[Severity: Medium]
As reported by Sashiko on v2 [1], is this temporary debugging commit
intended to be dropped before merging?

Adding an unconditional return false in xe_display_bo_fbdev_prefer_stolen()
in drivers/gpu/drm/xe/display/xe_display_bo.c makes the subsequent stolen
memory size check unreachable dead code and renders all earlier checks and
the size parameter unused:

drivers/gpu/drm/xe/display/xe_display_bo.c:xe_display_bo_fbdev_prefer_stolen() {
    ...
	if (XE_DEVICE_WA(xe, 22019338487_display))
		return false;

	return false;

	/*
	 * If the FB is too big, just don't use it since fbdev is not very
	 * important and we should probably use that space with FBC or other
	 * features.
	 */
	return stolen->size >= (size * 2) >> PAGE_SHIFT;
}

During display initialization on integrated platforms with
CONFIG_FRAMEBUFFER_CONSOLE and CONFIG_DRM_FBDEV_EMULATION enabled,
initial_plane_bo() in drivers/gpu/drm/xe/display/xe_initial_plane.c calls
xe_display_bo_fbdev_prefer_stolen():

drivers/gpu/drm/xe/display/xe_initial_plane.c:initial_plane_bo() {
    ...
		if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) &&
		    IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION) &&
		    !xe_display_bo_fbdev_prefer_stolen(xe, plane_config->size)) {
			drm_info(&xe->drm, "Initial FB size exceeds half of stolen, discarding\n");
			return NULL;
		}
    ...
}

Because xe_display_bo_fbdev_prefer_stolen() now unconditionally returns
false, initial_plane_bo() always discards the initial BIOS framebuffer with
a misleading log message, and even with the subsequent takeover helper
xe_display_bo_fbdev_bios_fb_takeover() it will always fall back to
allocating a new system memory BO and blit-copying the BIOS framebuffer
instead of keeping it in stolen memory when eligible.

[1] https://lore.kernel.org/r/20260721142610.93804-11-dev@lankhorst.se

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261105161444.593259-7-dev@lankhorst.se?part=4

  reply	other threads:[~2026-11-05 16:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 16:14 [PATCH v4 0/5] drm/xe/display: Transparant fallback from stolen to sysmem Maarten Lankhorst
2026-11-05 16:14 ` [PATCH v4 1/5] drm/xe/display: Avoid using stolen memory for framebuffer when media gt exists Maarten Lankhorst
2026-11-05 16:14 ` [PATCH v4 2/5] drm/xe/migrate: Support copying between sysmem and stolen Maarten Lankhorst
2026-11-05 16:32   ` sashiko-bot
2026-11-05 16:14 ` [PATCH v4 3/5] drm/xe: Raise gt frequency slightly earlier Maarten Lankhorst
2026-11-05 16:14 ` [PATCH v4 4/5] HACK: Always fallback Maarten Lankhorst
2026-11-05 16:40   ` sashiko-bot [this message]
2026-11-05 16:14 ` [PATCH v4 5/5] drm/i915: Introduce intel_bo_fbdev_bios_fb_takeover() Maarten Lankhorst
2026-11-05 17:04   ` sashiko-bot
2026-11-05 18:12 ` ✗ CI.checkpatch: warning for drm/xe/display: Transparant fallback from stolen to sysmem. (rev4) Patchwork
2026-11-05 18:14 ` ✓ CI.KUnit: success " Patchwork
2026-11-05 18:48 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-11-06 19:21 ` ✗ 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=sashiko-outbox-199515@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dev@lankhorst.se \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.