drm/i915: Print return value on error
authorjsg <jsg@openbsd.org>
Fri, 31 Mar 2023 01:38:10 +0000 (01:38 +0000)
committerjsg <jsg@openbsd.org>
Fri, 31 Mar 2023 01:38:10 +0000 (01:38 +0000)
From Nirmoy Das
b6375c5ecd8c790e381ee3f9baeda8c9e5da4a45 in linux-6.1.y/6.1.22
20c68127e8e9d7899001c47465d0b79581f5fdc1 in mainline linux

sys/dev/pci/drm/i915/display/intel_fbdev.c

index e979426..de32600 100644 (file)
@@ -179,7 +179,7 @@ static int intelfb_alloc(struct drm_fb_helper *helper,
        }
 
        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);
        }
 
@@ -260,7 +260,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
 
        info = drm_fb_helper_alloc_fbi(helper);
        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);
                goto out_unpin;
        }
@@ -296,7 +296,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
        vaddr = i915_vma_pin_iomap(vma);
        if (IS_ERR(vaddr)) {
                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);
                goto out_unpin;
        }