<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 2016年03月31日 16:08, Tomeu Vizoso
wrote:<br>
</div>
<blockquote
cite="mid:1459411680-6176-1-git-send-email-tomeu.vizoso@collabora.com"
type="cite">
<pre wrap="">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 <a class="moz-txt-link-rfc2396E" href="mailto:tomeu.vizoso@collabora.com"><tomeu.vizoso@collabora.com></a>
---
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;
+</pre>
</blockquote>
<br>
Sorry for reply late.<br>
<br>
There is a comment on work_busy function describe
<meta http-equiv="content-type" content="text/html; charset=utf-8">
:<br>
<br>
"the test result is unreliable and only useful as advisory
hints or for debugging."<br>
<br>
I don't know if it's suitable to use it here, does some guys know
it?<br>
<br>
And then, the "flush_work(&commit->work);" is no needed if
return -EBUSY here.<br>
you can remove it at this patch.<br>
<br>
<br>
<blockquote
cite="mid:1459411680-6176-1-git-send-email-tomeu.vizoso@collabora.com"
type="cite">
<pre wrap="">
ret = drm_atomic_helper_prepare_planes(dev, state);
if (ret)
return ret;
</pre>
</blockquote>
<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
Mark Yao</pre>
</body>
</html>