From: sashiko-bot@kernel.org
To: "Maarten Lankhorst" <dev@lankhorst.se>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v4 5/6] drm/xe/display: Remove duplicated code
Date: Mon, 16 Nov 2026 12:56:13 +0000 [thread overview]
Message-ID: <sashiko-outbox-217026@kernel.org> (raw)
In-Reply-To: <20261116122828.266113-13-dev@lankhorst.se>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/xe/display: spurious drm_err in initial_plane_bo() without
stolen memory
--
commit bab2c79797477724bcda99b81e670f98a25a3bee
Author: Maarten Lankhorst <dev@lankhorst.se>
drm/xe/display: Remove duplicated code
This commit moves the GGTT PTE read and local-memory bit check out of the
discrete and integrated branches in initial_plane_bo().
> diff --git a/drivers/gpu/drm/xe/display/xe_initial_plane.c b/drivers/gpu/drm/xe/display/xe_initial_plane.c
> index 451c24a4ed8d5..1366b68f43fc2 100644
> --- a/drivers/gpu/drm/xe/display/xe_initial_plane.c
> +++ b/drivers/gpu/drm/xe/display/xe_initial_plane.c
[ ... ]
> @@ -58,16 +58,14 @@ initial_plane_bo(struct xe_device *xe,
> page_size);
> size -= base;
>
> - if (IS_DGFX(xe)) {
> - u64 pte = xe_ggtt_read_pte(tile0->mem.ggtt, base);
> -
> - if (is_pte_local(pte) != need_pte_local(xe)) {
> - drm_err(&xe->drm, "Initial plane PTE has bad local memory bit\n");
> - return NULL;
> - }
> -
> - phys_base = pte & ~(page_size - 1);
> + pte = xe_ggtt_read_pte(tile0->mem.ggtt, base);
> + phys_base = pte & ~(page_size - 1);
> + if (is_pte_local(pte) != need_pte_local(xe)) {
> + drm_err(&xe->drm, "Initial plane PTE has bad local memory bit\n");
> + return NULL;
> + }
>
> + if (IS_DGFX(xe)) {
> flags |= XE_BO_FLAG_VRAM0;
>
> /*
> @@ -85,24 +83,13 @@ initial_plane_bo(struct xe_device *xe,
> "Using phys_base=%pa, based on initial plane programming\n",
> &phys_base);
> } else {
> - struct ttm_resource_manager *stolen;
> - u64 pte;
> -
> - stolen = ttm_manager_type(&xe->ttm, XE_PL_STOLEN);
> - if (!stolen) {
> + if (!ttm_manager_type(&xe->ttm, XE_PL_STOLEN)) {
> drm_dbg_kms(&xe->drm, "No stolen for initial FB\n");
> return NULL;
> }
>
> - pte = xe_ggtt_read_pte(tile0->mem.ggtt, base);
> -
> - if (is_pte_local(pte) != need_pte_local(xe)) {
> - drm_err(&xe->drm, "Initial plane PTE has bad local memory bit\n");
> - return NULL;
> - }
> -
> - phys_base = (pte & ~(page_size - 1)) - xe_ttm_stolen_gpu_offset(xe);
> flags |= XE_BO_FLAG_STOLEN;
> + phys_base -= xe_ttm_stolen_gpu_offset(xe);
[Severity: Low]
Can moving the PTE local-memory bit check ahead of the stolen memory manager
check cause a spurious drm_err() on integrated platforms without stolen
memory?
On integrated platforms with has_lmembar(xe) where XE_PL_STOLEN is
unavailable, firmware can place the initial framebuffer in system memory
without XE_GGTT_PTE_DM set. Previously, initial_plane_bo() checked
ttm_manager_type(&xe->ttm, XE_PL_STOLEN) first and returned NULL with a
drm_dbg_kms() message, as added in 1d2a6c96f6f7 ("drm/xe: Print a debug
message if we have no stolen for the initial FB"). With this change, it
logs "Initial plane PTE has bad local memory bit" via drm_err() before
reaching the stolen check.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261116122828.266113-8-dev@lankhorst.se?part=5
next prev parent reply other threads:[~2026-11-16 12:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 12:28 [PATCH v4 0/6] drm/xe: More BIOS FB takeover fixes Maarten Lankhorst
2026-11-16 12:28 ` [PATCH v4 1/6] drm/xe/ggtt: Add xe_ggtt_reserve_area Maarten Lankhorst
2026-11-16 12:38 ` sashiko-bot
2026-11-16 12:28 ` [PATCH v4 2/6] drm/xe/ggtt: Add xe_ggtt_node_remove_noclear Maarten Lankhorst
2026-11-16 12:28 ` [PATCH v4 3/6] drm/xe/display: Reserve the original GGTT space before creating a bo Maarten Lankhorst
2026-11-16 12:28 ` [PATCH v4 4/6] drm/xe/display: Use the correct calculation for phys_base on integrated Maarten Lankhorst
2026-11-16 12:49 ` sashiko-bot
2026-11-16 12:28 ` [PATCH v4 5/6] drm/xe/display: Remove duplicated code Maarten Lankhorst
2026-11-16 12:56 ` sashiko-bot [this message]
2026-11-16 12:28 ` [PATCH v4 6/6] drm/xe/ggtt: Remove xe_ggtt_insert_bo_at Maarten Lankhorst
2026-11-16 14:40 ` ✗ CI.checkpatch: warning for drm/xe: More BIOS FB takeover fixes (rev5) Patchwork
2026-11-16 14:43 ` ✓ CI.KUnit: success " Patchwork
2026-11-16 15:17 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-16 23:16 ` ✗ Xe.CI.FULL: failure " 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-217026@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.