[PATCH v3 01/12] drm/xe/display: Handle stolen bar readout in the same way as lmem

Lucas De Marchi lucas.demarchi at intel.com
Mon Oct 7 18:52:16 UTC 2024


On Thu, Oct 03, 2024 at 05:44:10PM +0200, Maarten Lankhorst wrote:
>i915 already does this, we should do the same for Xe.
>
>Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
>---
> drivers/gpu/drm/xe/display/xe_plane_initial.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/display/xe_plane_initial.c b/drivers/gpu/drm/xe/display/xe_plane_initial.c
>index 1b10ea499d8c8..cf139921e7817 100644
>--- a/drivers/gpu/drm/xe/display/xe_plane_initial.c
>+++ b/drivers/gpu/drm/xe/display/xe_plane_initial.c
>@@ -69,7 +69,7 @@ initial_plane_bo(struct xe_device *xe,
> 	flags = XE_BO_FLAG_PINNED | XE_BO_FLAG_SCANOUT | XE_BO_FLAG_GGTT;
>
> 	base = round_down(plane_config->base, page_size);
>-	if (IS_DGFX(xe)) {
>+	if (IS_DGFX(xe) || GRAPHICS_VERx100(xe) >= 1270) {

and with this you just dropped Wa 22019338487 from e.g. LNL.

Also, making igfx going through this path is very odd when it has checks
like phys_base >= mem.vram.usable_size

Lucas De Marchi

> 		u64 __iomem *gte = tile0->mem.ggtt->gsm;
> 		u64 pte;
>
>@@ -83,7 +83,6 @@ initial_plane_bo(struct xe_device *xe,
> 		}
>
> 		phys_base = pte & ~(page_size - 1);
>-		flags |= XE_BO_FLAG_VRAM0;
>
> 		/*
> 		 * We don't currently expect this to ever be placed in the
>@@ -105,7 +104,6 @@ initial_plane_bo(struct xe_device *xe,
> 		if (!stolen)
> 			return NULL;
> 		phys_base = base;
>-		flags |= XE_BO_FLAG_STOLEN;
>
> 		if (XE_WA(xe_root_mmio_gt(xe), 22019338487_display))
> 			return NULL;
>@@ -120,6 +118,11 @@ initial_plane_bo(struct xe_device *xe,
> 			return NULL;
> 	}
>
>+	if (IS_DGFX(xe))
>+		flags |= XE_BO_FLAG_VRAM0;
>+	else
>+		flags |= XE_BO_FLAG_STOLEN;
>+
> 	size = round_up(plane_config->base + plane_config->size,
> 			page_size);
> 	size -= base;
>-- 
>2.45.2
>


More information about the Intel-xe mailing list