Commit 4b08eae5 authored by Rob Clark's avatar Rob Clark Committed by Daniel Vetter

drm/atomic: fix potential null ptr on plane enable

When a plane is being enabled, plane->crtc has not been set yet.  Use
plane->state->crtc.
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 4e0cd681
...@@ -61,7 +61,7 @@ drm_atomic_helper_plane_changed(struct drm_atomic_state *state, ...@@ -61,7 +61,7 @@ drm_atomic_helper_plane_changed(struct drm_atomic_state *state,
struct drm_crtc_state *crtc_state; struct drm_crtc_state *crtc_state;
if (plane->state->crtc) { if (plane->state->crtc) {
crtc_state = state->crtc_states[drm_crtc_index(plane->crtc)]; crtc_state = state->crtc_states[drm_crtc_index(plane->state->crtc)];
if (WARN_ON(!crtc_state)) if (WARN_ON(!crtc_state))
return; return;
......
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