hc
2023-11-06 e3e12f52b214121840b44c91de5b3e5af5d3eb84
kernel/drivers/gpu/drm/rockchip/rockchip_drm_drv.h
....@@ -115,6 +115,37 @@
115115 int cos_hue;
116116 };
117117
118
+#define ACM_GAIN_LUT_HY_LENGTH (9*17)
119
+#define ACM_GAIN_LUT_HY_TOTAL_LENGTH (ACM_GAIN_LUT_HY_LENGTH * 3)
120
+#define ACM_GAIN_LUT_HS_LENGTH (13*17)
121
+#define ACM_GAIN_LUT_HS_TOTAL_LENGTH (ACM_GAIN_LUT_HS_LENGTH * 3)
122
+#define ACM_DELTA_LUT_H_LENGTH 65
123
+#define ACM_DELTA_LUT_H_TOTAL_LENGTH (ACM_DELTA_LUT_H_LENGTH * 3)
124
+
125
+struct post_acm {
126
+ s16 delta_lut_h[ACM_DELTA_LUT_H_TOTAL_LENGTH];
127
+ s16 gain_lut_hy[ACM_GAIN_LUT_HY_TOTAL_LENGTH];
128
+ s16 gain_lut_hs[ACM_GAIN_LUT_HS_TOTAL_LENGTH];
129
+ u16 y_gain;
130
+ u16 h_gain;
131
+ u16 s_gain;
132
+ u16 acm_enable;
133
+};
134
+
135
+struct post_csc {
136
+ u16 hue;
137
+ u16 saturation;
138
+ u16 contrast;
139
+ u16 brightness;
140
+ u16 r_gain;
141
+ u16 g_gain;
142
+ u16 b_gain;
143
+ u16 r_offset;
144
+ u16 g_offset;
145
+ u16 b_offset;
146
+ u16 csc_enable;
147
+};
148
+
118149 #define VOP_OUTPUT_IF_RGB BIT(0)
119150 #define VOP_OUTPUT_IF_BT1120 BIT(1)
120151 #define VOP_OUTPUT_IF_BT656 BIT(2)
....@@ -128,6 +159,7 @@
128159 #define VOP_OUTPUT_IF_DP1 BIT(10)
129160 #define VOP_OUTPUT_IF_HDMI0 BIT(11)
130161 #define VOP_OUTPUT_IF_HDMI1 BIT(12)
162
+#define VOP_OUTPUT_IF_TV BIT(13)
131163
132164 struct rockchip_crtc_state {
133165 struct drm_crtc_state base;
....@@ -181,6 +213,9 @@
181213 u32 line_flag;
182214 u8 mode_update;
183215 struct rockchip_hdr_state hdr;
216
+ struct drm_property_blob *hdr_ext_data;
217
+ struct drm_property_blob *acm_lut_data;
218
+ struct drm_property_blob *post_csc_data;
184219 };
185220 #define to_rockchip_crtc_state(s) \
186221 container_of(s, struct rockchip_crtc_state, base)