kernel: add supports configurable Datatype of compress pixel stream

Some panel IC can not support 0x0b for compress pixel stream's DataType.
For example gc7372, it will use 0x3E for compress pixel stream's DataType.

Change-Id: Ie9bc90d79b11033414658d93e0b39137c6f4f8e0
Signed-off-by: houdz1 <houdz1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1976131
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
houdz1 2021-06-10 15:36:46 +08:00 • committed by tongkun1
commit 663d13e0a0
3 changed files with 14 additions and 2 deletions

View file

@ -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

View file

@ -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) {

View file

@ -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;
};