mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-21 23:16:50 +08:00
Merge tag 'drm-msm-fixes-2026-03-06' of https://gitlab.freedesktop.org/drm/msm into drm-fixes
Fixes for v7.0: Core: - Adjusted msm_iommu_pagetable_prealloc_allocate() allocation type DPU: - Fixed blue screens on Hamoa laptops by reverting the LM reservation - Fixed the size of the LM block on several platforms - Dropped usage of %pK (again) - Fixed smatch warning on SSPP v13+ code - Fixed INTF_6 interrupts on Lemans DSI: - Fixed DSI PHY revision on Kaanapali - Fixed pixel clock calculation for the bonded DSI mode panels with compression enabled DT bindings: - Fixed DisplayPort description on Glymur - Fixed model name in SM8750 MDSS schema GPU: - Added MODULE_DEVICE_TABLE to the GPU driver - Fix bogus protect error on X2-85 - Fix dma_free_attrs() buffer size - Gen8 UBWC fix for Glymur From: Rob Clark <rob.clark@oss.qualcomm.com> Link: https://patch.msgid.link/CACSVV00wZ95gFDLfzJ0Ywb8rsjPSjZ1aHdwE4smnyuZ=Fg-g8Q@mail.gmail.com Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -253,7 +253,6 @@ allOf:
|
||||
enum:
|
||||
# these platforms support 2 streams MST on some interfaces,
|
||||
# others are SST only
|
||||
- qcom,glymur-dp
|
||||
- qcom,sc8280xp-dp
|
||||
- qcom,x1e80100-dp
|
||||
then:
|
||||
@@ -310,6 +309,26 @@ allOf:
|
||||
minItems: 6
|
||||
maxItems: 8
|
||||
|
||||
- if:
|
||||
properties:
|
||||
compatible:
|
||||
contains:
|
||||
enum:
|
||||
# these platforms support 2 streams MST on some interfaces,
|
||||
# others are SST only, but all controllers have 4 ports
|
||||
- qcom,glymur-dp
|
||||
then:
|
||||
properties:
|
||||
reg:
|
||||
minItems: 9
|
||||
maxItems: 9
|
||||
clocks:
|
||||
minItems: 5
|
||||
maxItems: 6
|
||||
clocks-names:
|
||||
minItems: 5
|
||||
maxItems: 6
|
||||
|
||||
unevaluatedProperties: false
|
||||
|
||||
examples:
|
||||
|
||||
@@ -176,13 +176,17 @@ examples:
|
||||
};
|
||||
};
|
||||
|
||||
displayport-controller@ae90000 {
|
||||
displayport-controller@af54000 {
|
||||
compatible = "qcom,glymur-dp";
|
||||
reg = <0xae90000 0x200>,
|
||||
<0xae90200 0x200>,
|
||||
<0xae90400 0x600>,
|
||||
<0xae91000 0x400>,
|
||||
<0xae91400 0x400>;
|
||||
reg = <0xaf54000 0x200>,
|
||||
<0xaf54200 0x200>,
|
||||
<0xaf55000 0xc00>,
|
||||
<0xaf56000 0x400>,
|
||||
<0xaf57000 0x400>,
|
||||
<0xaf58000 0x400>,
|
||||
<0xaf59000 0x400>,
|
||||
<0xaf5a000 0x600>,
|
||||
<0xaf5b000 0x600>;
|
||||
|
||||
interrupt-parent = <&mdss>;
|
||||
interrupts = <12>;
|
||||
|
||||
@@ -10,7 +10,7 @@ maintainers:
|
||||
- Krzysztof Kozlowski <krzk@kernel.org>
|
||||
|
||||
description:
|
||||
SM8650 MSM Mobile Display Subsystem(MDSS), which encapsulates sub-blocks like
|
||||
SM8750 MSM Mobile Display Subsystem(MDSS), which encapsulates sub-blocks like
|
||||
DPU display controller, DSI and DP interfaces etc.
|
||||
|
||||
$ref: /schemas/display/msm/mdss-common.yaml#
|
||||
|
||||
@@ -78,7 +78,7 @@ static void a2xx_gpummu_destroy(struct msm_mmu *mmu)
|
||||
{
|
||||
struct a2xx_gpummu *gpummu = to_a2xx_gpummu(mmu);
|
||||
|
||||
dma_free_attrs(mmu->dev, TABLE_SIZE, gpummu->table, gpummu->pt_base,
|
||||
dma_free_attrs(mmu->dev, TABLE_SIZE + 32, gpummu->table, gpummu->pt_base,
|
||||
DMA_ATTR_FORCE_CONTIGUOUS);
|
||||
|
||||
kfree(gpummu);
|
||||
|
||||
@@ -1759,7 +1759,7 @@ static const u32 x285_protect_regs[] = {
|
||||
A6XX_PROTECT_NORDWR(0x27c06, 0x0000),
|
||||
};
|
||||
|
||||
DECLARE_ADRENO_PROTECT(x285_protect, 64);
|
||||
DECLARE_ADRENO_PROTECT(x285_protect, 15);
|
||||
|
||||
static const struct adreno_reglist_pipe a840_nonctxt_regs[] = {
|
||||
{ REG_A8XX_CP_SMMU_STREAM_ID_LPAC, 0x00000101, BIT(PIPE_NONE) },
|
||||
@@ -1966,5 +1966,4 @@ static inline __always_unused void __build_asserts(void)
|
||||
BUILD_BUG_ON(a660_protect.count > a660_protect.count_max);
|
||||
BUILD_BUG_ON(a690_protect.count > a690_protect.count_max);
|
||||
BUILD_BUG_ON(a730_protect.count > a730_protect.count_max);
|
||||
BUILD_BUG_ON(a840_protect.count > a840_protect.count_max);
|
||||
}
|
||||
|
||||
@@ -310,11 +310,21 @@ static void a8xx_set_ubwc_config(struct msm_gpu *gpu)
|
||||
hbb = cfg->highest_bank_bit - 13;
|
||||
hbb_hi = hbb >> 2;
|
||||
hbb_lo = hbb & 3;
|
||||
a8xx_write_pipe(gpu, PIPE_BV, REG_A8XX_GRAS_NC_MODE_CNTL, hbb << 5);
|
||||
a8xx_write_pipe(gpu, PIPE_BR, REG_A8XX_GRAS_NC_MODE_CNTL, hbb << 5);
|
||||
|
||||
a8xx_write_pipe(gpu, PIPE_BV, REG_A8XX_GRAS_NC_MODE_CNTL,
|
||||
hbb << 5 |
|
||||
level3_swizzling_dis << 4 |
|
||||
level2_swizzling_dis << 3);
|
||||
|
||||
a8xx_write_pipe(gpu, PIPE_BR, REG_A8XX_GRAS_NC_MODE_CNTL,
|
||||
hbb << 5 |
|
||||
level3_swizzling_dis << 4 |
|
||||
level2_swizzling_dis << 3);
|
||||
|
||||
a8xx_write_pipe(gpu, PIPE_BR, REG_A8XX_RB_CCU_NC_MODE_CNTL,
|
||||
yuvnotcomptofc << 6 |
|
||||
level3_swizzling_dis << 5 |
|
||||
level2_swizzling_dis << 4 |
|
||||
hbb_hi << 3 |
|
||||
hbb_lo << 1);
|
||||
|
||||
|
||||
@@ -302,6 +302,7 @@ static const struct of_device_id dt_match[] = {
|
||||
{ .compatible = "qcom,kgsl-3d0" },
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, dt_match);
|
||||
|
||||
static int adreno_runtime_resume(struct device *dev)
|
||||
{
|
||||
|
||||
@@ -133,7 +133,7 @@ static const struct dpu_sspp_cfg sc8280xp_sspp[] = {
|
||||
static const struct dpu_lm_cfg sc8280xp_lm[] = {
|
||||
{
|
||||
.name = "lm_0", .id = LM_0,
|
||||
.base = 0x44000, .len = 0x320,
|
||||
.base = 0x44000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_1,
|
||||
@@ -141,7 +141,7 @@ static const struct dpu_lm_cfg sc8280xp_lm[] = {
|
||||
.dspp = DSPP_0,
|
||||
}, {
|
||||
.name = "lm_1", .id = LM_1,
|
||||
.base = 0x45000, .len = 0x320,
|
||||
.base = 0x45000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_0,
|
||||
@@ -149,7 +149,7 @@ static const struct dpu_lm_cfg sc8280xp_lm[] = {
|
||||
.dspp = DSPP_1,
|
||||
}, {
|
||||
.name = "lm_2", .id = LM_2,
|
||||
.base = 0x46000, .len = 0x320,
|
||||
.base = 0x46000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_3,
|
||||
@@ -157,7 +157,7 @@ static const struct dpu_lm_cfg sc8280xp_lm[] = {
|
||||
.dspp = DSPP_2,
|
||||
}, {
|
||||
.name = "lm_3", .id = LM_3,
|
||||
.base = 0x47000, .len = 0x320,
|
||||
.base = 0x47000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_2,
|
||||
@@ -165,14 +165,14 @@ static const struct dpu_lm_cfg sc8280xp_lm[] = {
|
||||
.dspp = DSPP_3,
|
||||
}, {
|
||||
.name = "lm_4", .id = LM_4,
|
||||
.base = 0x48000, .len = 0x320,
|
||||
.base = 0x48000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_5,
|
||||
.pingpong = PINGPONG_4,
|
||||
}, {
|
||||
.name = "lm_5", .id = LM_5,
|
||||
.base = 0x49000, .len = 0x320,
|
||||
.base = 0x49000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_4,
|
||||
|
||||
@@ -134,7 +134,7 @@ static const struct dpu_sspp_cfg sm8450_sspp[] = {
|
||||
static const struct dpu_lm_cfg sm8450_lm[] = {
|
||||
{
|
||||
.name = "lm_0", .id = LM_0,
|
||||
.base = 0x44000, .len = 0x320,
|
||||
.base = 0x44000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_1,
|
||||
@@ -142,7 +142,7 @@ static const struct dpu_lm_cfg sm8450_lm[] = {
|
||||
.dspp = DSPP_0,
|
||||
}, {
|
||||
.name = "lm_1", .id = LM_1,
|
||||
.base = 0x45000, .len = 0x320,
|
||||
.base = 0x45000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_0,
|
||||
@@ -150,7 +150,7 @@ static const struct dpu_lm_cfg sm8450_lm[] = {
|
||||
.dspp = DSPP_1,
|
||||
}, {
|
||||
.name = "lm_2", .id = LM_2,
|
||||
.base = 0x46000, .len = 0x320,
|
||||
.base = 0x46000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_3,
|
||||
@@ -158,7 +158,7 @@ static const struct dpu_lm_cfg sm8450_lm[] = {
|
||||
.dspp = DSPP_2,
|
||||
}, {
|
||||
.name = "lm_3", .id = LM_3,
|
||||
.base = 0x47000, .len = 0x320,
|
||||
.base = 0x47000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_2,
|
||||
@@ -166,14 +166,14 @@ static const struct dpu_lm_cfg sm8450_lm[] = {
|
||||
.dspp = DSPP_3,
|
||||
}, {
|
||||
.name = "lm_4", .id = LM_4,
|
||||
.base = 0x48000, .len = 0x320,
|
||||
.base = 0x48000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_5,
|
||||
.pingpong = PINGPONG_4,
|
||||
}, {
|
||||
.name = "lm_5", .id = LM_5,
|
||||
.base = 0x49000, .len = 0x320,
|
||||
.base = 0x49000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_4,
|
||||
|
||||
@@ -366,8 +366,8 @@ static const struct dpu_intf_cfg sa8775p_intf[] = {
|
||||
.type = INTF_NONE,
|
||||
.controller_id = MSM_DP_CONTROLLER_0, /* pair with intf_0 for DP MST */
|
||||
.prog_fetch_lines_worst_case = 24,
|
||||
.intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 17),
|
||||
.intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 16),
|
||||
.intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 16),
|
||||
.intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 17),
|
||||
}, {
|
||||
.name = "intf_7", .id = INTF_7,
|
||||
.base = 0x3b000, .len = 0x280,
|
||||
|
||||
@@ -131,7 +131,7 @@ static const struct dpu_sspp_cfg sm8550_sspp[] = {
|
||||
static const struct dpu_lm_cfg sm8550_lm[] = {
|
||||
{
|
||||
.name = "lm_0", .id = LM_0,
|
||||
.base = 0x44000, .len = 0x320,
|
||||
.base = 0x44000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_1,
|
||||
@@ -139,7 +139,7 @@ static const struct dpu_lm_cfg sm8550_lm[] = {
|
||||
.dspp = DSPP_0,
|
||||
}, {
|
||||
.name = "lm_1", .id = LM_1,
|
||||
.base = 0x45000, .len = 0x320,
|
||||
.base = 0x45000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_0,
|
||||
@@ -147,7 +147,7 @@ static const struct dpu_lm_cfg sm8550_lm[] = {
|
||||
.dspp = DSPP_1,
|
||||
}, {
|
||||
.name = "lm_2", .id = LM_2,
|
||||
.base = 0x46000, .len = 0x320,
|
||||
.base = 0x46000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_3,
|
||||
@@ -155,7 +155,7 @@ static const struct dpu_lm_cfg sm8550_lm[] = {
|
||||
.dspp = DSPP_2,
|
||||
}, {
|
||||
.name = "lm_3", .id = LM_3,
|
||||
.base = 0x47000, .len = 0x320,
|
||||
.base = 0x47000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_2,
|
||||
@@ -163,14 +163,14 @@ static const struct dpu_lm_cfg sm8550_lm[] = {
|
||||
.dspp = DSPP_3,
|
||||
}, {
|
||||
.name = "lm_4", .id = LM_4,
|
||||
.base = 0x48000, .len = 0x320,
|
||||
.base = 0x48000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_5,
|
||||
.pingpong = PINGPONG_4,
|
||||
}, {
|
||||
.name = "lm_5", .id = LM_5,
|
||||
.base = 0x49000, .len = 0x320,
|
||||
.base = 0x49000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_4,
|
||||
|
||||
@@ -131,7 +131,7 @@ static const struct dpu_sspp_cfg sar2130p_sspp[] = {
|
||||
static const struct dpu_lm_cfg sar2130p_lm[] = {
|
||||
{
|
||||
.name = "lm_0", .id = LM_0,
|
||||
.base = 0x44000, .len = 0x320,
|
||||
.base = 0x44000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_1,
|
||||
@@ -139,7 +139,7 @@ static const struct dpu_lm_cfg sar2130p_lm[] = {
|
||||
.dspp = DSPP_0,
|
||||
}, {
|
||||
.name = "lm_1", .id = LM_1,
|
||||
.base = 0x45000, .len = 0x320,
|
||||
.base = 0x45000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_0,
|
||||
@@ -147,7 +147,7 @@ static const struct dpu_lm_cfg sar2130p_lm[] = {
|
||||
.dspp = DSPP_1,
|
||||
}, {
|
||||
.name = "lm_2", .id = LM_2,
|
||||
.base = 0x46000, .len = 0x320,
|
||||
.base = 0x46000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_3,
|
||||
@@ -155,7 +155,7 @@ static const struct dpu_lm_cfg sar2130p_lm[] = {
|
||||
.dspp = DSPP_2,
|
||||
}, {
|
||||
.name = "lm_3", .id = LM_3,
|
||||
.base = 0x47000, .len = 0x320,
|
||||
.base = 0x47000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_2,
|
||||
@@ -163,14 +163,14 @@ static const struct dpu_lm_cfg sar2130p_lm[] = {
|
||||
.dspp = DSPP_3,
|
||||
}, {
|
||||
.name = "lm_4", .id = LM_4,
|
||||
.base = 0x48000, .len = 0x320,
|
||||
.base = 0x48000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_5,
|
||||
.pingpong = PINGPONG_4,
|
||||
}, {
|
||||
.name = "lm_5", .id = LM_5,
|
||||
.base = 0x49000, .len = 0x320,
|
||||
.base = 0x49000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_4,
|
||||
|
||||
@@ -130,7 +130,7 @@ static const struct dpu_sspp_cfg x1e80100_sspp[] = {
|
||||
static const struct dpu_lm_cfg x1e80100_lm[] = {
|
||||
{
|
||||
.name = "lm_0", .id = LM_0,
|
||||
.base = 0x44000, .len = 0x320,
|
||||
.base = 0x44000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_1,
|
||||
@@ -138,7 +138,7 @@ static const struct dpu_lm_cfg x1e80100_lm[] = {
|
||||
.dspp = DSPP_0,
|
||||
}, {
|
||||
.name = "lm_1", .id = LM_1,
|
||||
.base = 0x45000, .len = 0x320,
|
||||
.base = 0x45000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_0,
|
||||
@@ -146,7 +146,7 @@ static const struct dpu_lm_cfg x1e80100_lm[] = {
|
||||
.dspp = DSPP_1,
|
||||
}, {
|
||||
.name = "lm_2", .id = LM_2,
|
||||
.base = 0x46000, .len = 0x320,
|
||||
.base = 0x46000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_3,
|
||||
@@ -154,7 +154,7 @@ static const struct dpu_lm_cfg x1e80100_lm[] = {
|
||||
.dspp = DSPP_2,
|
||||
}, {
|
||||
.name = "lm_3", .id = LM_3,
|
||||
.base = 0x47000, .len = 0x320,
|
||||
.base = 0x47000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_2,
|
||||
@@ -162,14 +162,14 @@ static const struct dpu_lm_cfg x1e80100_lm[] = {
|
||||
.dspp = DSPP_3,
|
||||
}, {
|
||||
.name = "lm_4", .id = LM_4,
|
||||
.base = 0x48000, .len = 0x320,
|
||||
.base = 0x48000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_5,
|
||||
.pingpong = PINGPONG_4,
|
||||
}, {
|
||||
.name = "lm_5", .id = LM_5,
|
||||
.base = 0x49000, .len = 0x320,
|
||||
.base = 0x49000, .len = 0x400,
|
||||
.features = MIXER_MSM8998_MASK,
|
||||
.sblk = &sdm845_lm_sblk,
|
||||
.lm_pair = LM_4,
|
||||
|
||||
@@ -89,7 +89,7 @@ static void dpu_setup_dspp_gc(struct dpu_hw_dspp *ctx,
|
||||
base = ctx->cap->sblk->gc.base;
|
||||
|
||||
if (!base) {
|
||||
DRM_ERROR("invalid ctx %pK gc base\n", ctx);
|
||||
DRM_ERROR("invalid ctx %p gc base\n", ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -156,11 +156,13 @@ static void dpu_hw_sspp_setup_pe_config_v13(struct dpu_hw_sspp *ctx,
|
||||
u8 color;
|
||||
u32 lr_pe[4], tb_pe[4];
|
||||
const u32 bytemask = 0xff;
|
||||
u32 offset = ctx->cap->sblk->sspp_rec0_blk.base;
|
||||
u32 offset;
|
||||
|
||||
if (!ctx || !pe_ext)
|
||||
return;
|
||||
|
||||
offset = ctx->cap->sblk->sspp_rec0_blk.base;
|
||||
|
||||
c = &ctx->hw;
|
||||
/* program SW pixel extension override for all pipes*/
|
||||
for (color = 0; color < DPU_MAX_PLANES; color++) {
|
||||
|
||||
@@ -350,26 +350,28 @@ static bool _dpu_rm_check_lm_and_get_connected_blks(struct dpu_rm *rm,
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool dpu_rm_find_lms(struct dpu_rm *rm,
|
||||
struct dpu_global_state *global_state,
|
||||
uint32_t crtc_id, bool skip_dspp,
|
||||
struct msm_display_topology *topology,
|
||||
int *lm_idx, int *pp_idx, int *dspp_idx)
|
||||
static int _dpu_rm_reserve_lms(struct dpu_rm *rm,
|
||||
struct dpu_global_state *global_state,
|
||||
uint32_t crtc_id,
|
||||
struct msm_display_topology *topology)
|
||||
|
||||
{
|
||||
int lm_idx[MAX_BLOCKS];
|
||||
int pp_idx[MAX_BLOCKS];
|
||||
int dspp_idx[MAX_BLOCKS] = {0};
|
||||
int i, lm_count = 0;
|
||||
|
||||
if (!topology->num_lm) {
|
||||
DPU_ERROR("zero LMs in topology\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Find a primary mixer */
|
||||
for (i = 0; i < ARRAY_SIZE(rm->mixer_blks) &&
|
||||
lm_count < topology->num_lm; i++) {
|
||||
if (!rm->mixer_blks[i])
|
||||
continue;
|
||||
|
||||
if (skip_dspp && to_dpu_hw_mixer(rm->mixer_blks[i])->cap->dspp) {
|
||||
DPU_DEBUG("Skipping LM_%d, skipping LMs with DSPPs\n", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset lm_count to an even index. This will drop the previous
|
||||
* primary mixer if failed to find its peer.
|
||||
@@ -408,38 +410,12 @@ static bool dpu_rm_find_lms(struct dpu_rm *rm,
|
||||
}
|
||||
}
|
||||
|
||||
return lm_count == topology->num_lm;
|
||||
}
|
||||
|
||||
static int _dpu_rm_reserve_lms(struct dpu_rm *rm,
|
||||
struct dpu_global_state *global_state,
|
||||
uint32_t crtc_id,
|
||||
struct msm_display_topology *topology)
|
||||
|
||||
{
|
||||
int lm_idx[MAX_BLOCKS];
|
||||
int pp_idx[MAX_BLOCKS];
|
||||
int dspp_idx[MAX_BLOCKS] = {0};
|
||||
int i;
|
||||
bool found;
|
||||
|
||||
if (!topology->num_lm) {
|
||||
DPU_ERROR("zero LMs in topology\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Try using non-DSPP LM blocks first */
|
||||
found = dpu_rm_find_lms(rm, global_state, crtc_id, !topology->num_dspp,
|
||||
topology, lm_idx, pp_idx, dspp_idx);
|
||||
if (!found && !topology->num_dspp)
|
||||
found = dpu_rm_find_lms(rm, global_state, crtc_id, false,
|
||||
topology, lm_idx, pp_idx, dspp_idx);
|
||||
if (!found) {
|
||||
if (lm_count != topology->num_lm) {
|
||||
DPU_DEBUG("unable to find appropriate mixers\n");
|
||||
return -ENAVAIL;
|
||||
}
|
||||
|
||||
for (i = 0; i < topology->num_lm; i++) {
|
||||
for (i = 0; i < lm_count; i++) {
|
||||
global_state->mixer_to_crtc_id[lm_idx[i]] = crtc_id;
|
||||
global_state->pingpong_to_crtc_id[pp_idx[i]] = crtc_id;
|
||||
global_state->dspp_to_crtc_id[dspp_idx[i]] =
|
||||
|
||||
@@ -584,13 +584,30 @@ void dsi_link_clk_disable_v2(struct msm_dsi_host *msm_host)
|
||||
* FIXME: Reconsider this if/when CMD mode handling is rewritten to use
|
||||
* transfer time and data overhead as a starting point of the calculations.
|
||||
*/
|
||||
static unsigned long dsi_adjust_pclk_for_compression(const struct drm_display_mode *mode,
|
||||
const struct drm_dsc_config *dsc)
|
||||
static unsigned long
|
||||
dsi_adjust_pclk_for_compression(const struct drm_display_mode *mode,
|
||||
const struct drm_dsc_config *dsc,
|
||||
bool is_bonded_dsi)
|
||||
{
|
||||
int new_hdisplay = DIV_ROUND_UP(mode->hdisplay * drm_dsc_get_bpp_int(dsc),
|
||||
dsc->bits_per_component * 3);
|
||||
int hdisplay, new_hdisplay, new_htotal;
|
||||
|
||||
int new_htotal = mode->htotal - mode->hdisplay + new_hdisplay;
|
||||
/*
|
||||
* For bonded DSI, split hdisplay across two links and round up each
|
||||
* half separately, passing the full hdisplay would only round up once.
|
||||
* This also aligns with the hdisplay we program later in
|
||||
* dsi_timing_setup()
|
||||
*/
|
||||
hdisplay = mode->hdisplay;
|
||||
if (is_bonded_dsi)
|
||||
hdisplay /= 2;
|
||||
|
||||
new_hdisplay = DIV_ROUND_UP(hdisplay * drm_dsc_get_bpp_int(dsc),
|
||||
dsc->bits_per_component * 3);
|
||||
|
||||
if (is_bonded_dsi)
|
||||
new_hdisplay *= 2;
|
||||
|
||||
new_htotal = mode->htotal - mode->hdisplay + new_hdisplay;
|
||||
|
||||
return mult_frac(mode->clock * 1000u, new_htotal, mode->htotal);
|
||||
}
|
||||
@@ -603,7 +620,7 @@ static unsigned long dsi_get_pclk_rate(const struct drm_display_mode *mode,
|
||||
pclk_rate = mode->clock * 1000u;
|
||||
|
||||
if (dsc)
|
||||
pclk_rate = dsi_adjust_pclk_for_compression(mode, dsc);
|
||||
pclk_rate = dsi_adjust_pclk_for_compression(mode, dsc, is_bonded_dsi);
|
||||
|
||||
/*
|
||||
* For bonded DSI mode, the current DRM mode has the complete width of the
|
||||
@@ -993,7 +1010,7 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
|
||||
|
||||
if (msm_host->dsc) {
|
||||
struct drm_dsc_config *dsc = msm_host->dsc;
|
||||
u32 bytes_per_pclk;
|
||||
u32 bits_per_pclk;
|
||||
|
||||
/* update dsc params with timing params */
|
||||
if (!dsc || !mode->hdisplay || !mode->vdisplay) {
|
||||
@@ -1015,7 +1032,9 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
|
||||
|
||||
/*
|
||||
* DPU sends 3 bytes per pclk cycle to DSI. If widebus is
|
||||
* enabled, bus width is extended to 6 bytes.
|
||||
* enabled, MDP always sends out 48-bit compressed data per
|
||||
* pclk and on average, DSI consumes an amount of compressed
|
||||
* data equivalent to the uncompressed pixel depth per pclk.
|
||||
*
|
||||
* Calculate the number of pclks needed to transmit one line of
|
||||
* the compressed data.
|
||||
@@ -1027,12 +1046,12 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
|
||||
* unused anyway.
|
||||
*/
|
||||
h_total -= hdisplay;
|
||||
if (wide_bus_enabled && !(msm_host->mode_flags & MIPI_DSI_MODE_VIDEO))
|
||||
bytes_per_pclk = 6;
|
||||
if (wide_bus_enabled)
|
||||
bits_per_pclk = mipi_dsi_pixel_format_to_bpp(msm_host->format);
|
||||
else
|
||||
bytes_per_pclk = 3;
|
||||
bits_per_pclk = 24;
|
||||
|
||||
hdisplay = DIV_ROUND_UP(msm_dsc_get_bytes_per_line(msm_host->dsc), bytes_per_pclk);
|
||||
hdisplay = DIV_ROUND_UP(msm_dsc_get_bytes_per_line(msm_host->dsc) * 8, bits_per_pclk);
|
||||
|
||||
h_total += hdisplay;
|
||||
ha_end = ha_start + hdisplay;
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
#define DSI_PHY_7NM_QUIRK_V4_3 BIT(3)
|
||||
/* Hardware is V5.2 */
|
||||
#define DSI_PHY_7NM_QUIRK_V5_2 BIT(4)
|
||||
/* Hardware is V7.0 */
|
||||
#define DSI_PHY_7NM_QUIRK_V7_0 BIT(5)
|
||||
/* Hardware is V7.2 */
|
||||
#define DSI_PHY_7NM_QUIRK_V7_2 BIT(5)
|
||||
|
||||
struct dsi_pll_config {
|
||||
bool enable_ssc;
|
||||
@@ -143,7 +143,7 @@ static void dsi_pll_calc_dec_frac(struct dsi_pll_7nm *pll, struct dsi_pll_config
|
||||
|
||||
if (pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_PRE_V4_1) {
|
||||
config->pll_clock_inverters = 0x28;
|
||||
} else if ((pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_0)) {
|
||||
} else if ((pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_2)) {
|
||||
if (pll_freq < 163000000ULL)
|
||||
config->pll_clock_inverters = 0xa0;
|
||||
else if (pll_freq < 175000000ULL)
|
||||
@@ -284,7 +284,7 @@ static void dsi_pll_config_hzindep_reg(struct dsi_pll_7nm *pll)
|
||||
}
|
||||
|
||||
if ((pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V5_2) ||
|
||||
(pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_0)) {
|
||||
(pll->phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_2)) {
|
||||
if (pll->vco_current_rate < 1557000000ULL)
|
||||
vco_config_1 = 0x08;
|
||||
else
|
||||
@@ -699,7 +699,7 @@ static int dsi_7nm_set_usecase(struct msm_dsi_phy *phy)
|
||||
case MSM_DSI_PHY_MASTER:
|
||||
pll_7nm->slave = pll_7nm_list[(pll_7nm->phy->id + 1) % DSI_MAX];
|
||||
/* v7.0: Enable ATB_EN0 and alternate clock output to external phy */
|
||||
if (phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_0)
|
||||
if (phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_2)
|
||||
writel(0x07, base + REG_DSI_7nm_PHY_CMN_CTRL_5);
|
||||
break;
|
||||
case MSM_DSI_PHY_SLAVE:
|
||||
@@ -987,7 +987,7 @@ static int dsi_7nm_phy_enable(struct msm_dsi_phy *phy,
|
||||
/* Request for REFGEN READY */
|
||||
if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_3) ||
|
||||
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V5_2) ||
|
||||
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_0)) {
|
||||
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_2)) {
|
||||
writel(0x1, phy->base + REG_DSI_7nm_PHY_CMN_GLBL_DIGTOP_SPARE10);
|
||||
udelay(500);
|
||||
}
|
||||
@@ -1021,7 +1021,7 @@ static int dsi_7nm_phy_enable(struct msm_dsi_phy *phy,
|
||||
lane_ctrl0 = 0x1f;
|
||||
}
|
||||
|
||||
if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_0)) {
|
||||
if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_2)) {
|
||||
if (phy->cphy_mode) {
|
||||
/* TODO: different for second phy */
|
||||
vreg_ctrl_0 = 0x57;
|
||||
@@ -1097,7 +1097,7 @@ static int dsi_7nm_phy_enable(struct msm_dsi_phy *phy,
|
||||
|
||||
/* program CMN_CTRL_4 for minor_ver 2 chipsets*/
|
||||
if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V5_2) ||
|
||||
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_0) ||
|
||||
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_2) ||
|
||||
(readl(base + REG_DSI_7nm_PHY_CMN_REVISION_ID0) & (0xf0)) == 0x20)
|
||||
writel(0x04, base + REG_DSI_7nm_PHY_CMN_CTRL_4);
|
||||
|
||||
@@ -1213,7 +1213,7 @@ static void dsi_7nm_phy_disable(struct msm_dsi_phy *phy)
|
||||
/* Turn off REFGEN Vote */
|
||||
if ((phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V4_3) ||
|
||||
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V5_2) ||
|
||||
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_0)) {
|
||||
(phy->cfg->quirks & DSI_PHY_7NM_QUIRK_V7_2)) {
|
||||
writel(0x0, base + REG_DSI_7nm_PHY_CMN_GLBL_DIGTOP_SPARE10);
|
||||
wmb();
|
||||
/* Delay to ensure HW removes vote before PHY shut down */
|
||||
@@ -1502,7 +1502,7 @@ const struct msm_dsi_phy_cfg dsi_phy_3nm_8750_cfgs = {
|
||||
#endif
|
||||
.io_start = { 0xae95000, 0xae97000 },
|
||||
.num_dsi_phy = 2,
|
||||
.quirks = DSI_PHY_7NM_QUIRK_V7_0,
|
||||
.quirks = DSI_PHY_7NM_QUIRK_V7_2,
|
||||
};
|
||||
|
||||
const struct msm_dsi_phy_cfg dsi_phy_3nm_kaanapali_cfgs = {
|
||||
@@ -1525,5 +1525,5 @@ const struct msm_dsi_phy_cfg dsi_phy_3nm_kaanapali_cfgs = {
|
||||
#endif
|
||||
.io_start = { 0x9ac1000, 0x9ac4000 },
|
||||
.num_dsi_phy = 2,
|
||||
.quirks = DSI_PHY_7NM_QUIRK_V7_0,
|
||||
.quirks = DSI_PHY_7NM_QUIRK_V7_2,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user