| .. | .. |
|---|
| 52 | 52 | DP_COMPONENT_PIXEL_DEPTH_16BPC = 0x00000004 |
|---|
| 53 | 53 | }; |
|---|
| 54 | 54 | |
|---|
| 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 | + |
|---|
| 55 | 74 | struct encoder_info_frame { |
|---|
| 56 | 75 | /* auxiliary video information */ |
|---|
| 57 | 76 | struct dc_info_packet avi; |
|---|
| 58 | 77 | struct dc_info_packet gamut; |
|---|
| 59 | 78 | struct dc_info_packet vendor; |
|---|
| 79 | + struct dc_info_packet hfvsif; |
|---|
| 60 | 80 | /* source product description */ |
|---|
| 61 | 81 | struct dc_info_packet spd; |
|---|
| 62 | 82 | /* video stream configuration */ |
|---|
| .. | .. |
|---|
| 67 | 87 | |
|---|
| 68 | 88 | struct encoder_unblank_param { |
|---|
| 69 | 89 | struct dc_link_settings link_settings; |
|---|
| 70 | | - unsigned int pixel_clk_khz; |
|---|
| 90 | + struct dc_crtc_timing timing; |
|---|
| 91 | + int opp_cnt; |
|---|
| 71 | 92 | }; |
|---|
| 72 | 93 | |
|---|
| 73 | 94 | struct encoder_set_dp_phy_pattern_param { |
|---|
| .. | .. |
|---|
| 82 | 103 | struct dc_context *ctx; |
|---|
| 83 | 104 | struct dc_bios *bp; |
|---|
| 84 | 105 | 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; |
|---|
| 85 | 121 | }; |
|---|
| 86 | 122 | |
|---|
| 87 | 123 | struct stream_encoder_funcs { |
|---|
| 88 | 124 | void (*dp_set_stream_attribute)( |
|---|
| 89 | 125 | struct stream_encoder *enc, |
|---|
| 90 | 126 | 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); |
|---|
| 92 | 130 | |
|---|
| 93 | 131 | void (*hdmi_set_stream_attribute)( |
|---|
| 94 | 132 | struct stream_encoder *enc, |
|---|
| .. | .. |
|---|
| 101 | 139 | struct dc_crtc_timing *crtc_timing, |
|---|
| 102 | 140 | bool is_dual_link); |
|---|
| 103 | 141 | |
|---|
| 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)( |
|---|
| 105 | 147 | struct stream_encoder *enc, |
|---|
| 106 | 148 | struct fixed31_32 avg_time_slots_per_mtp); |
|---|
| 107 | 149 | |
|---|
| .. | .. |
|---|
| 115 | 157 | void (*update_dp_info_packets)( |
|---|
| 116 | 158 | struct stream_encoder *enc, |
|---|
| 117 | 159 | 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); |
|---|
| 118 | 165 | |
|---|
| 119 | 166 | void (*stop_dp_info_packets)( |
|---|
| 120 | 167 | struct stream_encoder *enc); |
|---|
| .. | .. |
|---|
| 157 | 204 | void (*set_avmute)( |
|---|
| 158 | 205 | struct stream_encoder *enc, bool enable); |
|---|
| 159 | 206 | |
|---|
| 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); |
|---|
| 160 | 242 | }; |
|---|
| 161 | 243 | |
|---|
| 162 | 244 | #endif /* STREAM_ENCODER_H_ */ |
|---|