<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年04月06日 18:14, Tomeu Vizoso
wrote:<br>
</div>
<blockquote
cite="mid:1459937686-9142-1-git-send-email-tomeu.vizoso@collabora.com"
type="cite">
<pre wrap="">When a plane is being disabled but it's still enabled, do check if the
previous update has been completed by reading yrgb_mst back.
Otherwise, pending pageflips would remain pending after a CRTC is
disabled.
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_vop.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index a9b1e8b5ac85..f46b1fd1887b 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -1064,8 +1064,9 @@ static bool vop_win_pending_is_complete(struct vop_win *vop_win)
struct vop_plane_state *state = to_vop_plane_state(plane->state);
dma_addr_t yrgb_mst;
- if (!state->enable)
- return VOP_WIN_GET(vop_win->vop, vop_win->data, enable) == 0;
+ if (!state->enable &&
+ VOP_WIN_GET(vop_win->vop, vop_win->data, enable) == 0)
+ return true;</pre>
</blockquote>
<br>
It is wrong, the patch would cause a bug.<br>
<br>
when state->enable is 0, check yrgb_mst == state->yrgb_mst
always be true, because state->yrgb_mst not update on plane
disabled funtion, that would cause iommu crash.<br>
<br>
About pending pageflips would remain pending, can you
<meta http-equiv="content-type" content="text/html; charset=utf-8">
describe more info about it? I think those pending <span
style="color: rgb(51, 51, 51); font-family: arial; font-size:
13px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: 20.0200004577637px;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 1;
word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(255, 255, 255);"></span>pageflips
should be ignore when CRTC is disabled.<br>
<br>
Thanks.<br>
<br>
<blockquote
cite="mid:1459937686-9142-1-git-send-email-tomeu.vizoso@collabora.com"
type="cite">
<pre wrap="">
yrgb_mst = VOP_WIN_GET_YRGBADDR(vop_win->vop, vop_win->data);
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Mark Yao</pre>
</body>
</html>