drm/i915: Don't oops if the initial modeset fails
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 10 Jan 2014 09:28:09 +0000 (11:28 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 24 Jan 2014 16:22:42 +0000 (17:22 +0100)
commit7d00a1f574842270515270ff27b86acde4e3d3c1
treed12c47fc9247f2508836bdc485aa3750df4991a7
parent2f2d7aa15499aaa8fb43c88f150e00923b0e0fee
drm/i915: Don't oops if the initial modeset fails

If the first modeset operation fails, we will attempt to restore the
previous configuration that we read out from the hardware. But as we
don't yet reconstruct the framebuffer information, we end up calling
the modeset code with an enabled crtc but with fb==NULL. This will
lead to an oops within the modeset code.

Check for NULL fb when restoring the configuration, and instead of
oopsing simply disable the pipe.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c