drm/atomic: fix potential null ptr on plane enable
Subsystems (2)
PATCH 1/1 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.
---
Looks like this is still missing on drm-next.. I probably forgot to send it earlier.
drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_atomic_helper.c +1 -1
@@ -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 ;
Signature · 6 lines
1.9.3 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines · Rob Clark
When a plane is being enabled,
plane->crtchas not been set yet. Useplane->state->crtc.
Quoted 25 lines
Signed-off-by Rob Clark <[email protected]>---
Looks like this is still missing on drm-next.. I probably forgot to send it earlier.drivers/gpu/drm/drm_atomic_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/drm_atomic_helper.c +1
-2@@ -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 ; --1.9.3
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter
AppliedQuoted 7 lines · Sean Paul
Quoted 4 lines · Rob Clark
When a plane is being enabled,
plane->crtchas not been set yet. Useplane->state->crtc.Reviewed-by Sean Paul <[email protected]>
Merged to topic/atomic-core, thanks.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel