drm/msm/dpu: more catalog fixes
v5 cover drm/msm/dpu: more catalog fixes
This is a spin-off from [1]. Since most of the patches have been merged, split away the small fixes. Continue the versioning of the patches.
Changes since v4:
- Fix commit message of sc8280xp patch. It is split display/panel rather than split source (Abhinav)
- Added DSC_4 and DSC_5 to sc8180x patch (Abhinav)
- Expanded commit message of the sm8450's CTL patch to describe all reasons to use existing masks for the SoC CTL features.
[1] https://patchwork.freedesktop.org/series/113910/
Dmitry Baryshkov (4):
drm/msm/dpu: enable DPU_CTL_SPLIT_DISPLAY for sc8280xp drm/msm/dpu: enable DSPP_2/3 for LM_2/3 on sm8450 drm/msm/dpu: enable DSPP and DSC on sc8180x drm/msm/dpu: use CTL_SC7280_MASK for sm8450's ctl_0
.../msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 28 +++++++++++++++++-- .../msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 5 ++-- .../msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 6 ++-- 3 files changed, 32 insertions(+), 7 deletions(-)
Signature · 1 line
2.39.2
PATCH v5 1/4 drm/msm/dpu: enable DPU_CTL_SPLIT_DISPLAY for sc8280xp
Theoretically, since sm8150 we should be using a single CTL for the split panel case, but since we do not support it for now, fallback to DPU_CTL_SPLIT_DISPLAY.
--- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h +3 -2
@@ -42,17 +42,18 @@ static const struct dpu_mdp_cfg sc8280xp_mdp[] = { }, }; +/* FIXME: get rid of DPU_CTL_SPLIT_DISPLAY in favour of proper ACTIVE_CTL support */ static const struct dpu_ctl_cfg sc8280xp_ctl[] = { { .name ="ctl_0" , .id =CTL_0 , .base =0x15000 , .len =0x204 , - .features =CTL_SC7280_MASK , + .features =BIT (DPU_CTL_SPLIT_DISPLAY ) |CTL_SC7280_MASK , .intr_start =DPU_IRQ_IDX (MDP_SSPP_TOP0_INTR2 ,9 ), }, { .name ="ctl_1" , .id =CTL_1 , .base =0x16000 , .len =0x204 , - .features =CTL_SC7280_MASK , + .features =BIT (DPU_CTL_SPLIT_DISPLAY ) |CTL_SC7280_MASK , .intr_start =DPU_IRQ_IDX (MDP_SSPP_TOP0_INTR2 ,10 ), }, {
Signature · 1 line
2.39.2
Re: [PATCH v5 1/4] drm/msm/dpu: enable DPU_CTL_SPLIT_DISPLAY for sc8280xp
Quoted 5 lines · Dmitry Baryshkov
Theoretically, since sm8150 we should be using a single CTL for the split panel case, but since we do not support it for now, fallback to
DPU_CTL_SPLIT_DISPLAY.Signed-off-by Dmitry Baryshkov <[email protected]>
PATCH v5 2/4 drm/msm/dpu: enable DSPP_2/3 for LM_2/3 on sm8450
In reply to Dmitry BaryshkovMark DSPP_2 and DSPP_3 as used for LM_2 and LM_3
--- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h +2 -2
@@ -107,9 +107,9 @@ static const struct dpu_lm_cfg sm8450_lm[] = {LM_BLK ("lm_1" ,LM_1 ,0x45000 ,MIXER_SDM845_MASK , &sdm845_lm_sblk,PINGPONG_1 ,LM_0 ,DSPP_1 ),LM_BLK ("lm_2" ,LM_2 ,0x46000 ,MIXER_SDM845_MASK , - &sdm845_lm_sblk,PINGPONG_2 ,LM_3 ,0 ), + &sdm845_lm_sblk,PINGPONG_2 ,LM_3 ,DSPP_2 ),LM_BLK ("lm_3" ,LM_3 ,0x47000 ,MIXER_SDM845_MASK , - &sdm845_lm_sblk,PINGPONG_3 ,LM_2 ,0 ), + &sdm845_lm_sblk,PINGPONG_3 ,LM_2 ,DSPP_3 ),LM_BLK ("lm_4" ,LM_4 ,0x48000 ,MIXER_SDM845_MASK , &sdm845_lm_sblk,PINGPONG_4 ,LM_5 ,0 ), LM_BLK("lm_5", LM_5, 0x49000, MIXER_SDM845_MASK,
Signature · 1 line
2.39.2
Re: [PATCH v5 2/4] drm/msm/dpu: enable DSPP_2/3 for LM_2/3 on sm8450
Quoted 5 lines · Dmitry Baryshkov
Mark
DSPP_2andDSPP_3as used forLM_2andLM_3Fixes 100d7ef6995d ("drm/msm/dpu: add support for SM8450")Signed-off-by Dmitry Baryshkov <[email protected]>---
PATCH v5 3/4 drm/msm/dpu: enable DSPP and DSC on sc8180x
In reply to Dmitry BaryshkovEnable DSPP and DSC hardware blocks on sc8180x platform.
--- .../msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h +26 -2
@@ -102,9 +102,9 @@ static const struct dpu_sspp_cfg sc8180x_sspp[] = {static const struct dpu_lm_cfg sc8180x_lm[] = {LM_BLK ("lm_0" ,LM_0 ,0x44000 ,MIXER_SDM845_MASK , - &sdm845_lm_sblk,PINGPONG_0 ,LM_1 ,0 ), + &sdm845_lm_sblk,PINGPONG_0 ,LM_1 ,DSPP_0 ),LM_BLK ("lm_1" ,LM_1 ,0x45000 ,MIXER_SDM845_MASK , - &sdm845_lm_sblk,PINGPONG_1 ,LM_0 ,0 ), + &sdm845_lm_sblk,PINGPONG_1 ,LM_0 ,DSPP_1 ),LM_BLK ("lm_2" ,LM_2 ,0x46000 ,MIXER_SDM845_MASK , &sdm845_lm_sblk,PINGPONG_2 ,LM_3 ,0 ), LM_BLK("lm_3", LM_3, 0x47000, MIXER_SDM845_MASK,
@@ -115,6 +115,17 @@ static const struct dpu_lm_cfg sc8180x_lm[] = { &sdm845_lm_sblk, PINGPONG_5, LM_4, 0), }; +static const struct dpu_dspp_cfg sc8180x_dspp[] = { +DSPP_BLK ("dspp_0" ,DSPP_0 ,0x54000 ,DSPP_SC7180_MASK , + &sm8150_dspp_sblk), +DSPP_BLK ("dspp_1" ,DSPP_1 ,0x56000 ,DSPP_SC7180_MASK , + &sm8150_dspp_sblk), +DSPP_BLK ("dspp_2" ,DSPP_2 ,0x58000 ,DSPP_SC7180_MASK , + &sm8150_dspp_sblk), +DSPP_BLK ("dspp_3" ,DSPP_3 ,0x5a000 ,DSPP_SC7180_MASK , + &sm8150_dspp_sblk), +}; +static const struct dpu_pingpong_cfg sc8180x_pp[] = { PP_BLK_TE("pingpong_0", PINGPONG_0, 0x70000, MERGE_3D_0, sdm845_pp_sblk_te, DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8),
@@ -142,6 +153,15 @@ static const struct dpu_merge_3d_cfg sc8180x_merge_3d[] = { MERGE_3D_BLK("merge_3d_2", MERGE_3D_2, 0x83200), }; +static const struct dpu_dsc_cfg sc8180x_dsc[] = { +DSC_BLK ("dsc_0" ,DSC_0 ,0x80000 ,BIT (DPU_DSC_OUTPUT_CTRL )), +DSC_BLK ("dsc_1" ,DSC_1 ,0x80400 ,BIT (DPU_DSC_OUTPUT_CTRL )), +DSC_BLK ("dsc_2" ,DSC_2 ,0x80800 ,BIT (DPU_DSC_OUTPUT_CTRL )), +DSC_BLK ("dsc_3" ,DSC_3 ,0x80c00 ,BIT (DPU_DSC_OUTPUT_CTRL )), +DSC_BLK ("dsc_4" ,DSC_4 ,0x81000 ,BIT (DPU_DSC_OUTPUT_CTRL )), +DSC_BLK ("dsc_5" ,DSC_5 ,0x81400 ,BIT (DPU_DSC_OUTPUT_CTRL )), +}; +static const struct dpu_intf_cfg sc8180x_intf[] = {INTF_BLK ("intf_0" ,INTF_0 ,0x6a000 ,0x280 ,INTF_DP ,MSM_DP_CONTROLLER_0 ,24 ,INTF_SC7180_MASK ,MDP_SSPP_TOP0_INTR ,24 ,25 ),INTF_BLK ("intf_1" ,INTF_1 ,0x6a800 ,0x2bc ,INTF_DSI ,0 ,24 ,INTF_SC7180_MASK ,MDP_SSPP_TOP0_INTR ,26 ,27 ),
@@ -190,6 +210,10 @@ const struct dpu_mdss_cfg dpu_sc8180x_cfg = { .sspp = sc8180x_sspp, .mixer_count = ARRAY_SIZE(sc8180x_lm), .mixer = sc8180x_lm, + .dspp_count = ARRAY_SIZE(sc8180x_dspp), + .dspp = sc8180x_dspp, + .dsc_count = ARRAY_SIZE(sc8180x_dsc), + .dsc = sc8180x_dsc, .pingpong_count = ARRAY_SIZE(sc8180x_pp), .pingpong = sc8180x_pp, .merge_3d_count = ARRAY_SIZE(sc8180x_merge_3d),
Signature · 1 line
2.39.2
Re: [PATCH v5 3/4] drm/msm/dpu: enable DSPP and DSC on sc8180x
Quoted 4 lines · Dmitry Baryshkov
Enable DSPP and DSC hardware blocks on sc8180x platform.
Signed-off-by Dmitry Baryshkov <[email protected]>---
PATCH v5 4/4 drm/msm/dpu: use CTL_SC7280_MASK for sm8450's ctl_0
In reply to Dmitry BaryshkovOn sm8450 platform the CTL_0 doesn't differ from the rest of CTL blocks, so switch it to CTL_SC7280_MASK too.
Some background: original commit 100d7ef6995d ("drm/msm/dpu: add support for SM8450") had all (relevant at that time) bit spelled individually. Then commit 0e91bcbb0016 ("drm/msm/dpu: Add SM8350 to hw catalog"), despite being a mismerge, correctly changed all other CTL entries to use CTL_SC7280_MASK, except CTL_0.
While the current BLOCK_SOC_MASK style is not ideal (and while we are working on a better scheme), let's follow its usage as a least minimal surprise. For example, sc8280xp, a close associate of sm8450, also uses CTL_SC7280_MASK.
--- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h +1 -1
@@ -47,7 +47,7 @@ static const struct dpu_ctl_cfg sm8450_ctl[] = { { .name = "ctl_0", .id = CTL_0, .base = 0x15000, .len = 0x204, - .features = BIT(DPU_CTL_ACTIVE_CFG) | BIT(DPU_CTL_SPLIT_DISPLAY) | BIT(DPU_CTL_FETCH_ACTIVE), + .features = BIT(DPU_CTL_SPLIT_DISPLAY) | CTL_SC7280_MASK, .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9), }, {
Signature · 1 line
2.39.2
Re: [PATCH v5 4/4] drm/msm/dpu: use CTL_SC7280_MASK for sm8450's ctl_0
Quoted 9 lines · Dmitry Baryshkov
On sm8450 platform the
CTL_0doesn't differ from the rest of CTL blocks, so switch it toCTL_SC7280_MASKtoo.Some background: original commit
100d7ef6995d("drm/msm/dpu: add support for SM8450") had all (relevant at that time) bit spelled individually. Then commit0e91bcbb0016("drm/msm/dpu: Add SM8350 to hw catalog"), despite being a mismerge, correctly changed all other CTL entries to useCTL_SC7280_MASK, exceptCTL_0.
Quoted 7 lines
While the current
BLOCK_SOC_MASKstyle is not ideal (and while we are working on a better scheme), let's follow its usage as a least minimal surprise. For example, sc8280xp, a close associate of sm8450, also usesCTL_SC7280_MASK.Signed-off-by Dmitry Baryshkov <[email protected]>---
Although I dont totally agree with this, but because sc8280xp also uses the same, I am fine.
But either we need to work on a better scheme or expand the macros but not duplicate these for the next chipset which gets added.
Re: [PATCH v5 4/4] drm/msm/dpu: use CTL_SC7280_MASK for sm8450's ctl_0
Quoted 20 lines · Abhinav Kumar
Quoted 9 lines · Dmitry Baryshkov
On sm8450 platform the
CTL_0doesn't differ from the rest of CTL blocks, so switch it toCTL_SC7280_MASKtoo.Some background: original commit
100d7ef6995d("drm/msm/dpu: add support for SM8450") had all (relevant at that time) bit spelled individually. Then commit0e91bcbb0016("drm/msm/dpu: Add SM8350 to hw catalog"), despite being a mismerge, correctly changed all other CTL entries to useCTL_SC7280_MASK, exceptCTL_0.Quoted 7 lines
While the current
BLOCK_SOC_MASKstyle is not ideal (and while we are working on a better scheme), let's follow its usage as a least minimal surprise. For example, sc8280xp, a close associate of sm8450, also usesCTL_SC7280_MASK.Signed-off-by Dmitry Baryshkov <[email protected]>---
Quoted 6 lines
Although I dont totally agree with this, but because sc8280xp also uses the same, I am fine.
Reviewed-by Abhinav Kumar <[email protected]>But either we need to work on a better scheme or expand the macros but not duplicate these for the next chipset which gets added.
Yes. I'm also holding the rest of MASK renaming patches for now.
I'd like to the following major items finalized and merged (probably a goal for 6.5):
- INTF_TE restructure
- QSEED3/4 refactoring
- Proper support for active CTLs (wip), removing the need for DPU_CTL_SPLIT_DISPLAY on sm8150+
- Pending platforms (2 from 6.x, one from 5.x, hopefully one from 4.x too, 3.x if possible). Hopefully this will also include more platforms from recent DPU generations (8.x, 9.x)
- Ideally: also sort out max SSPP line widths for VIG vs DMA
I think that after this we can return to the question of platform similarities and differences.
Anyway, with the current msm-next + this patchset we should have a catalog which one can expand without fearing about conflicts or incorrect data duplication.
Signature · 2 lines
With best wishes Dmitry