hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h
....@@ -52,11 +52,31 @@
5252 DP_COMPONENT_PIXEL_DEPTH_16BPC = 0x00000004
5353 };
5454
55
+struct audio_clock_info {
56
+ /* pixel clock frequency*/
57
+ uint32_t pixel_clock_in_10khz;
58
+ /* N - 32KHz audio */
59
+ uint32_t n_32khz;
60
+ /* CTS - 32KHz audio*/
61
+ uint32_t cts_32khz;
62
+ uint32_t n_44khz;
63
+ uint32_t cts_44khz;
64
+ uint32_t n_48khz;
65
+ uint32_t cts_48khz;
66
+};
67
+
68
+enum dynamic_metadata_mode {
69
+ dmdata_dp,
70
+ dmdata_hdmi,
71
+ dmdata_dolby_vision
72
+};
73
+
5574 struct encoder_info_frame {
5675 /* auxiliary video information */
5776 struct dc_info_packet avi;
5877 struct dc_info_packet gamut;
5978 struct dc_info_packet vendor;
79
+ struct dc_info_packet hfvsif;
6080 /* source product description */
6181 struct dc_info_packet spd;
6282 /* video stream configuration */
....@@ -67,7 +87,8 @@
6787
6888 struct encoder_unblank_param {
6989 struct dc_link_settings link_settings;
70
- unsigned int pixel_clk_khz;
90
+ struct dc_crtc_timing timing;
91
+ int opp_cnt;
7192 };
7293
7394 struct encoder_set_dp_phy_pattern_param {
....@@ -82,13 +103,30 @@
82103 struct dc_context *ctx;
83104 struct dc_bios *bp;
84105 enum engine_id id;
106
+ uint32_t stream_enc_inst;
107
+#if defined(CONFIG_DRM_AMD_DC_DCN3_0)
108
+ struct vpg *vpg;
109
+ struct afmt *afmt;
110
+#endif
111
+};
112
+
113
+struct enc_state {
114
+ uint32_t dsc_mode; // DISABLED 0; 1 or 2 indicate enabled state.
115
+ uint32_t dsc_slice_width;
116
+ uint32_t sec_gsp_pps_line_num;
117
+ uint32_t vbid6_line_reference;
118
+ uint32_t vbid6_line_num;
119
+ uint32_t sec_gsp_pps_enable;
120
+ uint32_t sec_stream_enable;
85121 };
86122
87123 struct stream_encoder_funcs {
88124 void (*dp_set_stream_attribute)(
89125 struct stream_encoder *enc,
90126 struct dc_crtc_timing *crtc_timing,
91
- enum dc_color_space output_color_space);
127
+ enum dc_color_space output_color_space,
128
+ bool use_vsc_sdp_for_colorimetry,
129
+ uint32_t enable_sdp_splitting);
92130
93131 void (*hdmi_set_stream_attribute)(
94132 struct stream_encoder *enc,
....@@ -101,7 +139,11 @@
101139 struct dc_crtc_timing *crtc_timing,
102140 bool is_dual_link);
103141
104
- void (*set_mst_bandwidth)(
142
+ void (*lvds_set_stream_attribute)(
143
+ struct stream_encoder *enc,
144
+ struct dc_crtc_timing *crtc_timing);
145
+
146
+ void (*set_throttled_vcp_size)(
105147 struct stream_encoder *enc,
106148 struct fixed31_32 avg_time_slots_per_mtp);
107149
....@@ -115,6 +157,11 @@
115157 void (*update_dp_info_packets)(
116158 struct stream_encoder *enc,
117159 const struct encoder_info_frame *info_frame);
160
+
161
+ void (*send_immediate_sdp_message)(
162
+ struct stream_encoder *enc,
163
+ const uint8_t *custom_sdp_message,
164
+ unsigned int sdp_message_size);
118165
119166 void (*stop_dp_info_packets)(
120167 struct stream_encoder *enc);
....@@ -157,6 +204,41 @@
157204 void (*set_avmute)(
158205 struct stream_encoder *enc, bool enable);
159206
207
+ void (*dig_connect_to_otg)(
208
+ struct stream_encoder *enc,
209
+ int tg_inst);
210
+
211
+ void (*hdmi_reset_stream_attribute)(
212
+ struct stream_encoder *enc);
213
+
214
+ unsigned int (*dig_source_otg)(
215
+ struct stream_encoder *enc);
216
+
217
+ bool (*dp_get_pixel_format)(
218
+ struct stream_encoder *enc,
219
+ enum dc_pixel_encoding *encoding,
220
+ enum dc_color_depth *depth);
221
+
222
+ void (*enc_read_state)(struct stream_encoder *enc, struct enc_state *s);
223
+
224
+ void (*dp_set_dsc_config)(
225
+ struct stream_encoder *enc,
226
+ enum optc_dsc_mode dsc_mode,
227
+ uint32_t dsc_bytes_per_pixel,
228
+ uint32_t dsc_slice_width);
229
+
230
+ void (*dp_set_dsc_pps_info_packet)(struct stream_encoder *enc,
231
+ bool enable,
232
+ uint8_t *dsc_packed_pps);
233
+
234
+ void (*set_dynamic_metadata)(struct stream_encoder *enc,
235
+ bool enable,
236
+ uint32_t hubp_requestor_id,
237
+ enum dynamic_metadata_mode dmdata_mode);
238
+
239
+ void (*dp_set_odm_combine)(
240
+ struct stream_encoder *enc,
241
+ bool odm_combine);
160242 };
161243
162244 #endif /* STREAM_ENCODER_H_ */