When an atomic commit contains an active CRTC with no plane,
it may cause two potential issues:
First, this CRTC will fetch its last attached plane data
or has no data can be fetched depending on the plane
driver's atomic_disable() implementation.
Second, this CRTC's 'plane_changed' will be false during
the whole commit tail stage, and this will make vblank
wait to be bypassed which directly causes the later wait
flip done timeout.
So add this commit case check to the LCDIF CRTC's atomic
check to block this kind of commits.
Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit
e4b792704c1ed48296f135fdab47070c4987881b)
if (!state->enable)
return 0;
+ /* For the commit that the CRTC is active
+ * without planes attached to it should be
+ * invalid.
+ */
+ if (state->active && !state->plane_mask)
+ return -EINVAL;
+
/* check the requested bus format can be
* supported by LCDIF CTRC or not
*/