From: Juasheem Sultan <jdsultan@google.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Manasi Navare <navaremanasi@google.com>,
Drew Davenport <ddavenport@google.com>,
Sean Paul <seanpaul@google.com>,
Samuel Jacob <samjaco@google.com>,
Rajat Jain <rajatja@google.com>,
Juasheem Sultan <jdsultan@google.com>
Subject: [PATCH v4 1/2] drm/xe/display: Fix reading the framebuffer from stolen memory
Date: Tue, 17 Mar 2026 15:09:02 -0700 [thread overview]
Message-ID: <20260317220908.130968-2-jdsultan@google.com> (raw)
In-Reply-To: <20260317220908.130968-1-jdsultan@google.com>
Currently, we attempt to pin stolen memory using the ggtt address. This
doesn't appear to actually read the framebuffer that was setup by the
bios. Instead, we have to use the underlying physical address offset
within stolen memory.
Signed-off-by: Juasheem Sultan <jdsultan@google.com>
---
drivers/gpu/drm/xe/display/xe_initial_plane.c | 22 ++++++++++++++++++-
1 file changed, 21 insertions(+), 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..d818993d9b8a 100644
--- a/drivers/gpu/drm/xe/display/xe_initial_plane.c
+++ b/drivers/gpu/drm/xe/display/xe_initial_plane.c
@@ -19,6 +19,7 @@
#include "intel_fb.h"
#include "intel_fb_pin.h"
#include "xe_bo.h"
+#include "xe_ttm_stolen_mgr.h"
#include "xe_vram_types.h"
#include "xe_wa.h"
@@ -87,7 +88,26 @@ initial_plane_bo(struct xe_device *xe,
if (!stolen)
return NULL;
- phys_base = base;
+
+ /* Read PTE to find physical address backing the GGTT address */
+ u64 pte = xe_ggtt_read_pte(tile0->mem.ggtt, base);
+ u64 phys_addr = pte & ~(page_size - 1);
+
+ u64 stolen_base = xe_ttm_stolen_gpu_offset(xe);
+
+ drm_dbg_kms(&xe->drm,
+ "Stolen Framebuffer base=%x pte=%llx phys_addr=%llx stolen_base=%llx\n",
+ base, pte, phys_addr, stolen_base);
+
+ /* Make sure that the physical address is in the range of stolen memory */
+ if (phys_addr >= stolen_base) {
+ phys_base = phys_addr - stolen_base;
+ } else {
+ drm_err(&xe->drm, "Stolen memory outside of stolen range phys_base=%pa\n",
+ &phys_base);
+ return NULL;
+ }
+
flags |= XE_BO_FLAG_STOLEN;
if (XE_DEVICE_WA(xe, 22019338487_display))
--
2.53.0.851.ga537e3e6e9-goog
next prev parent reply other threads:[~2026-03-17 22:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 22:09 [PATCH v4 0/2] Enable seamless boot (fastboot) for PTL Juasheem Sultan
2026-03-17 22:09 ` Juasheem Sultan [this message]
2026-03-18 12:05 ` [PATCH v4 1/2] drm/xe/display: Fix reading the framebuffer from stolen memory Maarten Lankhorst
2026-03-17 22:09 ` [PATCH v4 2/2] drm/i915/display: Sync state to BIOS for seamless handoff Juasheem Sultan
2026-03-18 12:00 ` Maarten Lankhorst
2026-03-26 23:10 ` Juasheem Sultan
2026-03-27 8:58 ` Maarten Lankhorst
2026-03-27 10:11 ` Ville Syrjälä
2026-04-01 16:19 ` Maarten Lankhorst
2026-04-01 17:44 ` Ville Syrjälä
2026-04-01 17:56 ` Ville Syrjälä
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=20260317220908.130968-2-jdsultan@google.com \
--to=jdsultan@google.com \
--cc=ddavenport@google.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=navaremanasi@google.com \
--cc=rajatja@google.com \
--cc=rodrigo.vivi@intel.com \
--cc=samjaco@google.com \
--cc=seanpaul@google.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