MLK-19673-2: drm/imx/dcss: protect against concurent commits
authorLaurentiu Palcu <laurentiu.palcu@nxp.com>
Fri, 5 Oct 2018 13:06:35 +0000 (16:06 +0300)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commit381fc6e62ada8ff827838960981d745e4f1268e1
tree93c53c318eeb056dc27a1cf14e09698196b077f7
parent70126e04e6dc8be6f29483c949fd49899c448fc8
MLK-19673-2: drm/imx/dcss: protect against concurent commits

The current DCSS driver uses the generic drm_atomic_helper_commit().
But, this helper offers no protection against concurent commits by
userspace apps that may not wait for flip_done events.

This patch customizes the atomic_commit() callback by reusing the
drm_atomic_helper_commit() helper and adding a spinlock that will not
allow for another commit to go through if one is already pending.

Since we'll be calling the dcss_drm_atomic_commit_tail() ourselves,
there's no need for drm_mode_config_helper_funcs anymore. So, remove it.

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
drivers/gpu/drm/imx/dcss/dcss-crtc.c
drivers/gpu/drm/imx/dcss/dcss-kms.c
drivers/gpu/drm/imx/dcss/dcss-kms.h