[Intel-gfx] [PATCH] Warn when inteldrmfb fails to restore its framebuffer config
Jesse Barnes
jbarnes at virtuousgeek.org
Thu Jun 11 21:36:53 CEST 2009
On Thu, 11 Jun 2009 00:44:26 -0400
Ben Gamari <bgamari.foss at gmail.com> wrote:
> 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 at gmail.com>
>
> ---
> drivers/gpu/drm/i915/intel_fb.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_fb.c
> b/drivers/gpu/drm/i915/intel_fb.c index 1e1aeb0..a7cf662 100644
> --- a/drivers/gpu/drm/i915/intel_fb.c
> +++ b/drivers/gpu/drm/i915/intel_fb.c
> @@ -854,7 +854,10 @@ 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_sysrq(int dummy1, struct tty_struct *dummy3)
Yeah, looks good. Really we want a fairly fail-free way of restoring
the mode at panic or lastclose time. That's a separate chunk of work
though.
Acked-by: Jesse Barnes <jbarnes at virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list