[PATCH] drm/xe/fbdev: Limit the usage of stolen for LNL+
Shankar, Uma
uma.shankar at intel.com
Sun Jul 14 19:41:23 UTC 2024
> -----Original Message-----
> From: De Marchi, Lucas <lucas.demarchi at intel.com>
> Sent: Thursday, July 11, 2024 10:02 PM
> To: Shankar, Uma <uma.shankar at intel.com>
> Cc: intel-gfx at lists.freedesktop.org; intel-xe at lists.freedesktop.org;
> ville.syrjala at linux.intel.com; Ceraolo Spurio, Daniele
> <daniele.ceraolospurio at intel.com>; Belgaumkar, Vinay
> <vinay.belgaumkar at intel.com>
> Subject: Re: [PATCH] drm/xe/fbdev: Limit the usage of stolen for LNL+
>
> On Thu, Jul 11, 2024 at 10:43:39AM GMT, Uma Shankar wrote:
> >As per recommendation in the workarounds:
> >WA_14021987551, Wa_16023588340:
> >
> >There is an issue with accessing Stolen memory pages due a hardware
> >limitation. Limit the usage of stolen memory for fbdev for LNL+. Don't
> >use BIOS FB from stolen on LNL+ and assign the same from system memory.
> >
> >Signed-off-by: Uma Shankar <uma.shankar at intel.com>
> >---
> > drivers/gpu/drm/xe/display/intel_fbdev_fb.c | 10 +++++++++-
> > drivers/gpu/drm/xe/display/xe_plane_initial.c | 10 ++++++++++
> > 2 files changed, 19 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/gpu/drm/xe/display/intel_fbdev_fb.c
> >b/drivers/gpu/drm/xe/display/intel_fbdev_fb.c
> >index 816ad13821a8..8fda8745ce0a 100644
> >--- a/drivers/gpu/drm/xe/display/intel_fbdev_fb.c
> >+++ b/drivers/gpu/drm/xe/display/intel_fbdev_fb.c
> >@@ -37,7 +37,14 @@ struct intel_framebuffer *intel_fbdev_fb_alloc(struct
> drm_fb_helper *helper,
> > size = PAGE_ALIGN(size);
> > obj = ERR_PTR(-ENODEV);
> >
> >- if (!IS_DGFX(xe)) {
> >+ /*
> >+ * WA_14021987551, Wa_16023588340:
>
> not the proper way to handle WAs in xe. Please use XE_WA()
Sure Lucas, will update the patch.
>
> >+ * There is an issue with accessing Stolen memory pages
> >+ * due a hardware limitation. Limit the usage of stolen
> >+ * memory for fbdev for LNL+. Don't use BIOS FB from
> >+ * stolen on LNL+ and assign the same from system memory
>
> I wonder if we can't simply set to 0 the available stolen space after the places
> that really need it already had their allocation done.
We will need it for FBC, so making it all 0 will not be good.
> >+ */
> >+ if (!IS_DGFX(xe) && (DISPLAY_VER(xe) < 20)) {
>
> extra parenthesis not needed and I think the rule to be added in xe_wa_oob.rules
> would be about GRAPHICS_VERSION(2004) or
> PLATFORM(LUNARLAKE) to avoid this propagating to future platforms.
>
Yeah got it, will change to GRPAHICS_VERSION and restrict it to LNL.
> > obj = xe_bo_create_pin_map(xe, xe_device_get_root_tile(xe),
> > NULL, size,
> > ttm_bo_type_kernel,
> XE_BO_FLAG_SCANOUT | @@ -48,6 +55,7 @@
> >struct intel_framebuffer *intel_fbdev_fb_alloc(struct drm_fb_helper *helper,
> > else
> > drm_info(&xe->drm, "Allocated fbdev into stolen failed:
> %li\n", PTR_ERR(obj));
> > }
> >+
> > if (IS_ERR(obj)) {
> > obj = xe_bo_create_pin_map(xe, xe_device_get_root_tile(xe),
> NULL, size,
> > ttm_bo_type_kernel,
> XE_BO_FLAG_SCANOUT | diff --git
> >a/drivers/gpu/drm/xe/display/xe_plane_initial.c
> >b/drivers/gpu/drm/xe/display/xe_plane_initial.c
> >index 5eccd6abb3ef..80dd6b64c921 100644
> >--- a/drivers/gpu/drm/xe/display/xe_plane_initial.c
> >+++ b/drivers/gpu/drm/xe/display/xe_plane_initial.c
> >@@ -104,6 +104,16 @@ initial_plane_bo(struct xe_device *xe,
> > phys_base = base;
> > flags |= XE_BO_FLAG_STOLEN;
> >
> >+ /*
> >+ * WA_14021987551, Wa_16023588340:
> >+ * There is an issue with accessing Stolen memory pages
> >+ * due a hardware limitation. Limit the usage of stolen
> >+ * memory for fbdev for LNL+. Don't use BIOS FB from
> >+ * stolen on LNL+ and assign the same from system memory
> >+ */
> >+ if (DISPLAY_VER(xe) >= 20)
> >+ return NULL;
>
> same as above
>
> Lucas De Marchi
>
> >+
> > /*
> > * 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
> >--
> >2.42.0
> >
More information about the Intel-gfx
mailing list