Skip to content

Commit

Permalink
drm/i915: Warn when inteldrmfb fails to restore its framebuffer config
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Gamari authored and Eric Anholt committed Jun 17, 2009
1 parent 3fe0344 commit 049b77c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/gpu/drm/i915/intel_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 049b77c

Please sign in to comment.