Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm/dpu: Add SM6150 support

Add definitions for the display hardware used on the Qualcomm SM6150
platform.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Li Liu <quic_lliu6@quicinc.com>
Signed-off-by: Fange Zhang <quic_fangez@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/628007/
Link: https://lore.kernel.org/r/20241210-add-display-support-for-qcs615-platform-v4-5-2d875a67602d@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

authored by

Li Liu and committed by
Dmitry Baryshkov
cb2f9144 b8871563

+257
+254
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_3_sm6150.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + /* 3 + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. 4 + */ 5 + 6 + #ifndef _DPU_5_3_SM6150_H 7 + #define _DPU_5_3_SM6150_H 8 + 9 + static const struct dpu_caps sm6150_dpu_caps = { 10 + .max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH, 11 + .max_mixer_blendstages = 0x9, 12 + .has_dim_layer = true, 13 + .has_idle_pc = true, 14 + .max_linewidth = 2160, 15 + .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE, 16 + .max_hdeci_exp = MAX_HORZ_DECIMATION, 17 + .max_vdeci_exp = MAX_VERT_DECIMATION, 18 + }; 19 + 20 + static const struct dpu_mdp_cfg sm6150_mdp = { 21 + .name = "top_0", 22 + .base = 0x0, .len = 0x45c, 23 + .features = 0, 24 + .clk_ctrls = { 25 + [DPU_CLK_CTRL_VIG0] = { .reg_off = 0x2ac, .bit_off = 0 }, 26 + [DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 }, 27 + [DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8 }, 28 + [DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2bc, .bit_off = 8 }, 29 + [DPU_CLK_CTRL_DMA3] = { .reg_off = 0x2c4, .bit_off = 8 }, 30 + }, 31 + }; 32 + 33 + static const struct dpu_ctl_cfg sm6150_ctl[] = { 34 + { 35 + .name = "ctl_0", .id = CTL_0, 36 + .base = 0x1000, .len = 0x1e0, 37 + .features = BIT(DPU_CTL_ACTIVE_CFG), 38 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), 39 + }, { 40 + .name = "ctl_1", .id = CTL_1, 41 + .base = 0x1200, .len = 0x1e0, 42 + .features = BIT(DPU_CTL_ACTIVE_CFG), 43 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10), 44 + }, { 45 + .name = "ctl_2", .id = CTL_2, 46 + .base = 0x1400, .len = 0x1e0, 47 + .features = BIT(DPU_CTL_ACTIVE_CFG), 48 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11), 49 + }, { 50 + .name = "ctl_3", .id = CTL_3, 51 + .base = 0x1600, .len = 0x1e0, 52 + .features = BIT(DPU_CTL_ACTIVE_CFG), 53 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12), 54 + }, { 55 + .name = "ctl_4", .id = CTL_4, 56 + .base = 0x1800, .len = 0x1e0, 57 + .features = BIT(DPU_CTL_ACTIVE_CFG), 58 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13), 59 + }, { 60 + .name = "ctl_5", .id = CTL_5, 61 + .base = 0x1a00, .len = 0x1e0, 62 + .features = BIT(DPU_CTL_ACTIVE_CFG), 63 + .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23), 64 + }, 65 + }; 66 + 67 + static const struct dpu_sspp_cfg sm6150_sspp[] = { 68 + { 69 + .name = "sspp_0", .id = SSPP_VIG0, 70 + .base = 0x4000, .len = 0x1f0, 71 + .features = VIG_SDM845_MASK_SDMA, 72 + .sblk = &dpu_vig_sblk_qseed3_2_4, 73 + .xin_id = 0, 74 + .type = SSPP_TYPE_VIG, 75 + .clk_ctrl = DPU_CLK_CTRL_VIG0, 76 + }, { 77 + .name = "sspp_8", .id = SSPP_DMA0, 78 + .base = 0x24000, .len = 0x1f0, 79 + .features = DMA_SDM845_MASK_SDMA, 80 + .sblk = &dpu_dma_sblk, 81 + .xin_id = 1, 82 + .type = SSPP_TYPE_DMA, 83 + .clk_ctrl = DPU_CLK_CTRL_DMA0, 84 + }, { 85 + .name = "sspp_9", .id = SSPP_DMA1, 86 + .base = 0x26000, .len = 0x1f0, 87 + .features = DMA_SDM845_MASK_SDMA, 88 + .sblk = &dpu_dma_sblk, 89 + .xin_id = 5, 90 + .type = SSPP_TYPE_DMA, 91 + .clk_ctrl = DPU_CLK_CTRL_DMA1, 92 + }, { 93 + .name = "sspp_10", .id = SSPP_DMA2, 94 + .base = 0x28000, .len = 0x1f0, 95 + .features = DMA_CURSOR_SDM845_MASK_SDMA, 96 + .sblk = &dpu_dma_sblk, 97 + .xin_id = 9, 98 + .type = SSPP_TYPE_DMA, 99 + .clk_ctrl = DPU_CLK_CTRL_DMA2, 100 + }, { 101 + .name = "sspp_11", .id = SSPP_DMA3, 102 + .base = 0x2a000, .len = 0x1f0, 103 + .features = DMA_CURSOR_SDM845_MASK_SDMA, 104 + .sblk = &dpu_dma_sblk, 105 + .xin_id = 13, 106 + .type = SSPP_TYPE_DMA, 107 + .clk_ctrl = DPU_CLK_CTRL_DMA3, 108 + }, 109 + }; 110 + 111 + static const struct dpu_lm_cfg sm6150_lm[] = { 112 + { 113 + .name = "lm_0", .id = LM_0, 114 + .base = 0x44000, .len = 0x320, 115 + .features = MIXER_QCM2290_MASK, 116 + .sblk = &sdm845_lm_sblk, 117 + .pingpong = PINGPONG_0, 118 + .dspp = DSPP_0, 119 + .lm_pair = LM_1, 120 + }, { 121 + .name = "lm_1", .id = LM_1, 122 + .base = 0x45000, .len = 0x320, 123 + .features = MIXER_QCM2290_MASK, 124 + .sblk = &sdm845_lm_sblk, 125 + .pingpong = PINGPONG_1, 126 + .lm_pair = LM_0, 127 + }, { 128 + .name = "lm_2", .id = LM_2, 129 + .base = 0x46000, .len = 0x320, 130 + .features = MIXER_QCM2290_MASK, 131 + .sblk = &sdm845_lm_sblk, 132 + .pingpong = PINGPONG_2, 133 + }, 134 + }; 135 + 136 + static const struct dpu_dspp_cfg sm6150_dspp[] = { 137 + { 138 + .name = "dspp_0", .id = DSPP_0, 139 + .base = 0x54000, .len = 0x1800, 140 + .features = DSPP_SC7180_MASK, 141 + .sblk = &sdm845_dspp_sblk, 142 + }, 143 + }; 144 + 145 + static const struct dpu_pingpong_cfg sm6150_pp[] = { 146 + { 147 + .name = "pingpong_0", .id = PINGPONG_0, 148 + .base = 0x70000, .len = 0xd4, 149 + .features = PINGPONG_SM8150_MASK, 150 + .sblk = &sdm845_pp_sblk, 151 + .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8), 152 + }, { 153 + .name = "pingpong_1", .id = PINGPONG_1, 154 + .base = 0x70800, .len = 0xd4, 155 + .features = PINGPONG_SM8150_MASK, 156 + .sblk = &sdm845_pp_sblk, 157 + .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9), 158 + }, { 159 + .name = "pingpong_2", .id = PINGPONG_2, 160 + .base = 0x71000, .len = 0xd4, 161 + .features = PINGPONG_SM8150_MASK, 162 + .sblk = &sdm845_pp_sblk, 163 + .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10), 164 + }, 165 + }; 166 + 167 + static const struct dpu_intf_cfg sm6150_intf[] = { 168 + { 169 + .name = "intf_0", .id = INTF_0, 170 + .base = 0x6a000, .len = 0x280, 171 + .features = INTF_SC7180_MASK, 172 + .type = INTF_DP, 173 + .controller_id = MSM_DP_CONTROLLER_0, 174 + .prog_fetch_lines_worst_case = 24, 175 + .intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 24), 176 + .intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 25), 177 + }, { 178 + .name = "intf_1", .id = INTF_1, 179 + .base = 0x6a800, .len = 0x2c0, 180 + .features = INTF_SC7180_MASK, 181 + .type = INTF_DSI, 182 + .controller_id = MSM_DSI_CONTROLLER_0, 183 + .prog_fetch_lines_worst_case = 24, 184 + .intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 26), 185 + .intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 27), 186 + .intr_tear_rd_ptr = DPU_IRQ_IDX(MDP_INTF1_TEAR_INTR, 2), 187 + }, { 188 + .name = "intf_3", .id = INTF_3, 189 + .base = 0x6b800, .len = 0x280, 190 + .features = INTF_SC7180_MASK, 191 + .type = INTF_DP, 192 + .controller_id = MSM_DP_CONTROLLER_1, 193 + .prog_fetch_lines_worst_case = 24, 194 + .intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 30), 195 + .intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 31), 196 + }, 197 + }; 198 + 199 + static const struct dpu_perf_cfg sm6150_perf_data = { 200 + .max_bw_low = 4800000, 201 + .max_bw_high = 4800000, 202 + .min_core_ib = 2400000, 203 + .min_llcc_ib = 0, 204 + .min_dram_ib = 800000, 205 + .min_prefill_lines = 24, 206 + .danger_lut_tbl = {0xf, 0xffff, 0x0}, 207 + .safe_lut_tbl = {0xfff8, 0xf000, 0xffff}, 208 + .qos_lut_tbl = { 209 + {.nentry = ARRAY_SIZE(sm8150_qos_linear), 210 + .entries = sm8150_qos_linear 211 + }, 212 + {.nentry = ARRAY_SIZE(sc7180_qos_macrotile), 213 + .entries = sc7180_qos_macrotile 214 + }, 215 + {.nentry = ARRAY_SIZE(sc7180_qos_nrt), 216 + .entries = sc7180_qos_nrt 217 + }, 218 + /* TODO: macrotile-qseed is different from macrotile */ 219 + }, 220 + .cdp_cfg = { 221 + {.rd_enable = 1, .wr_enable = 1}, 222 + {.rd_enable = 1, .wr_enable = 0} 223 + }, 224 + .clk_inefficiency_factor = 105, 225 + .bw_inefficiency_factor = 120, 226 + }; 227 + 228 + static const struct dpu_mdss_version sm6150_mdss_ver = { 229 + .core_major_ver = 5, 230 + .core_minor_ver = 3, 231 + }; 232 + 233 + const struct dpu_mdss_cfg dpu_sm6150_cfg = { 234 + .mdss_ver = &sm6150_mdss_ver, 235 + .caps = &sm6150_dpu_caps, 236 + .mdp = &sm6150_mdp, 237 + .ctl_count = ARRAY_SIZE(sm6150_ctl), 238 + .ctl = sm6150_ctl, 239 + .sspp_count = ARRAY_SIZE(sm6150_sspp), 240 + .sspp = sm6150_sspp, 241 + .mixer_count = ARRAY_SIZE(sm6150_lm), 242 + .mixer = sm6150_lm, 243 + .dspp_count = ARRAY_SIZE(sm6150_dspp), 244 + .dspp = sm6150_dspp, 245 + .pingpong_count = ARRAY_SIZE(sm6150_pp), 246 + .pingpong = sm6150_pp, 247 + .intf_count = ARRAY_SIZE(sm6150_intf), 248 + .intf = sm6150_intf, 249 + .vbif_count = ARRAY_SIZE(sdm845_vbif), 250 + .vbif = sdm845_vbif, 251 + .perf = &sm6150_perf_data, 252 + }; 253 + 254 + #endif
+1
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
··· 765 765 #include "catalog/dpu_5_0_sm8150.h" 766 766 #include "catalog/dpu_5_1_sc8180x.h" 767 767 #include "catalog/dpu_5_2_sm7150.h" 768 + #include "catalog/dpu_5_3_sm6150.h" 768 769 #include "catalog/dpu_5_4_sm6125.h" 769 770 770 771 #include "catalog/dpu_6_0_sm8250.h"
+1
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
··· 839 839 extern const struct dpu_mdss_cfg dpu_sc7180_cfg; 840 840 extern const struct dpu_mdss_cfg dpu_sm6115_cfg; 841 841 extern const struct dpu_mdss_cfg dpu_sm6125_cfg; 842 + extern const struct dpu_mdss_cfg dpu_sm6150_cfg; 842 843 extern const struct dpu_mdss_cfg dpu_sm6350_cfg; 843 844 extern const struct dpu_mdss_cfg dpu_qcm2290_cfg; 844 845 extern const struct dpu_mdss_cfg dpu_sm6375_cfg;
+1
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
··· 1486 1486 { .compatible = "qcom,sc8280xp-dpu", .data = &dpu_sc8280xp_cfg, }, 1487 1487 { .compatible = "qcom,sm6115-dpu", .data = &dpu_sm6115_cfg, }, 1488 1488 { .compatible = "qcom,sm6125-dpu", .data = &dpu_sm6125_cfg, }, 1489 + { .compatible = "qcom,sm6150-dpu", .data = &dpu_sm6150_cfg, }, 1489 1490 { .compatible = "qcom,sm6350-dpu", .data = &dpu_sm6350_cfg, }, 1490 1491 { .compatible = "qcom,sm6375-dpu", .data = &dpu_sm6375_cfg, }, 1491 1492 { .compatible = "qcom,sm7150-dpu", .data = &dpu_sm7150_cfg, },