@@ -49,6 +49,17 @@ void drm_dsc_dp_pps_header_init(struct dp_sdp_header *pps_header)
}
EXPORT_SYMBOL(drm_dsc_dp_pps_header_init);
+void drm_dsc_dsi_pps_header_init(struct dsc_dce_header *dsc_header)
+{
+ memset(dsc_header, 0, sizeof(*dsc_header));
+
+ dsc_header->bp0 = 0x0A;
+ dsc_header->bp1 = 1;
+ dsc_header->bp4 = 10;
+ dsc_header->bp6 = 128;
+}
+EXPORT_SYMBOL(drm_dsc_dsi_pps_header_init);
+
/**
* drm_dsc_dp_rc_buffer_size - get rc buffer size in bytes
* @rc_buffer_block_size: block size code, according to DPCD offset 62h
@@ -602,8 +602,24 @@ struct drm_dsc_pps_infoframe {
struct drm_dsc_picture_parameter_set pps_payload;
} __packed;
+struct dsc_dce_header {
+ u8 bp0;
+ u8 bp1;
+ u8 bp2;
+ u8 bp3;
+ u8 bp4;
+ u8 bp5;
+ u8 bp6;
+} __packed;
+
+struct drm_dsi_dsc_infoframe {
+ struct dsc_dce_header dsc_header;
+ struct drm_dsc_picture_parameter_set pps_payload;
+} __packed;
+
void drm_dsc_dp_pps_header_init(struct dp_sdp_header *pps_header);
int drm_dsc_dp_rc_buffer_size(u8 rc_buffer_block_size, u8 rc_buffer_size);
+void drm_dsc_dsi_pps_header_init(struct dsc_dce_header *dsc_header);
void drm_dsc_pps_payload_pack(struct drm_dsc_picture_parameter_set *pps_sdp,
const struct drm_dsc_config *dsc_cfg);
int drm_dsc_compute_rc_parameters(struct drm_dsc_config *vdsc_cfg);
We required a helper to create and set the dsc_dce_header, so add the dsc_dce_header and API drm_dsc_dsi_pps_header_init Signed-off-by: Vinod Koul <vkoul@kernel.org> --- drivers/gpu/drm/drm_dsc.c | 11 +++++++++++ include/drm/drm_dsc.h | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) -- 2.26.3