From: Ville Syrjälä <[email protected]>

Inform the poor sop reading the logs why the initial FB was rejected
if there is no stolen memory.

Technically this should perhaps be an error since the plane is known
to be enabled at this point, and if there is no stolen then it clearly
can't be scanning out from anywhere. But maybe there are some
virtualization passthrough cases and whatnot where we might not be
able to get access to stolen, so keep it as debug (same as i915).

Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Jani Nikula <[email protected]>
Link: 
https://patch.msgid.link/[email protected]
Signed-off-by: Maarten Lankhorst <[email protected]>
---
 drivers/gpu/drm/xe/display/xe_initial_plane.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/display/xe_initial_plane.c 
b/drivers/gpu/drm/xe/display/xe_initial_plane.c
index feb979cca12af..a62e5394c3f7d 100644
--- a/drivers/gpu/drm/xe/display/xe_initial_plane.c
+++ b/drivers/gpu/drm/xe/display/xe_initial_plane.c
@@ -68,10 +68,14 @@ 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 = 
ttm_manager_type(&xe->ttm, XE_PL_STOLEN);
+               struct ttm_resource_manager *stolen;
 
-               if (!stolen)
+               stolen = ttm_manager_type(&xe->ttm, XE_PL_STOLEN);
+               if (!stolen) {
+                       drm_dbg_kms(&xe->drm, "No stolen for initial FB\n");
                        return NULL;
+               }
+
                phys_base = base;
                flags |= XE_BO_FLAG_STOLEN;
 
-- 
2.53.0

Reply via email to