Linux Audio

Check our new training course

Loading...
v6.9.4
  1/*
  2 * Copyright 2017 Advanced Micro Devices, Inc.
  3 *
  4 * Permission is hereby granted, free of charge, to any person obtaining a
  5 * copy of this software and associated documentation files (the "Software"),
  6 * to deal in the Software without restriction, including without limitation
  7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8 * and/or sell copies of the Software, and to permit persons to whom the
  9 * Software is furnished to do so, subject to the following conditions:
 10 *
 11 * The above copyright notice and this permission notice shall be included in
 12 * all copies or substantial portions of the Software.
 13 *
 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 20 * OTHER DEALINGS IN THE SOFTWARE.
 21 *
 22 */
 23/*
 24 * stream_encoder.h
 25 *
 26 */
 27
 28#ifndef STREAM_ENCODER_H_
 29#define STREAM_ENCODER_H_
 30
 31#include "audio_types.h"
 32#include "hw_shared.h"
 33
 34struct dc_bios;
 35struct dc_context;
 36struct dc_crtc_timing;
 37
 38enum dp_pixel_encoding_type {
 39	DP_PIXEL_ENCODING_TYPE_RGB444		= 0x00000000,
 40	DP_PIXEL_ENCODING_TYPE_YCBCR422		= 0x00000001,
 41	DP_PIXEL_ENCODING_TYPE_YCBCR444		= 0x00000002,
 42	DP_PIXEL_ENCODING_TYPE_RGB_WIDE_GAMUT	= 0x00000003,
 43	DP_PIXEL_ENCODING_TYPE_Y_ONLY		= 0x00000004,
 44	DP_PIXEL_ENCODING_TYPE_YCBCR420		= 0x00000005
 45};
 46
 47enum dp_component_depth {
 48	DP_COMPONENT_PIXEL_DEPTH_6BPC		= 0x00000000,
 49	DP_COMPONENT_PIXEL_DEPTH_8BPC		= 0x00000001,
 50	DP_COMPONENT_PIXEL_DEPTH_10BPC		= 0x00000002,
 51	DP_COMPONENT_PIXEL_DEPTH_12BPC		= 0x00000003,
 52	DP_COMPONENT_PIXEL_DEPTH_16BPC		= 0x00000004
 53};
 54
 55struct 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
 68enum dynamic_metadata_mode {
 69	dmdata_dp,
 70	dmdata_hdmi,
 71	dmdata_dolby_vision
 72};
 73
 74struct enc_sdp_line_num {
 75	/* Adaptive Sync SDP */
 76	bool adaptive_sync_line_num_valid;
 77	uint32_t adaptive_sync_line_num;
 78};
 79
 80struct encoder_info_frame {
 81	/* auxiliary video information */
 82	struct dc_info_packet avi;
 83	struct dc_info_packet gamut;
 84	struct dc_info_packet vendor;
 85	struct dc_info_packet hfvsif;
 86	struct dc_info_packet vtem;
 87	/* source product description */
 88	struct dc_info_packet spd;
 89	/* video stream configuration */
 90	struct dc_info_packet vsc;
 91	/* HDR Static MetaData */
 92	struct dc_info_packet hdrsmd;
 93	/* Adaptive Sync SDP*/
 94	struct dc_info_packet adaptive_sync;
 95	struct enc_sdp_line_num sdp_line_num;
 96};
 97
 98struct encoder_unblank_param {
 99	struct dc_link_settings link_settings;
100	struct dc_crtc_timing timing;
101	int opp_cnt;
 
102};
103
104struct encoder_set_dp_phy_pattern_param {
105	enum dp_test_pattern dp_phy_pattern;
106	const uint8_t *custom_pattern;
107	uint32_t custom_pattern_size;
108	enum dp_panel_mode dp_panel_mode;
109};
110
111struct stream_encoder {
112	const struct stream_encoder_funcs *funcs;
113	struct dc_context *ctx;
114	struct dc_bios *bp;
115	enum engine_id id;
116	uint32_t stream_enc_inst;
117	struct vpg *vpg;
118	struct afmt *afmt;
119};
120
121struct enc_state {
122	uint32_t dsc_mode;  // DISABLED  0; 1 or 2 indicate enabled state.
123	uint32_t dsc_slice_width;
124	uint32_t sec_gsp_pps_line_num;
125	uint32_t vbid6_line_reference;
126	uint32_t vbid6_line_num;
127	uint32_t sec_gsp_pps_enable;
128	uint32_t sec_stream_enable;
129};
130
131struct stream_encoder_funcs {
132	void (*dp_set_stream_attribute)(
133		struct stream_encoder *enc,
134		struct dc_crtc_timing *crtc_timing,
135		enum dc_color_space output_color_space,
136		bool use_vsc_sdp_for_colorimetry,
137		uint32_t enable_sdp_splitting);
138
139	void (*hdmi_set_stream_attribute)(
140		struct stream_encoder *enc,
141		struct dc_crtc_timing *crtc_timing,
142		int actual_pix_clk_khz,
143		bool enable_audio);
144
145	void (*dvi_set_stream_attribute)(
146		struct stream_encoder *enc,
147		struct dc_crtc_timing *crtc_timing,
148		bool is_dual_link);
149
150	void (*lvds_set_stream_attribute)(
151		struct stream_encoder *enc,
152		struct dc_crtc_timing *crtc_timing);
153
154	void (*set_throttled_vcp_size)(
155		struct stream_encoder *enc,
156		struct fixed31_32 avg_time_slots_per_mtp);
157
158	void (*update_hdmi_info_packets)(
159		struct stream_encoder *enc,
160		const struct encoder_info_frame *info_frame);
161
162	void (*stop_hdmi_info_packets)(
163		struct stream_encoder *enc);
164
165	void (*update_dp_info_packets_sdp_line_num)(
166		struct stream_encoder *enc,
167		struct encoder_info_frame *info_frame);
168
169	void (*update_dp_info_packets)(
170		struct stream_encoder *enc,
171		const struct encoder_info_frame *info_frame);
172
173	void (*send_immediate_sdp_message)(
174				struct stream_encoder *enc,
175				const uint8_t *custom_sdp_message,
176				unsigned int sdp_message_size);
177
178	void (*stop_dp_info_packets)(
179		struct stream_encoder *enc);
180
181	void (*reset_fifo)(
182		struct stream_encoder *enc
183	);
184
185	void (*dp_blank)(
186		struct dc_link *link,
187		struct stream_encoder *enc);
188
189	void (*dp_unblank)(
190		struct dc_link *link,
191		struct stream_encoder *enc,
192		const struct encoder_unblank_param *param);
193
194	void (*audio_mute_control)(
195		struct stream_encoder *enc, bool mute);
196
197	void (*dp_audio_setup)(
198		struct stream_encoder *enc,
199		unsigned int az_inst,
200		struct audio_info *info);
201
202	void (*dp_audio_enable) (
203			struct stream_encoder *enc);
204
205	void (*dp_audio_disable) (
206			struct stream_encoder *enc);
207
208	void (*hdmi_audio_setup)(
209		struct stream_encoder *enc,
210		unsigned int az_inst,
211		struct audio_info *info,
212		struct audio_crtc_info *audio_crtc_info);
213
214	void (*hdmi_audio_disable) (
215			struct stream_encoder *enc);
216
217	void (*setup_stereo_sync) (
218			struct stream_encoder *enc,
219			int tg_inst,
220			bool enable);
221
222	void (*set_avmute)(
223		struct stream_encoder *enc, bool enable);
224
225	void (*dig_connect_to_otg)(
226		struct stream_encoder *enc,
227		int tg_inst);
228
229	void (*dig_stream_enable)(
230		struct stream_encoder *enc,
231		enum signal_type signal,
232		bool enable);
233
234	void (*hdmi_reset_stream_attribute)(
235		struct stream_encoder *enc);
236
237	unsigned int (*dig_source_otg)(
238		struct stream_encoder *enc);
239
240	bool (*dp_get_pixel_format)(
241		struct stream_encoder *enc,
242		enum dc_pixel_encoding *encoding,
243		enum dc_color_depth *depth);
244
245	void (*enc_read_state)(struct stream_encoder *enc, struct enc_state *s);
246
247	void (*dp_set_dsc_config)(
248			struct stream_encoder *enc,
249			enum optc_dsc_mode dsc_mode,
250			uint32_t dsc_bytes_per_pixel,
251			uint32_t dsc_slice_width);
252
253	void (*dp_set_dsc_pps_info_packet)(struct stream_encoder *enc,
254				bool enable,
255				uint8_t *dsc_packed_pps,
256				bool immediate_update);
257
258	void (*set_dynamic_metadata)(struct stream_encoder *enc,
259			bool enable,
260			uint32_t hubp_requestor_id,
261			enum dynamic_metadata_mode dmdata_mode);
262
263	/**
264	 * @dp_set_odm_combine: Sets up DP stream encoder for ODM.
265	 */
266	void (*dp_set_odm_combine)(
267		struct stream_encoder *enc,
268		bool odm_combine);
269
270	uint32_t (*get_fifo_cal_average_level)(
271		struct stream_encoder *enc);
272
273	void (*set_input_mode)(
274		struct stream_encoder *enc, unsigned int pix_per_container);
275	void (*enable_fifo)(struct stream_encoder *enc);
276	void (*disable_fifo)(struct stream_encoder *enc);
 
277	void (*map_stream_to_link)(struct stream_encoder *enc, uint32_t stream_enc_inst, uint32_t link_enc_inst);
 
278};
279
280struct hpo_dp_stream_encoder_state {
281	uint32_t stream_enc_enabled;
282	uint32_t vid_stream_enabled;
283	uint32_t otg_inst;
284	uint32_t pixel_encoding;
285	uint32_t component_depth;
286	uint32_t compressed_format;
287	uint32_t sdp_enabled;
288	uint32_t mapped_to_link_enc;
289};
290
291struct hpo_dp_stream_encoder {
292	const struct hpo_dp_stream_encoder_funcs *funcs;
293	struct dc_context *ctx;
294	struct dc_bios *bp;
295	uint32_t inst;
296	enum engine_id id;
297	struct vpg *vpg;
298	struct apg *apg;
299};
300
301struct hpo_dp_stream_encoder_funcs {
302	void (*enable_stream)(
303			struct hpo_dp_stream_encoder *enc);
304
305	void (*dp_unblank)(
306			struct hpo_dp_stream_encoder *enc,
307			uint32_t stream_source);
308
309	void (*dp_blank)(
310			struct hpo_dp_stream_encoder *enc);
311
312	void (*disable)(
313			struct hpo_dp_stream_encoder *enc);
314
315	void (*set_stream_attribute)(
316		struct hpo_dp_stream_encoder *enc,
317		struct dc_crtc_timing *crtc_timing,
318		enum dc_color_space output_color_space,
319		bool use_vsc_sdp_for_colorimetry,
320		bool compressed_format,
321		bool double_buffer_en);
322
323	void (*update_dp_info_packets_sdp_line_num)(
324		struct hpo_dp_stream_encoder *enc,
325		struct encoder_info_frame *info_frame);
326
327	void (*update_dp_info_packets)(
328		struct hpo_dp_stream_encoder *enc,
329		const struct encoder_info_frame *info_frame);
330
331	void (*stop_dp_info_packets)(
332		struct hpo_dp_stream_encoder *enc);
333
334	void (*dp_set_dsc_pps_info_packet)(
335			struct hpo_dp_stream_encoder *enc,
336			bool enable,
337			uint8_t *dsc_packed_pps,
338			bool immediate_update);
339
340	void (*map_stream_to_link)(
341			struct hpo_dp_stream_encoder *enc,
342			uint32_t stream_enc_inst,
343			uint32_t link_enc_inst);
344
345	void (*dp_audio_setup)(
346			struct hpo_dp_stream_encoder *enc,
347			unsigned int az_inst,
348			struct audio_info *info);
349
350	void (*dp_audio_enable)(
351			struct hpo_dp_stream_encoder *enc);
352
353	void (*dp_audio_disable)(
354			struct hpo_dp_stream_encoder *enc);
355
356	void (*read_state)(
357			struct hpo_dp_stream_encoder *enc,
358			struct hpo_dp_stream_encoder_state *state);
359
360	void (*set_hblank_min_symbol_width)(
361			struct hpo_dp_stream_encoder *enc,
362			uint16_t width);
363};
364
365#endif /* STREAM_ENCODER_H_ */
v6.13.7
  1/*
  2 * Copyright 2017 Advanced Micro Devices, Inc.
  3 *
  4 * Permission is hereby granted, free of charge, to any person obtaining a
  5 * copy of this software and associated documentation files (the "Software"),
  6 * to deal in the Software without restriction, including without limitation
  7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8 * and/or sell copies of the Software, and to permit persons to whom the
  9 * Software is furnished to do so, subject to the following conditions:
 10 *
 11 * The above copyright notice and this permission notice shall be included in
 12 * all copies or substantial portions of the Software.
 13 *
 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 20 * OTHER DEALINGS IN THE SOFTWARE.
 21 *
 22 */
 23/*
 24 * stream_encoder.h
 25 *
 26 */
 27
 28#ifndef STREAM_ENCODER_H_
 29#define STREAM_ENCODER_H_
 30
 31#include "audio_types.h"
 32#include "hw_shared.h"
 33
 34struct dc_bios;
 35struct dc_context;
 36struct dc_crtc_timing;
 37
 38enum dp_pixel_encoding_type {
 39	DP_PIXEL_ENCODING_TYPE_RGB444		= 0x00000000,
 40	DP_PIXEL_ENCODING_TYPE_YCBCR422		= 0x00000001,
 41	DP_PIXEL_ENCODING_TYPE_YCBCR444		= 0x00000002,
 42	DP_PIXEL_ENCODING_TYPE_RGB_WIDE_GAMUT	= 0x00000003,
 43	DP_PIXEL_ENCODING_TYPE_Y_ONLY		= 0x00000004,
 44	DP_PIXEL_ENCODING_TYPE_YCBCR420		= 0x00000005
 45};
 46
 47enum dp_component_depth {
 48	DP_COMPONENT_PIXEL_DEPTH_6BPC		= 0x00000000,
 49	DP_COMPONENT_PIXEL_DEPTH_8BPC		= 0x00000001,
 50	DP_COMPONENT_PIXEL_DEPTH_10BPC		= 0x00000002,
 51	DP_COMPONENT_PIXEL_DEPTH_12BPC		= 0x00000003,
 52	DP_COMPONENT_PIXEL_DEPTH_16BPC		= 0x00000004
 53};
 54
 55struct 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
 68enum dynamic_metadata_mode {
 69	dmdata_dp,
 70	dmdata_hdmi,
 71	dmdata_dolby_vision
 72};
 73
 74struct enc_sdp_line_num {
 75	/* Adaptive Sync SDP */
 76	bool adaptive_sync_line_num_valid;
 77	uint32_t adaptive_sync_line_num;
 78};
 79
 80struct encoder_info_frame {
 81	/* auxiliary video information */
 82	struct dc_info_packet avi;
 83	struct dc_info_packet gamut;
 84	struct dc_info_packet vendor;
 85	struct dc_info_packet hfvsif;
 86	struct dc_info_packet vtem;
 87	/* source product description */
 88	struct dc_info_packet spd;
 89	/* video stream configuration */
 90	struct dc_info_packet vsc;
 91	/* HDR Static MetaData */
 92	struct dc_info_packet hdrsmd;
 93	/* Adaptive Sync SDP*/
 94	struct dc_info_packet adaptive_sync;
 95	struct enc_sdp_line_num sdp_line_num;
 96};
 97
 98struct encoder_unblank_param {
 99	struct dc_link_settings link_settings;
100	struct dc_crtc_timing timing;
101	int opp_cnt;
102	uint32_t pix_per_cycle;
103};
104
105struct encoder_set_dp_phy_pattern_param {
106	enum dp_test_pattern dp_phy_pattern;
107	const uint8_t *custom_pattern;
108	uint32_t custom_pattern_size;
109	enum dp_panel_mode dp_panel_mode;
110};
111
112struct stream_encoder {
113	const struct stream_encoder_funcs *funcs;
114	struct dc_context *ctx;
115	struct dc_bios *bp;
116	enum engine_id id;
117	uint32_t stream_enc_inst;
118	struct vpg *vpg;
119	struct afmt *afmt;
120};
121
122struct enc_state {
123	uint32_t dsc_mode;  // DISABLED  0; 1 or 2 indicate enabled state.
124	uint32_t dsc_slice_width;
125	uint32_t sec_gsp_pps_line_num;
126	uint32_t vbid6_line_reference;
127	uint32_t vbid6_line_num;
128	uint32_t sec_gsp_pps_enable;
129	uint32_t sec_stream_enable;
130};
131
132struct stream_encoder_funcs {
133	void (*dp_set_stream_attribute)(
134		struct stream_encoder *enc,
135		struct dc_crtc_timing *crtc_timing,
136		enum dc_color_space output_color_space,
137		bool use_vsc_sdp_for_colorimetry,
138		uint32_t enable_sdp_splitting);
139
140	void (*hdmi_set_stream_attribute)(
141		struct stream_encoder *enc,
142		struct dc_crtc_timing *crtc_timing,
143		int actual_pix_clk_khz,
144		bool enable_audio);
145
146	void (*dvi_set_stream_attribute)(
147		struct stream_encoder *enc,
148		struct dc_crtc_timing *crtc_timing,
149		bool is_dual_link);
150
151	void (*lvds_set_stream_attribute)(
152		struct stream_encoder *enc,
153		struct dc_crtc_timing *crtc_timing);
154
155	void (*set_throttled_vcp_size)(
156		struct stream_encoder *enc,
157		struct fixed31_32 avg_time_slots_per_mtp);
158
159	void (*update_hdmi_info_packets)(
160		struct stream_encoder *enc,
161		const struct encoder_info_frame *info_frame);
162
163	void (*stop_hdmi_info_packets)(
164		struct stream_encoder *enc);
165
166	void (*update_dp_info_packets_sdp_line_num)(
167		struct stream_encoder *enc,
168		struct encoder_info_frame *info_frame);
169
170	void (*update_dp_info_packets)(
171		struct stream_encoder *enc,
172		const struct encoder_info_frame *info_frame);
173
174	void (*send_immediate_sdp_message)(
175				struct stream_encoder *enc,
176				const uint8_t *custom_sdp_message,
177				unsigned int sdp_message_size);
178
179	void (*stop_dp_info_packets)(
180		struct stream_encoder *enc);
181
 
 
 
 
182	void (*dp_blank)(
183		struct dc_link *link,
184		struct stream_encoder *enc);
185
186	void (*dp_unblank)(
187		struct dc_link *link,
188		struct stream_encoder *enc,
189		const struct encoder_unblank_param *param);
190
191	void (*audio_mute_control)(
192		struct stream_encoder *enc, bool mute);
193
194	void (*dp_audio_setup)(
195		struct stream_encoder *enc,
196		unsigned int az_inst,
197		struct audio_info *info);
198
199	void (*dp_audio_enable) (
200			struct stream_encoder *enc);
201
202	void (*dp_audio_disable) (
203			struct stream_encoder *enc);
204
205	void (*hdmi_audio_setup)(
206		struct stream_encoder *enc,
207		unsigned int az_inst,
208		struct audio_info *info,
209		struct audio_crtc_info *audio_crtc_info);
210
211	void (*hdmi_audio_disable) (
212			struct stream_encoder *enc);
213
214	void (*setup_stereo_sync) (
215			struct stream_encoder *enc,
216			int tg_inst,
217			bool enable);
218
219	void (*set_avmute)(
220		struct stream_encoder *enc, bool enable);
221
222	void (*dig_connect_to_otg)(
223		struct stream_encoder *enc,
224		int tg_inst);
225
226	void (*enable_stream)(
227		struct stream_encoder *enc,
228		enum signal_type signal,
229		bool enable);
230
231	void (*hdmi_reset_stream_attribute)(
232		struct stream_encoder *enc);
233
234	unsigned int (*dig_source_otg)(
235		struct stream_encoder *enc);
236
237	bool (*dp_get_pixel_format)(
238		struct stream_encoder *enc,
239		enum dc_pixel_encoding *encoding,
240		enum dc_color_depth *depth);
241
242	void (*enc_read_state)(struct stream_encoder *enc, struct enc_state *s);
243
244	void (*dp_set_dsc_config)(
245			struct stream_encoder *enc,
246			enum optc_dsc_mode dsc_mode,
247			uint32_t dsc_bytes_per_pixel,
248			uint32_t dsc_slice_width);
249
250	void (*dp_set_dsc_pps_info_packet)(struct stream_encoder *enc,
251				bool enable,
252				uint8_t *dsc_packed_pps,
253				bool immediate_update);
254
255	void (*set_dynamic_metadata)(struct stream_encoder *enc,
256			bool enable,
257			uint32_t hubp_requestor_id,
258			enum dynamic_metadata_mode dmdata_mode);
259
260	/**
261	 * @dp_set_odm_combine: Sets up DP stream encoder for ODM.
262	 */
263	void (*dp_set_odm_combine)(
264		struct stream_encoder *enc,
265		bool odm_combine);
266
267	uint32_t (*get_fifo_cal_average_level)(
268		struct stream_encoder *enc);
269
270	void (*set_input_mode)(
271		struct stream_encoder *enc, unsigned int pix_per_container);
272	void (*enable_fifo)(struct stream_encoder *enc);
273	void (*disable_fifo)(struct stream_encoder *enc);
274	bool (*is_fifo_enabled)(struct stream_encoder *enc);
275	void (*map_stream_to_link)(struct stream_encoder *enc, uint32_t stream_enc_inst, uint32_t link_enc_inst);
276	uint32_t (*get_pixels_per_cycle)(struct stream_encoder *enc);
277};
278
279struct hpo_dp_stream_encoder_state {
280	uint32_t stream_enc_enabled;
281	uint32_t vid_stream_enabled;
282	uint32_t otg_inst;
283	uint32_t pixel_encoding;
284	uint32_t component_depth;
285	uint32_t compressed_format;
286	uint32_t sdp_enabled;
287	uint32_t mapped_to_link_enc;
288};
289
290struct hpo_dp_stream_encoder {
291	const struct hpo_dp_stream_encoder_funcs *funcs;
292	struct dc_context *ctx;
293	struct dc_bios *bp;
294	uint32_t inst;
295	enum engine_id id;
296	struct vpg *vpg;
297	struct apg *apg;
298};
299
300struct hpo_dp_stream_encoder_funcs {
301	void (*enable_stream)(
302			struct hpo_dp_stream_encoder *enc);
303
304	void (*dp_unblank)(
305			struct hpo_dp_stream_encoder *enc,
306			uint32_t stream_source);
307
308	void (*dp_blank)(
309			struct hpo_dp_stream_encoder *enc);
310
311	void (*disable)(
312			struct hpo_dp_stream_encoder *enc);
313
314	void (*set_stream_attribute)(
315		struct hpo_dp_stream_encoder *enc,
316		struct dc_crtc_timing *crtc_timing,
317		enum dc_color_space output_color_space,
318		bool use_vsc_sdp_for_colorimetry,
319		bool compressed_format,
320		bool double_buffer_en);
321
322	void (*update_dp_info_packets_sdp_line_num)(
323		struct hpo_dp_stream_encoder *enc,
324		struct encoder_info_frame *info_frame);
325
326	void (*update_dp_info_packets)(
327		struct hpo_dp_stream_encoder *enc,
328		const struct encoder_info_frame *info_frame);
329
330	void (*stop_dp_info_packets)(
331		struct hpo_dp_stream_encoder *enc);
332
333	void (*dp_set_dsc_pps_info_packet)(
334			struct hpo_dp_stream_encoder *enc,
335			bool enable,
336			uint8_t *dsc_packed_pps,
337			bool immediate_update);
338
339	void (*map_stream_to_link)(
340			struct hpo_dp_stream_encoder *enc,
341			uint32_t stream_enc_inst,
342			uint32_t link_enc_inst);
343
344	void (*dp_audio_setup)(
345			struct hpo_dp_stream_encoder *enc,
346			unsigned int az_inst,
347			struct audio_info *info);
348
349	void (*dp_audio_enable)(
350			struct hpo_dp_stream_encoder *enc);
351
352	void (*dp_audio_disable)(
353			struct hpo_dp_stream_encoder *enc);
354
355	void (*read_state)(
356			struct hpo_dp_stream_encoder *enc,
357			struct hpo_dp_stream_encoder_state *state);
358
359	void (*set_hblank_min_symbol_width)(
360			struct hpo_dp_stream_encoder *enc,
361			uint16_t width);
362};
363
364#endif /* STREAM_ENCODER_H_ */