]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/i915: Warn when inteldrmfb fails to restore its framebuffer config
authorBen Gamari <bgamari.foss@gmail.com>
Thu, 11 Jun 2009 04:44:26 +0000 (00:44 -0400)
committerEric Anholt <eric@anholt.net>
Wed, 17 Jun 2009 21:22:47 +0000 (14:22 -0700)
While sifting through the inteldrmfb code trying to solve #22040 I found that
the fb restore path doesn't check the return value of
drm_crtc_helper_set_config(), which seems to have all sorts of potential
failure modes. We should warn someone if one of these is triggered.

Signed-Off-By: Ben Gamari <bgamari.foss@gmail.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
[anholt: hand-applied, failures are mine]
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/intel_fb.c

index 8e28e5993df5b5607896db9c8c30a226faf1790d..1af7d68e380756f3f785551cb9c8a4c38da8604a 100644 (file)
@@ -870,7 +870,11 @@ static int intelfb_single_fb_probe(struct drm_device *dev)
  */
 void intelfb_restore(void)
 {
-       drm_crtc_helper_set_config(&kernelfb_mode);
+       int ret;
+       if ((ret = drm_crtc_helper_set_config(&kernelfb_mode)) != 0) {
+               printk(KERN_ERR "Failed to restore crtc configuration: %d\n",
+                      ret);
+       }
 }
 
 static void intelfb_restore_work_fn(struct work_struct *ignored)