If stolen memory cannot be allocated for the fbdev and initial plane
bo because of the preference for fbc, have an info about that in
the log.

Signed-off-by: Vinod Govindapillai <[email protected]>
---
 drivers/gpu/drm/xe/display/intel_fbdev_fb.c   | 2 ++
 drivers/gpu/drm/xe/display/xe_initial_plane.c | 4 +++-
 2 files changed, 5 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 b713d101953f..f605998c74fd 100644
--- a/drivers/gpu/drm/xe/display/intel_fbdev_fb.c
+++ b/drivers/gpu/drm/xe/display/intel_fbdev_fb.c
@@ -65,6 +65,8 @@ struct drm_gem_object *intel_fbdev_fb_bo_create(struct 
drm_device *drm, int size
                        drm_info(&xe->drm, "Allocated fbdev into stolen\n");
                else
                        drm_info(&xe->drm, "Allocated fbdev into stolen failed: 
%li\n", PTR_ERR(obj));
+       } else {
+               drm_info(&xe->drm, "Stolen memory is not preferred for the 
fbdev.\n");
        }
 
        if (IS_ERR(obj)) {
diff --git a/drivers/gpu/drm/xe/display/xe_initial_plane.c 
b/drivers/gpu/drm/xe/display/xe_initial_plane.c
index 28b612bf21d2..1caef978c76b 100644
--- a/drivers/gpu/drm/xe/display/xe_initial_plane.c
+++ b/drivers/gpu/drm/xe/display/xe_initial_plane.c
@@ -92,8 +92,10 @@ initial_plane_bo(struct xe_device *xe,
                flags |= XE_BO_FLAG_STOLEN;
 
                if (IS_ENABLED(CONFIG_FRAMEBUFFER_CONSOLE) &&
-                   !intel_fbdev_fb_prefer_stolen(xe->display, 
plane_config->size))
+                   !intel_fbdev_fb_prefer_stolen(xe->display, 
plane_config->size)) {
+                       drm_info(&xe->drm, "Stolen memory is not preferred for 
the initial plane bo.\n");
                        return NULL;
+               }
        }
 
        size = round_up(plane_config->base + plane_config->size,
-- 
2.43.0

Reply via email to