The code originally assumed there was a 1:1 mapping between
stolen and GGTT offset. This is no longer true as of MTL, so
perform the correct calculations, similar to how they're
performed for the DGFX case.

Reported-by: Ville Syrjälä <[email protected]>
Signed-off-by: Maarten Lankhorst <[email protected]>
---
 drivers/gpu/drm/xe/display/xe_initial_plane.c | 2 +-
 1 file changed, 1 insertion(+), 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 f49dda8e28255..5540b0fca392a 100644
--- a/drivers/gpu/drm/xe/display/xe_initial_plane.c
+++ b/drivers/gpu/drm/xe/display/xe_initial_plane.c
@@ -120,7 +120,7 @@ initial_plane_bo(struct xe_device *xe,
                        return NULL;
                }
 
-               phys_base = base;
+               phys_base = (pte & ~(page_size - 1)) - 
xe_ttm_stolen_gpu_offset(xe);
                flags |= XE_BO_FLAG_STOLEN;
 
                if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) &&
-- 
2.53.0

Reply via email to