Skip to content

Commit 3581b70

Browse files
Kiciuklumag
authored andcommitted
drm/msm/disp/dpu1: add support for display on SM6115
Add required display hw catalog changes for SM6115. Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Adam Skladowski <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/512875/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent b93bdff commit 3581b70

File tree

4 files changed

+94
-0
lines changed

4 files changed

+94
-0
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,18 @@ static const struct dpu_caps sc7180_dpu_caps = {
321321
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
322322
};
323323

324+
static const struct dpu_caps sm6115_dpu_caps = {
325+
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
326+
.max_mixer_blendstages = 0x4,
327+
.qseed_type = DPU_SSPP_SCALER_QSEED3LITE,
328+
.smart_dma_rev = DPU_SSPP_SMART_DMA_V2, /* TODO: v2.5 */
329+
.ubwc_version = DPU_HW_UBWC_VER_20,
330+
.has_dim_layer = true,
331+
.has_idle_pc = true,
332+
.max_linewidth = 2160,
333+
.pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
334+
};
335+
324336
static const struct dpu_caps sm8150_dpu_caps = {
325337
.max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
326338
.max_mixer_blendstages = 0xb,
@@ -475,6 +487,19 @@ static const struct dpu_mdp_cfg sc8180x_mdp[] = {
475487
},
476488
};
477489

490+
static const struct dpu_mdp_cfg sm6115_mdp[] = {
491+
{
492+
.name = "top_0", .id = MDP_TOP,
493+
.base = 0x0, .len = 0x494,
494+
.features = 0,
495+
.highest_bank_bit = 0x1,
496+
.clk_ctrls[DPU_CLK_CTRL_VIG0] = {
497+
.reg_off = 0x2ac, .bit_off = 0},
498+
.clk_ctrls[DPU_CLK_CTRL_DMA0] = {
499+
.reg_off = 0x2ac, .bit_off = 8},
500+
},
501+
};
502+
478503
static const struct dpu_mdp_cfg sm8250_mdp[] = {
479504
{
480505
.name = "top_0", .id = MDP_TOP,
@@ -852,6 +877,16 @@ static const struct dpu_sspp_cfg sc7180_sspp[] = {
852877
sdm845_dma_sblk_2, 9, SSPP_TYPE_DMA, DPU_CLK_CTRL_CURSOR1),
853878
};
854879

880+
static const struct dpu_sspp_sub_blks sm6115_vig_sblk_0 =
881+
_VIG_SBLK("0", 2, DPU_SSPP_SCALER_QSEED3LITE);
882+
883+
static const struct dpu_sspp_cfg sm6115_sspp[] = {
884+
SSPP_BLK("sspp_0", SSPP_VIG0, 0x4000, VIG_SM8250_MASK,
885+
sm6115_vig_sblk_0, 0, SSPP_TYPE_VIG, DPU_CLK_CTRL_VIG0),
886+
SSPP_BLK("sspp_8", SSPP_DMA0, 0x24000, DMA_SDM845_MASK,
887+
sdm845_dma_sblk_0, 1, SSPP_TYPE_DMA, DPU_CLK_CTRL_DMA0),
888+
};
889+
855890
static const struct dpu_sspp_sub_blks sm8250_vig_sblk_0 =
856891
_VIG_SBLK("0", 5, DPU_SSPP_SCALER_QSEED3LITE);
857892
static const struct dpu_sspp_sub_blks sm8250_vig_sblk_1 =
@@ -1590,6 +1625,35 @@ static const struct dpu_perf_cfg sc7180_perf_data = {
15901625
.bw_inefficiency_factor = 120,
15911626
};
15921627

1628+
static const struct dpu_perf_cfg sm6115_perf_data = {
1629+
.max_bw_low = 3100000,
1630+
.max_bw_high = 4000000,
1631+
.min_core_ib = 2400000,
1632+
.min_llcc_ib = 800000,
1633+
.min_dram_ib = 800000,
1634+
.min_prefill_lines = 24,
1635+
.danger_lut_tbl = {0xff, 0xffff, 0x0},
1636+
.safe_lut_tbl = {0xfff0, 0xff00, 0xffff},
1637+
.qos_lut_tbl = {
1638+
{.nentry = ARRAY_SIZE(sc7180_qos_linear),
1639+
.entries = sc7180_qos_linear
1640+
},
1641+
{.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
1642+
.entries = sc7180_qos_macrotile
1643+
},
1644+
{.nentry = ARRAY_SIZE(sc7180_qos_nrt),
1645+
.entries = sc7180_qos_nrt
1646+
},
1647+
/* TODO: macrotile-qseed is different from macrotile */
1648+
},
1649+
.cdp_cfg = {
1650+
{.rd_enable = 1, .wr_enable = 1},
1651+
{.rd_enable = 1, .wr_enable = 0}
1652+
},
1653+
.clk_inefficiency_factor = 105,
1654+
.bw_inefficiency_factor = 120,
1655+
};
1656+
15931657
static const struct dpu_perf_cfg sm8150_perf_data = {
15941658
.max_bw_low = 12800000,
15951659
.max_bw_high = 12800000,
@@ -1801,6 +1865,28 @@ static const struct dpu_mdss_cfg sc7180_dpu_cfg = {
18011865
.mdss_irqs = IRQ_SC7180_MASK,
18021866
};
18031867

1868+
static const struct dpu_mdss_cfg sm6115_dpu_cfg = {
1869+
.caps = &sm6115_dpu_caps,
1870+
.mdp_count = ARRAY_SIZE(sm6115_mdp),
1871+
.mdp = sm6115_mdp,
1872+
.ctl_count = ARRAY_SIZE(qcm2290_ctl),
1873+
.ctl = qcm2290_ctl,
1874+
.sspp_count = ARRAY_SIZE(sm6115_sspp),
1875+
.sspp = sm6115_sspp,
1876+
.mixer_count = ARRAY_SIZE(qcm2290_lm),
1877+
.mixer = qcm2290_lm,
1878+
.dspp_count = ARRAY_SIZE(qcm2290_dspp),
1879+
.dspp = qcm2290_dspp,
1880+
.pingpong_count = ARRAY_SIZE(qcm2290_pp),
1881+
.pingpong = qcm2290_pp,
1882+
.intf_count = ARRAY_SIZE(qcm2290_intf),
1883+
.intf = qcm2290_intf,
1884+
.vbif_count = ARRAY_SIZE(sdm845_vbif),
1885+
.vbif = sdm845_vbif,
1886+
.perf = &sm6115_perf_data,
1887+
.mdss_irqs = IRQ_SC7180_MASK,
1888+
};
1889+
18041890
static const struct dpu_mdss_cfg sm8150_dpu_cfg = {
18051891
.caps = &sm8150_dpu_caps,
18061892
.mdp_count = ARRAY_SIZE(sdm845_mdp),
@@ -1935,6 +2021,7 @@ static const struct dpu_mdss_hw_cfg_handler cfg_handler[] = {
19352021
{ .hw_rev = DPU_HW_VER_510, .dpu_cfg = &sc8180x_dpu_cfg},
19362022
{ .hw_rev = DPU_HW_VER_600, .dpu_cfg = &sm8250_dpu_cfg},
19372023
{ .hw_rev = DPU_HW_VER_620, .dpu_cfg = &sc7180_dpu_cfg},
2024+
{ .hw_rev = DPU_HW_VER_630, .dpu_cfg = &sm6115_dpu_cfg},
19382025
{ .hw_rev = DPU_HW_VER_650, .dpu_cfg = &qcm2290_dpu_cfg},
19392026
{ .hw_rev = DPU_HW_VER_720, .dpu_cfg = &sc7280_dpu_cfg},
19402027
};

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#define DPU_HW_VER_510 DPU_HW_VER(5, 1, 1) /* sc8180 */
4545
#define DPU_HW_VER_600 DPU_HW_VER(6, 0, 0) /* sm8250 */
4646
#define DPU_HW_VER_620 DPU_HW_VER(6, 2, 0) /* sc7180 v1.0 */
47+
#define DPU_HW_VER_630 DPU_HW_VER(6, 3, 0) /* sm6115|sm4250 */
4748
#define DPU_HW_VER_650 DPU_HW_VER(6, 5, 0) /* qcm2290|sm4125 */
4849
#define DPU_HW_VER_720 DPU_HW_VER(7, 2, 0) /* sc7280 */
4950

drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,7 @@ static const struct of_device_id dpu_dt_match[] = {
12921292
{ .compatible = "qcom,sc7180-dpu", },
12931293
{ .compatible = "qcom,sc7280-dpu", },
12941294
{ .compatible = "qcom,sc8180x-dpu", },
1295+
{ .compatible = "qcom,sm6115-dpu", },
12951296
{ .compatible = "qcom,sm8150-dpu", },
12961297
{ .compatible = "qcom,sm8250-dpu", },
12971298
{}

drivers/gpu/drm/msm/msm_mdss.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ static int msm_mdss_enable(struct msm_mdss *msm_mdss)
216216
case DPU_HW_VER_620:
217217
writel_relaxed(0x1e, msm_mdss->mmio + UBWC_STATIC);
218218
break;
219+
case DPU_HW_VER_630:
220+
/* UBWC_2_0 */
221+
msm_mdss_setup_ubwc_dec_20(msm_mdss, 0x11f);
222+
break;
219223
case DPU_HW_VER_720:
220224
writel_relaxed(0x101e, msm_mdss->mmio + UBWC_STATIC);
221225
break;
@@ -445,6 +449,7 @@ static const struct of_device_id mdss_dt_match[] = {
445449
{ .compatible = "qcom,sc7180-mdss" },
446450
{ .compatible = "qcom,sc7280-mdss" },
447451
{ .compatible = "qcom,sc8180x-mdss" },
452+
{ .compatible = "qcom,sm6115-mdss" },
448453
{ .compatible = "qcom,sm8150-mdss" },
449454
{ .compatible = "qcom,sm8250-mdss" },
450455
{}

0 commit comments

Comments
 (0)