We should return properly in case we fail to get plane state to check.
For example, a race condition on the plane state would happen when one
thread does page flip and another thread updates CRTC properties on
that CRTC simultaneously. '-EDEADLK' should be returned when the
condition occurs.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit
2ab36051b74c49f66bb12d8d8086e6e6b3dc069b)
drm_for_each_plane_mask(plane, dev, crtc_state->plane_mask) {
plane_state = drm_atomic_get_plane_state(state, plane);
+ if (IS_ERR(plane_state))
+ return PTR_ERR(plane_state);
+
dpstate = to_dpu_plane_state(plane_state);
fb = plane_state->fb;
dpu_plane = to_dpu_plane(plane);