public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/rockchip: Return -EBUSY if there's already a pending flip event v2
@ 2016-03-31  8:08 Tomeu Vizoso
       [not found] ` <56FE5AE9.40806@rock-chips.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Tomeu Vizoso @ 2016-03-31  8:08 UTC (permalink / raw)
  To: linux-kernel
  Cc: Tomeu Vizoso, Mark Yao, David Airlie, Heiko Stuebner, dri-devel,
	linux-arm-kernel, linux-rockchip

As per the docs, atomic_commit should return -EBUSY "if an asycnhronous
updated is requested and there is an earlier updated pending".

v2: Use the status of the workqueue instead of vop->event, and don't add
a superfluous wait on the workqueue.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---
 drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
index 3b8f652698f8..285f8cd5afe1 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
@@ -282,6 +282,9 @@ int rockchip_drm_atomic_commit(struct drm_device *dev,
 	struct rockchip_atomic_commit *commit = &private->commit;
 	int ret;
 
+	if (async && work_busy(&commit->work))
+		return -EBUSY;
+
 	ret = drm_atomic_helper_prepare_planes(dev, state);
 	if (ret)
 		return ret;
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-01 11:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-31  8:08 [PATCH] drm/rockchip: Return -EBUSY if there's already a pending flip event v2 Tomeu Vizoso
     [not found] ` <56FE5AE9.40806@rock-chips.com>
2016-04-01 11:47   ` Tomeu Vizoso
2016-04-01 11:54     ` Mark yao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox