[Intel-gfx] [PATCH 1/2] drm/i915/fbdev: print error in case drm_fb_helper_initial_config fails

Andrzej Hajda andrzej.hajda at intel.com
Wed May 4 11:48:07 UTC 2022


On some configurations drm_fb_helper_initial_config sometimes fails.
Logging error value should help debugging such issues.

Signed-off-by: Andrzej Hajda <andrzej.hajda at intel.com>
---
 drivers/gpu/drm/i915/display/intel_fbdev.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
index 221336178991f0..557c7f15ac22a9 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
@@ -539,11 +539,16 @@ int intel_fbdev_init(struct drm_device *dev)
 static void intel_fbdev_initial_config(void *data, async_cookie_t cookie)
 {
 	struct intel_fbdev *ifbdev = data;
+	int ret;
 
 	/* Due to peculiar init order wrt to hpd handling this is separate. */
-	if (drm_fb_helper_initial_config(&ifbdev->helper,
-					 ifbdev->preferred_bpp))
-		intel_fbdev_unregister(to_i915(ifbdev->helper.dev));
+	ret = drm_fb_helper_initial_config(&ifbdev->helper,
+					   ifbdev->preferred_bpp);
+	if (!ret)
+		return;
+	drm_err(ifbdev->helper.dev, "failed to set initial configuration: %pe\n",
+		ERR_PTR(ret));
+	intel_fbdev_unregister(to_i915(ifbdev->helper.dev));
 }
 
 void intel_fbdev_initial_config_async(struct drm_device *dev)
-- 
2.25.1



More information about the Intel-gfx mailing list