1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00

drm/msm/mdss: populate missing data

As we are going to use MDSS data for DPU programming, populate missing
MDSS data. The UBWC 1.0 and no UBWC cases do not require MDSS
programming, so skip them.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/550055/
Link: https://lore.kernel.org/r/20230728213320.97309-5-dmitry.baryshkov@linaro.org
This commit is contained in:
Dmitry Baryshkov 2023-07-29 00:33:17 +03:00
parent 71e00fc0af
commit 6f410b2462

View file

@ -264,6 +264,10 @@ static int msm_mdss_enable(struct msm_mdss *msm_mdss)
* UBWC_n and the rest of params comes from hw data. * UBWC_n and the rest of params comes from hw data.
*/ */
switch (msm_mdss->mdss_data->ubwc_dec_version) { switch (msm_mdss->mdss_data->ubwc_dec_version) {
case 0: /* no UBWC */
case UBWC_1_0:
/* do nothing */
break;
case UBWC_2_0: case UBWC_2_0:
msm_mdss_setup_ubwc_dec_20(msm_mdss); msm_mdss_setup_ubwc_dec_20(msm_mdss);
break; break;
@ -502,10 +506,22 @@ static int mdss_remove(struct platform_device *pdev)
return 0; return 0;
} }
static const struct msm_mdss_data msm8998_data = {
.ubwc_enc_version = UBWC_1_0,
.ubwc_dec_version = UBWC_1_0,
.highest_bank_bit = 1,
};
static const struct msm_mdss_data qcm2290_data = {
/* no UBWC */
.highest_bank_bit = 0x2,
};
static const struct msm_mdss_data sc7180_data = { static const struct msm_mdss_data sc7180_data = {
.ubwc_enc_version = UBWC_2_0, .ubwc_enc_version = UBWC_2_0,
.ubwc_dec_version = UBWC_2_0, .ubwc_dec_version = UBWC_2_0,
.ubwc_static = 0x1e, .ubwc_static = 0x1e,
.highest_bank_bit = 0x3,
}; };
static const struct msm_mdss_data sc7280_data = { static const struct msm_mdss_data sc7280_data = {
@ -558,6 +574,7 @@ static const struct msm_mdss_data sm6115_data = {
.ubwc_dec_version = UBWC_2_0, .ubwc_dec_version = UBWC_2_0,
.ubwc_swizzle = 7, .ubwc_swizzle = 7,
.ubwc_static = 0x11f, .ubwc_static = 0x11f,
.highest_bank_bit = 0x1,
}; };
static const struct msm_mdss_data sm6125_data = { static const struct msm_mdss_data sm6125_data = {
@ -589,8 +606,8 @@ static const struct msm_mdss_data sm8550_data = {
static const struct of_device_id mdss_dt_match[] = { static const struct of_device_id mdss_dt_match[] = {
{ .compatible = "qcom,mdss" }, { .compatible = "qcom,mdss" },
{ .compatible = "qcom,msm8998-mdss" }, { .compatible = "qcom,msm8998-mdss", .data = &msm8998_data },
{ .compatible = "qcom,qcm2290-mdss" }, { .compatible = "qcom,qcm2290-mdss", .data = &qcm2290_data },
{ .compatible = "qcom,sdm845-mdss", .data = &sdm845_data }, { .compatible = "qcom,sdm845-mdss", .data = &sdm845_data },
{ .compatible = "qcom,sc7180-mdss", .data = &sc7180_data }, { .compatible = "qcom,sc7180-mdss", .data = &sc7180_data },
{ .compatible = "qcom,sc7280-mdss", .data = &sc7280_data }, { .compatible = "qcom,sc7280-mdss", .data = &sc7280_data },