aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/2492-drm-amd-display-Add-some-tm3dlut-flags.patch
blob: 9ea68cd19b019ac010b24f0518c8da24c83e1701 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
From fda11fe44583e1655fdbe037915721f92f0f2bc5 Mon Sep 17 00:00:00 2001
From: Vitaly Prosyak <vitaly.prosyak@amd.com>
Date: Tue, 26 Mar 2019 17:34:00 -0500
Subject: [PATCH 2492/2940] drm/amd/display: Add some tm3dlut flags

Move flags from color_gamma.h to mod_shared.h
and add more options and setting structures

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Acked-by: Vitaly Prosyak <Vitaly.Prosyak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 .../amd/display/modules/color/color_gamma.h   | 12 ------
 .../drm/amd/display/modules/inc/mod_shared.h  | 37 +++++++++++++++++++
 2 files changed, 37 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.h b/drivers/gpu/drm/amd/display/modules/color/color_gamma.h
index c56c203abfcb..369953fafadf 100644
--- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.h
+++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.h
@@ -82,18 +82,6 @@ struct freesync_hdr_tf_params {
 	unsigned int skip_tm; // skip tm
 };
 
-union tm3dlut_flags {
-	unsigned int raw;
-	struct {
-		unsigned int dochroma_scale			:1;
-		unsigned int spec_version			:3;
-		unsigned int less_than_dcip3			:1;
-		unsigned int exp_shaper_max			:6;
-		unsigned int zero_display_black			:1;
-		unsigned int reseved				:20;
-	} bits;
-};
-
 void setup_x_points_distribution(void);
 void precompute_pq(void);
 void precompute_de_pq(void);
diff --git a/drivers/gpu/drm/amd/display/modules/inc/mod_shared.h b/drivers/gpu/drm/amd/display/modules/inc/mod_shared.h
index b711e7e6c204..5a631854efda 100644
--- a/drivers/gpu/drm/amd/display/modules/inc/mod_shared.h
+++ b/drivers/gpu/drm/amd/display/modules/inc/mod_shared.h
@@ -45,5 +45,42 @@ enum vrr_packet_type {
 	PACKET_TYPE_VTEM
 };
 
+#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
+union tm3dlut_internal_flags {
+	unsigned int raw;
+	struct {
+		unsigned int dochroma_scale			:1;
+		unsigned int spec_version			:3;
+		unsigned int use_zero_display_black  :1;
+		unsigned int use_zero_source_black  :1;
+		unsigned int force_display_black		:6;
+		unsigned int apply_display_gamma	:1;
+		unsigned int exp_shaper_max			:6;
+		unsigned int unity3dlut				:1;
+		unsigned int bypass3dlut			:1;
+		unsigned int use3dlut				:1;
+		unsigned int less_than_dcip3		:1;
+		unsigned int override_lum			:1;
+		unsigned int reseved				:8;
+	} bits;
+};
+
+enum tm_show_option_internal {
+	tm_show_option_internal_single_file		= 0,/*flags2 not in use*/
+	tm_show_option_internal_duplicate_file,/*use flags2*/
+	tm_show_option_internal_duplicate_sidebyside/*use flags2*/
+};
+
+struct tm3dlut_settings {
+	unsigned char version;
+	union tm3dlut_internal_flags flags;
+	union tm3dlut_internal_flags flags2;
+	enum tm_show_option_internal option;
+	unsigned int min_lum;/*multiplied by 100*/
+	unsigned int max_lum;
+	unsigned int min_lum2;
+	unsigned int max_lum2;
+};
+#endif
 
 #endif /* MOD_SHARED_H_ */
-- 
2.17.1