drm/i915: Add a few more debugs for failed framebuffer creation
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 15 Feb 2023 22:24:26 +0000 (00:24 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 16 Feb 2023 20:10:53 +0000 (22:10 +0200)
Most of the .fb_create() failure paths are annotated but there
are a few that seem capable of failing silently (well, higher
level code should print something, just not anything actually
useful). Drop a few more hints into the log to aid in debugging.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230215222426.26085-2-ville.syrjala@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/i915/display/intel_fb.c

index 1ba052a..799bdc8 100644 (file)
@@ -2007,6 +2007,7 @@ int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 
                vm = intel_dpt_create(intel_fb);
                if (IS_ERR(vm)) {
+                       drm_dbg_kms(&dev_priv->drm, "failed to create DPT\n");
                        ret = PTR_ERR(vm);
                        goto err;
                }
@@ -2049,6 +2050,7 @@ intel_user_framebuffer_create(struct drm_device *dev,
        if (HAS_LMEM(i915) && !i915_gem_object_can_migrate(obj, INTEL_REGION_LMEM_0)) {
                /* object is "remote", not in local memory */
                i915_gem_object_put(obj);
+               drm_dbg_kms(&i915->drm, "framebuffer must reside in local memory\n");
                return ERR_PTR(-EREMOTE);
        }