Commit b7867159 authored by Chris Wilson's avatar Chris Wilson Committed by Jani Nikula

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: default avatarStefan Seyfried <stefan.seyfried@googlemail.com>
Tested-by: default avatarStefan Seyfried <stefan.seyfried@googlemail.com>
Fixes: 0853695c ("drm: Add reference counting to drm_atomic_state")
Signed-off-by: default avatarChris 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.ukReviewed-by: default avatarAnder Conselvan de Oliveira <conselvan2@gmail.com>
(cherry picked from commit 3c5e37f1)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 3bfdfdcb
...@@ -17027,6 +17027,7 @@ void intel_display_resume(struct drm_device *dev) ...@@ -17027,6 +17027,7 @@ void intel_display_resume(struct drm_device *dev)
if (ret) if (ret)
DRM_ERROR("Restoring old state failed with %i\n", ret); DRM_ERROR("Restoring old state failed with %i\n", ret);
if (state)
drm_atomic_state_put(state); drm_atomic_state_put(state);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment