diff --git a/msm/dsi/dsi_ctrl_hw_cmn.c b/msm/dsi/dsi_ctrl_hw_cmn.c index df9954da0454..50dc8a060463 100644 --- a/msm/dsi/dsi_ctrl_hw_cmn.c +++ b/msm/dsi/dsi_ctrl_hw_cmn.c @@ -332,7 +332,7 @@ void dsi_ctrl_hw_cmn_set_video_timing(struct dsi_ctrl_hw *ctrl, u32 reg = 0; u32 hs_start = 0; u32 hs_end, active_h_start, active_h_end, h_total, width = 0; - u32 bytes_per_pkt, pkt_per_line, eol_byte_num; + u32 bytes_per_pkt, pkt_per_line, eol_byte_num, datatype; u32 vs_start = 0, vs_end = 0; u32 vpos_start = 0, vpos_end, active_v_start, active_v_end, v_total; @@ -342,7 +342,9 @@ void dsi_ctrl_hw_cmn_set_video_timing(struct dsi_ctrl_hw *ctrl, &pkt_per_line, &eol_byte_num); reg = bytes_per_pkt << 16; /* data type of compressed image */ - reg |= (0x0b << 8); + datatype = mode->dsc->datatype; + if(!datatype) datatype = 0x0b; + reg |= (datatype << 8); /* * pkt_per_line: * 0 == 1 pkt diff --git a/msm/dsi/dsi_panel.c b/msm/dsi/dsi_panel.c index 3adbb9636c11..d2e132e36148 100644 --- a/msm/dsi/dsi_panel.c +++ b/msm/dsi/dsi_panel.c @@ -3117,6 +3117,14 @@ static int dsi_panel_parse_dsc_params(struct dsi_display_mode *mode, } priv_info->dsc.config.bits_per_pixel = data << 4; + rc = utils->read_u32(utils->data, "qcom,mdss-dsc-datatype", + &data); + if (rc) { + DSI_ERR("failed to parse qcom,mdss-dsc-datatype\n"); + data = 0x0B; + } + priv_info->dsc.datatype = data; + rc = utils->read_u32(utils->data, "qcom,src-chroma-format", &data); if (rc) { diff --git a/msm/msm_drv.h b/msm/msm_drv.h index b69a2c7cec5a..60409a3010d1 100644 --- a/msm/msm_drv.h +++ b/msm/msm_drv.h @@ -400,6 +400,7 @@ struct msm_param_info { * @half_panel_pu True for single and dual dsc encoders if partial * update sets the roi width to half of mode width * False in all other cases + * @datatype: data type of compressed image */ struct msm_display_dsc_info { struct drm_dsc_config config; @@ -422,6 +423,7 @@ struct msm_display_dsc_info { u32 dsc_4hsmerge_padding; u32 dsc_4hsmerge_alignment; bool half_panel_pu; + int datatype; };