Loading Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt +8 −0 Original line number Diff line number Diff line Loading @@ -437,6 +437,12 @@ Optional properites: - qcom,split-mode: String property indicating which split mode MDP should use. Valid entries are "pingpong-split" and "dualctl-split". This property is mutually exclusive with qcom,lm-split. - qcom,mdss-dsc-version: An 8 bit value indicates the DSC version supported by panel. Bits[0.3] provides information about minor version while Bits[4.7] provides major version information. It supports only DSC rev 1(Major).1(Minor) right now. - qcom,mdss-dsc-scr-version: Each DSC version can have multiple SCR. This 8 bit value indicates current SCR revision information supported by panel. - qcom,mdss-dsc-encoders: An integer value indicating how many DSC encoders should be used to drive data stream to DSI. Default value is 1 and max value is 2. Loading Loading @@ -676,6 +682,8 @@ Example: qcom,config-select = <&dsi_sim_vid_config0>; qcom,dba-panel; qcom,bridge-name = "adv7533"; qcom,mdss-dsc-version = <0x11>; qcom,mdss-dsc-scr-version = <0x1>; dsi_sim_vid_config0: config0 { qcom,lm-split = <360 360>; Loading drivers/video/msm/mdss/mdss_dsi_panel.c +49 −3 Original line number Diff line number Diff line Loading @@ -1091,7 +1091,7 @@ void mdss_dsi_panel_dsc_pps_send(struct mdss_dsi_ctrl_pdata *ctrl, memset(&cmd, 0, sizeof(cmd)); cmd.dchdr.dlen = mdss_panel_dsc_prepare_pps_buf(&pinfo->dsc, ctrl->pps_buf, 0 , 1, 0); ctrl->pps_buf, 0); cmd.dchdr.dtype = DTYPE_PPS; cmd.dchdr.last = 1; cmd.dchdr.wait = 10; Loading @@ -1106,6 +1106,47 @@ void mdss_dsi_panel_dsc_pps_send(struct mdss_dsi_ctrl_pdata *ctrl, mdss_dsi_panel_cmds_send(ctrl, &pcmds, CMD_REQ_COMMIT); } static int mdss_dsi_parse_dsc_version(struct device_node *np, struct mdss_panel_timing *timing) { u32 data; int rc = 0; struct dsc_desc *dsc = &timing->dsc; rc = of_property_read_u32(np, "qcom,mdss-dsc-version", &data); if (rc) { dsc->version = 0x11; rc = 0; } else { dsc->version = data & 0xff; /* only support DSC 1.1 rev */ if (dsc->version != 0x11) { pr_err("%s: DSC version:%d not supported\n", __func__, dsc->version); rc = -EINVAL; goto end; } } rc = of_property_read_u32(np, "qcom,mdss-dsc-scr-version", &data); if (rc) { dsc->scr_rev = 0x0; rc = 0; } else { dsc->scr_rev = data & 0xff; /* only one scr rev supported */ if (dsc->scr_rev > 0x1) { pr_err("%s: DSC scr version:%d not supported\n", __func__, dsc->scr_rev); rc = -EINVAL; goto end; } } end: return rc; } static int mdss_dsi_parse_dsc_params(struct device_node *np, struct mdss_panel_timing *timing, bool is_split_display) { Loading Loading @@ -1279,12 +1320,17 @@ static int mdss_dsi_parse_topology_config(struct device_node *np, data = of_get_property(np, "qcom,compression-mode", NULL); if (data) { if (cfg_np && !strcmp(data, "dsc")) if (cfg_np && !strcmp(data, "dsc")) { rc = mdss_dsi_parse_dsc_version(np, &pt->timing); if (rc) goto end; rc = mdss_dsi_parse_dsc_params(cfg_np, &pt->timing, is_split_display); else if (!strcmp(data, "fbc")) } else if (!strcmp(data, "fbc")) { rc = mdss_dsi_parse_fbc_params(np, &pt->timing); } } end: of_node_put(cfg_np); Loading drivers/video/msm/mdss/mdss_panel.c +19 −7 Original line number Diff line number Diff line Loading @@ -30,10 +30,14 @@ */ static u32 dsc_rc_buf_thresh[] = {0x0e, 0x1c, 0x2a, 0x38, 0x46, 0x54, 0x62, 0x69, 0x70, 0x77, 0x79, 0x7b, 0x7d, 0x7e}; static char dsc_rc_range_min_qp[] = {0, 0, 1, 1, 3, 3, 3, 3, 3, 3, 5, static char dsc_rc_range_min_qp_1_1[] = {0, 0, 1, 1, 3, 3, 3, 3, 3, 3, 5, 5, 5, 7, 13}; static char dsc_rc_range_max_qp[] = {4, 4, 5, 6, 7, 7, 7, 8, 9, 10, 11, static char dsc_rc_range_min_qp_1_1_scr1[] = {0, 0, 1, 1, 3, 3, 3, 3, 3, 3, 5, 5, 5, 9, 12}; static char dsc_rc_range_max_qp_1_1[] = {4, 4, 5, 6, 7, 7, 7, 8, 9, 10, 11, 12, 13, 13, 15}; static char dsc_rc_range_max_qp_1_1_scr1[] = {4, 4, 5, 6, 7, 7, 7, 8, 9, 10, 10, 11, 11, 12, 13}; static char dsc_rc_range_bpg_offset[] = {2, 0, 0, -2, -4, -6, -8, -8, -8, -10, -10, -12, -12, -12, -12}; Loading Loading @@ -668,6 +672,9 @@ void mdss_panel_dsc_parameters_calc(struct dsc_desc *dsc) int final_value, final_scale; dsc->rc_model_size = 8192; /* rate_buffer_size */ if (dsc->version == 0x11 && dsc->scr_rev == 0x1) dsc->first_line_bpg_offset = 15; else dsc->first_line_bpg_offset = 12; dsc->min_qp_flatness = 3; dsc->max_qp_flatness = 12; Loading @@ -680,8 +687,13 @@ void mdss_panel_dsc_parameters_calc(struct dsc_desc *dsc) dsc->tgt_offset_lo = 3; dsc->buf_thresh = dsc_rc_buf_thresh; dsc->range_min_qp = dsc_rc_range_min_qp; dsc->range_max_qp = dsc_rc_range_max_qp; if (dsc->version == 0x11 && dsc->scr_rev == 0x1) { dsc->range_min_qp = dsc_rc_range_min_qp_1_1_scr1; dsc->range_max_qp = dsc_rc_range_max_qp_1_1_scr1; } else { dsc->range_min_qp = dsc_rc_range_min_qp_1_1; dsc->range_max_qp = dsc_rc_range_max_qp_1_1; } dsc->range_bpg_offset = dsc_rc_range_bpg_offset; bpp = dsc->bpp; Loading Loading @@ -858,14 +870,14 @@ void mdss_panel_dsc_pclk_param_calc(struct dsc_desc *dsc, int intf_width) } int mdss_panel_dsc_prepare_pps_buf(struct dsc_desc *dsc, char *buf, int pps_id, int major, int minor) int pps_id) { char *bp; char data; int i, bpp; bp = buf; *bp++ = (((major & 0xf) << 4) | (minor & 0xf)); /* pps0 */ *bp++ = (dsc->version & 0xff); /* pps0 */ *bp++ = (pps_id & 0xff); /* pps1 */ bp++; /* pps2, reserved */ Loading drivers/video/msm/mdss/mdss_panel.h +4 −3 Original line number Diff line number Diff line Loading @@ -439,6 +439,9 @@ enum { }; struct dsc_desc { u8 version; /* top 4 bits major and lower 4 bits minor version */ u8 scr_rev; /* 8 bit value for dsc scr revision */ /* * Following parameters can change per frame if partial update is on */ Loading Loading @@ -1012,13 +1015,11 @@ void mdss_panel_dsc_pclk_param_calc(struct dsc_desc *dsc, int intf_width); * @dsc: pointer to DSC structure associated with panel_info * @buf: buffer that holds PPS * @pps_id: pps_identifier * @major: major version of the DSC encoder * @minot: minor version of the DSC encoder * * returns length of the PPS buffer. */ int mdss_panel_dsc_prepare_pps_buf(struct dsc_desc *dsc, char *buf, int pps_id, int major, int minor); int pps_id); #ifdef CONFIG_FB_MSM_MDSS int mdss_panel_debugfs_init(struct mdss_panel_info *panel_info, char const *panel_name); Loading Loading
Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt +8 −0 Original line number Diff line number Diff line Loading @@ -437,6 +437,12 @@ Optional properites: - qcom,split-mode: String property indicating which split mode MDP should use. Valid entries are "pingpong-split" and "dualctl-split". This property is mutually exclusive with qcom,lm-split. - qcom,mdss-dsc-version: An 8 bit value indicates the DSC version supported by panel. Bits[0.3] provides information about minor version while Bits[4.7] provides major version information. It supports only DSC rev 1(Major).1(Minor) right now. - qcom,mdss-dsc-scr-version: Each DSC version can have multiple SCR. This 8 bit value indicates current SCR revision information supported by panel. - qcom,mdss-dsc-encoders: An integer value indicating how many DSC encoders should be used to drive data stream to DSI. Default value is 1 and max value is 2. Loading Loading @@ -676,6 +682,8 @@ Example: qcom,config-select = <&dsi_sim_vid_config0>; qcom,dba-panel; qcom,bridge-name = "adv7533"; qcom,mdss-dsc-version = <0x11>; qcom,mdss-dsc-scr-version = <0x1>; dsi_sim_vid_config0: config0 { qcom,lm-split = <360 360>; Loading
drivers/video/msm/mdss/mdss_dsi_panel.c +49 −3 Original line number Diff line number Diff line Loading @@ -1091,7 +1091,7 @@ void mdss_dsi_panel_dsc_pps_send(struct mdss_dsi_ctrl_pdata *ctrl, memset(&cmd, 0, sizeof(cmd)); cmd.dchdr.dlen = mdss_panel_dsc_prepare_pps_buf(&pinfo->dsc, ctrl->pps_buf, 0 , 1, 0); ctrl->pps_buf, 0); cmd.dchdr.dtype = DTYPE_PPS; cmd.dchdr.last = 1; cmd.dchdr.wait = 10; Loading @@ -1106,6 +1106,47 @@ void mdss_dsi_panel_dsc_pps_send(struct mdss_dsi_ctrl_pdata *ctrl, mdss_dsi_panel_cmds_send(ctrl, &pcmds, CMD_REQ_COMMIT); } static int mdss_dsi_parse_dsc_version(struct device_node *np, struct mdss_panel_timing *timing) { u32 data; int rc = 0; struct dsc_desc *dsc = &timing->dsc; rc = of_property_read_u32(np, "qcom,mdss-dsc-version", &data); if (rc) { dsc->version = 0x11; rc = 0; } else { dsc->version = data & 0xff; /* only support DSC 1.1 rev */ if (dsc->version != 0x11) { pr_err("%s: DSC version:%d not supported\n", __func__, dsc->version); rc = -EINVAL; goto end; } } rc = of_property_read_u32(np, "qcom,mdss-dsc-scr-version", &data); if (rc) { dsc->scr_rev = 0x0; rc = 0; } else { dsc->scr_rev = data & 0xff; /* only one scr rev supported */ if (dsc->scr_rev > 0x1) { pr_err("%s: DSC scr version:%d not supported\n", __func__, dsc->scr_rev); rc = -EINVAL; goto end; } } end: return rc; } static int mdss_dsi_parse_dsc_params(struct device_node *np, struct mdss_panel_timing *timing, bool is_split_display) { Loading Loading @@ -1279,12 +1320,17 @@ static int mdss_dsi_parse_topology_config(struct device_node *np, data = of_get_property(np, "qcom,compression-mode", NULL); if (data) { if (cfg_np && !strcmp(data, "dsc")) if (cfg_np && !strcmp(data, "dsc")) { rc = mdss_dsi_parse_dsc_version(np, &pt->timing); if (rc) goto end; rc = mdss_dsi_parse_dsc_params(cfg_np, &pt->timing, is_split_display); else if (!strcmp(data, "fbc")) } else if (!strcmp(data, "fbc")) { rc = mdss_dsi_parse_fbc_params(np, &pt->timing); } } end: of_node_put(cfg_np); Loading
drivers/video/msm/mdss/mdss_panel.c +19 −7 Original line number Diff line number Diff line Loading @@ -30,10 +30,14 @@ */ static u32 dsc_rc_buf_thresh[] = {0x0e, 0x1c, 0x2a, 0x38, 0x46, 0x54, 0x62, 0x69, 0x70, 0x77, 0x79, 0x7b, 0x7d, 0x7e}; static char dsc_rc_range_min_qp[] = {0, 0, 1, 1, 3, 3, 3, 3, 3, 3, 5, static char dsc_rc_range_min_qp_1_1[] = {0, 0, 1, 1, 3, 3, 3, 3, 3, 3, 5, 5, 5, 7, 13}; static char dsc_rc_range_max_qp[] = {4, 4, 5, 6, 7, 7, 7, 8, 9, 10, 11, static char dsc_rc_range_min_qp_1_1_scr1[] = {0, 0, 1, 1, 3, 3, 3, 3, 3, 3, 5, 5, 5, 9, 12}; static char dsc_rc_range_max_qp_1_1[] = {4, 4, 5, 6, 7, 7, 7, 8, 9, 10, 11, 12, 13, 13, 15}; static char dsc_rc_range_max_qp_1_1_scr1[] = {4, 4, 5, 6, 7, 7, 7, 8, 9, 10, 10, 11, 11, 12, 13}; static char dsc_rc_range_bpg_offset[] = {2, 0, 0, -2, -4, -6, -8, -8, -8, -10, -10, -12, -12, -12, -12}; Loading Loading @@ -668,6 +672,9 @@ void mdss_panel_dsc_parameters_calc(struct dsc_desc *dsc) int final_value, final_scale; dsc->rc_model_size = 8192; /* rate_buffer_size */ if (dsc->version == 0x11 && dsc->scr_rev == 0x1) dsc->first_line_bpg_offset = 15; else dsc->first_line_bpg_offset = 12; dsc->min_qp_flatness = 3; dsc->max_qp_flatness = 12; Loading @@ -680,8 +687,13 @@ void mdss_panel_dsc_parameters_calc(struct dsc_desc *dsc) dsc->tgt_offset_lo = 3; dsc->buf_thresh = dsc_rc_buf_thresh; dsc->range_min_qp = dsc_rc_range_min_qp; dsc->range_max_qp = dsc_rc_range_max_qp; if (dsc->version == 0x11 && dsc->scr_rev == 0x1) { dsc->range_min_qp = dsc_rc_range_min_qp_1_1_scr1; dsc->range_max_qp = dsc_rc_range_max_qp_1_1_scr1; } else { dsc->range_min_qp = dsc_rc_range_min_qp_1_1; dsc->range_max_qp = dsc_rc_range_max_qp_1_1; } dsc->range_bpg_offset = dsc_rc_range_bpg_offset; bpp = dsc->bpp; Loading Loading @@ -858,14 +870,14 @@ void mdss_panel_dsc_pclk_param_calc(struct dsc_desc *dsc, int intf_width) } int mdss_panel_dsc_prepare_pps_buf(struct dsc_desc *dsc, char *buf, int pps_id, int major, int minor) int pps_id) { char *bp; char data; int i, bpp; bp = buf; *bp++ = (((major & 0xf) << 4) | (minor & 0xf)); /* pps0 */ *bp++ = (dsc->version & 0xff); /* pps0 */ *bp++ = (pps_id & 0xff); /* pps1 */ bp++; /* pps2, reserved */ Loading
drivers/video/msm/mdss/mdss_panel.h +4 −3 Original line number Diff line number Diff line Loading @@ -439,6 +439,9 @@ enum { }; struct dsc_desc { u8 version; /* top 4 bits major and lower 4 bits minor version */ u8 scr_rev; /* 8 bit value for dsc scr revision */ /* * Following parameters can change per frame if partial update is on */ Loading Loading @@ -1012,13 +1015,11 @@ void mdss_panel_dsc_pclk_param_calc(struct dsc_desc *dsc, int intf_width); * @dsc: pointer to DSC structure associated with panel_info * @buf: buffer that holds PPS * @pps_id: pps_identifier * @major: major version of the DSC encoder * @minot: minor version of the DSC encoder * * returns length of the PPS buffer. */ int mdss_panel_dsc_prepare_pps_buf(struct dsc_desc *dsc, char *buf, int pps_id, int major, int minor); int pps_id); #ifdef CONFIG_FB_MSM_MDSS int mdss_panel_debugfs_init(struct mdss_panel_info *panel_info, char const *panel_name); Loading