aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0125-drm-amd-display-Handle-HDR-meta-update-as-fast-updat.patch
blob: 58635e4fedddbd9f96170081eb37bdf5e13163a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From 77fdc2f1f0b07cdd4f02a5e538a84cc7a2d64532 Mon Sep 17 00:00:00 2001
From: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Date: Thu, 5 Jul 2018 19:23:17 -0400
Subject: [PATCH 0125/2940] drm/amd/display: Handle HDR meta update as fast
 update

[Why]
Vesa DPMS tool sends different HDR meta in OS flips without changing output
parameters. We don't properly update HDR info frame:
- we label HDR meta update as fast update
- when updating HW info frame, we only do it if full update

[How]
It should still be fast update, so when doing HW infoframe update,
do it always no matter the update type.
Also, don't request passive flip for HDR meta update only without output
transfer function or color space changed.

Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index c5453f13d149..d580ae1aa75d 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1366,6 +1366,13 @@ static void commit_planes_do_stream_update(struct dc *dc,
 					pipe_ctx->stream_res.tg, &pipe_ctx->stream->timing,
 					pipe_ctx->stream->periodic_fn_vsync_delta);
 
+			if (stream_update->hdr_static_metadata ||
+					stream_update->vrr_infopacket ||
+					stream_update->vsc_infopacket) {
+				resource_build_info_frame(pipe_ctx);
+				dc->hwss.update_info_frame(pipe_ctx);
+			}
+
 			/* Full fe update*/
 			if (update_type == UPDATE_TYPE_FAST)
 				continue;
@@ -1392,13 +1399,6 @@ static void commit_planes_do_stream_update(struct dc *dc,
 					pipe_ctx->stream_res.abm->funcs->set_abm_level(
 						pipe_ctx->stream_res.abm, stream->abm_level);
 			}
-
-			if (stream_update->hdr_static_metadata ||
-				stream_update->vrr_infopacket ||
-				stream_update->vsc_infopacket) {
-				resource_build_info_frame(pipe_ctx);
-				dc->hwss.update_info_frame(pipe_ctx);
-			}
 		}
 	}
 }
-- 
2.17.1