Commit 20c68127 authored by Nirmoy Das's avatar Nirmoy Das Committed by Matthew Auld

drm/i915: Print return value on error

Print returned error code for better debuggability.

References: https://gitlab.freedesktop.org/drm/intel/-/issues/7211Signed-off-by: default avatarNirmoy Das <nirmoy.das@intel.com>
Reviewed-by: default avatarAndrzej Hajda <andrzej.hajda@intel.com>
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221014154655.14075-1-nirmoy.das@intel.com
parent 66eb93e7
...@@ -175,7 +175,7 @@ static int intelfb_alloc(struct drm_fb_helper *helper, ...@@ -175,7 +175,7 @@ static int intelfb_alloc(struct drm_fb_helper *helper,
} }
if (IS_ERR(obj)) { if (IS_ERR(obj)) {
drm_err(&dev_priv->drm, "failed to allocate framebuffer\n"); drm_err(&dev_priv->drm, "failed to allocate framebuffer (%pe)\n", obj);
return PTR_ERR(obj); return PTR_ERR(obj);
} }
...@@ -256,7 +256,7 @@ static int intelfb_create(struct drm_fb_helper *helper, ...@@ -256,7 +256,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
info = drm_fb_helper_alloc_fbi(helper); info = drm_fb_helper_alloc_fbi(helper);
if (IS_ERR(info)) { if (IS_ERR(info)) {
drm_err(&dev_priv->drm, "Failed to allocate fb_info\n"); drm_err(&dev_priv->drm, "Failed to allocate fb_info (%pe)\n", info);
ret = PTR_ERR(info); ret = PTR_ERR(info);
goto out_unpin; goto out_unpin;
} }
...@@ -291,7 +291,7 @@ static int intelfb_create(struct drm_fb_helper *helper, ...@@ -291,7 +291,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
vaddr = i915_vma_pin_iomap(vma); vaddr = i915_vma_pin_iomap(vma);
if (IS_ERR(vaddr)) { if (IS_ERR(vaddr)) {
drm_err(&dev_priv->drm, drm_err(&dev_priv->drm,
"Failed to remap framebuffer into virtual memory\n"); "Failed to remap framebuffer into virtual memory (%pe)\n", vaddr);
ret = PTR_ERR(vaddr); ret = PTR_ERR(vaddr);
goto out_unpin; goto out_unpin;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment