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: Rob Clark <robdclark@gmail.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
4e0cd68115
commit
4b08eae52f
|
@ -61,7 +61,7 @@ drm_atomic_helper_plane_changed(struct drm_atomic_state *state,
|
|||
struct drm_crtc_state *crtc_state;
|
||||
|
||||
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))
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue