[PATCH] drm/exynos: fimd: fix screen shaking issue on i80 mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch resolves a issue that screen is shaked after resumed.

The issue could be incurred when overlay registers are updated to
new buffer while fimd is still transmitting video data.

So this patch make sure to wait for the completion of the transmission
if fimd is transmitting video data before updating overlay registers.

Signed-off-by: Inki Dae <inki.dae@xxxxxxxxxxx>
---
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 2f896df..8a45a70 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -665,6 +665,25 @@ static void fimd_win_commit(struct exynos_drm_manager *mgr, int zpos)
 	}
 
 	/*
+	 * Wait for the completion of current transmission if fimd is still
+	 * transmitting video data.
+	 *
+	 * Below codes resolve following issue:
+	 * when resumed, fimd_win_commit() could be called to update overlay
+	 * relevent registers and then pae flip could be performed by userspace
+	 * request. The problem is that te interrupt could occur and
+	 * fimd_trigger() could be called before fimd_win_commit is called by
+	 * page flip function, exynos_drm_crtc_page_flip.
+	 *
+	 * In this case, there is a problem that fimd_win_commit() is called by
+	 * the page flip request while fimd is still transmitting video data
+	 * so overlay registers are updated to new buffer. That makes screen
+	 * to be shaked.
+	 */
+	if (ctx->i80_if && atomic_read(&ctx->triggering))
+		fimd_wait_for_vblank(mgr);
+
+	/*
 	 * SHADOWCON/PRTCON register is used for enabling timing.
 	 *
 	 * for example, once only width value of a register is set,
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux