drm/i915: Avoid drm_atomic_state_put(NULL) in intel_display_resume
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 15 Jan 2017 12:58:25 +0000 (12:58 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 18 Jan 2017 11:40:01 +0000 (11:40 +0000)
commit3c5e37f169cb67cbd03c6116fbc93e0805815d29
tree778510a262839d28be9153a1ddefafe6caf2b549
parent71895a085879d7bc490611994c7efb156162f33d
drm/i915: Avoid drm_atomic_state_put(NULL) in intel_display_resume

intel_display_resume() may be called without an atomic state to restore,
i.e. dev_priv->modeset_reset_restore state is NULL. One such case is
following a lid open/close event and the forced modeset in
intel_lid_notify().

Reported-by: Stefan Seyfried <stefan.seyfried@googlemail.com>
Tested-by: Stefan Seyfried <stefan.seyfried@googlemail.com>
Fixes: 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.10-rc1+
Link: http://patchwork.freedesktop.org/patch/msgid/20170115125825.18597-1-chris@chris-wilson.co.uk
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
drivers/gpu/drm/i915/intel_display.c