aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Keeping <john@metanate.com>2016-01-19 05:47:00 -0500
committerMark Yao <mark.yao@rock-chips.com>2016-01-19 19:56:06 -0500
commitc9ad1d9946e849ac3d8821d91e136d7fd728dec5 (patch)
tree55bdf59e04f94c426173e8fea79674c6c10596de
parentf2227f469782e55765deacb8ebcc7ec05fe04013 (diff)
drm/rockchip: explain why we can't wait_for_vblanks
Signed-off-by: John Keeping <john@metanate.com>
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_drm_fb.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
index 87c77c4b5e50..3b8f652698f8 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
@@ -176,6 +176,21 @@ static void rockchip_crtc_wait_for_update(struct drm_crtc *crtc)
176 crtc_funcs->wait_for_update(crtc); 176 crtc_funcs->wait_for_update(crtc);
177} 177}
178 178
179/*
180 * We can't use drm_atomic_helper_wait_for_vblanks() because rk3288 and rk3066
181 * have hardware counters for neither vblanks nor scanlines, which results in
182 * a race where:
183 * | <-- HW vsync irq and reg take effect
184 * plane_commit --> |
185 * get_vblank and wait --> |
186 * | <-- handle_vblank, vblank->count + 1
187 * cleanup_fb --> |
188 * iommu crash --> |
189 * | <-- HW vsync irq and reg take effect
190 *
191 * This function is equivalent but uses rockchip_crtc_wait_for_update() instead
192 * of waiting for vblank_count to change.
193 */
179static void 194static void
180rockchip_atomic_wait_for_complete(struct drm_device *dev, struct drm_atomic_state *old_state) 195rockchip_atomic_wait_for_complete(struct drm_device *dev, struct drm_atomic_state *old_state)
181{ 196{