]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.9.68/drm-exynos-decon5433-update-shadow-registers-iff-there-are-active-windows.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.9.68 / drm-exynos-decon5433-update-shadow-registers-iff-there-are-active-windows.patch
CommitLineData
95244f99
GKH
1From foo@baz Wed Dec 6 17:39:55 CET 2017
2From: Andrzej Hajda <a.hajda@samsung.com>
3Date: Mon, 9 Jan 2017 15:33:02 +0100
4Subject: drm/exynos/decon5433: update shadow registers iff there are active windows
5
6From: Andrzej Hajda <a.hajda@samsung.com>
7
8
9[ Upstream commit f65a7c9cb3770ed4d3e7c57c66d7032689081b5e ]
10
11Improper usage of DECON_UPDATE register leads to subtle errors.
12If it set in decon_commit when there are no active windows it results
13in slow registry updates - all subsequent shadow registry updates takes more
14than full vblank. On the other side if it is not set when there are
15active windows it results in garbage on the screen after suspend/resume of
16FB console.
17
18The patch hopefully fixes it.
19
20Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
21Signed-off-by: Inki Dae <inki.dae@samsung.com>
22Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24---
25 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 7 +++----
26 1 file changed, 3 insertions(+), 4 deletions(-)
27
28--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
29+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
30@@ -188,8 +188,6 @@ static void decon_commit(struct exynos_d
31
32 /* enable output and display signal */
33 decon_set_bits(ctx, DECON_VIDCON0, VIDCON0_ENVID | VIDCON0_ENVID_F, ~0);
34-
35- decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0);
36 }
37
38 static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,
39@@ -340,8 +338,9 @@ static void decon_atomic_flush(struct ex
40 for (i = ctx->first_win; i < WINDOWS_NR; i++)
41 decon_shadow_protect_win(ctx, i, false);
42
43- /* standalone update */
44- decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0);
45+ /* update iff there are active windows */
46+ if (crtc->base.state->plane_mask)
47+ decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0);
48
49 if (ctx->out_type & IFTYPE_I80)
50 set_bit(BIT_WIN_UPDATED, &ctx->flags);