MLK-19673-1: drm/imx/core: add a workqueue and a commit object
This change adds a workqueue and a commit object that can be used by the
drivers to protect pending commits (non-blocking ones) from concurent
commits using legacy API (for example).
A non-blocking commit will defer the work to a workqueue and it may wait
for fences to be cleared. Waiting for fences to be cleared is
interruptible. Hence, if a SETPLANE IOCTL is performed (to disable a
plane), it may preempt the current commit and will mess up the atomic
states. When the legacy calls finish, the non-blocking commit worker
will resume, but the crtc and/or FBs of some planes are already NULL.
Hence, the non-blocking commit will crash in
drm_atomic_helper_commit_planes() with NULL pointer dereference.
This particular patch does not affect existing drivers in any way.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
CC: Ying Liu <victor.liu@nxp.com>
CC: Fancy Fang <chen.fang@nxp.com>