]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/msm/dpu: use PINGPONG_NONE for LMs with no PP attached
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 19 May 2023 23:40:24 +0000 (02:40 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Mon, 22 May 2023 07:14:19 +0000 (10:14 +0300)
On msm8998/sdm845 some LM blocks do not have corresponding PINGPONG
block. Currently the driver uses PINGPONG_MAX for such cases. Switch
that to use PINGPONG_NONE instead, which is more logical.

Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/538205/
Link: https://lore.kernel.org/r/20230519234025.2864377-4-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c

index 37a52b4ef8d39bbba818a76f31b99373301a5584..3c732a0360c706878c6cbc6b676fb812ea5b0485 100644 (file)
@@ -104,9 +104,9 @@ static const struct dpu_lm_cfg msm8998_lm[] = {
        LM_BLK("lm_2", LM_2, 0x46000, MIXER_MSM8998_MASK,
                &msm8998_lm_sblk, PINGPONG_2, LM_5, 0),
        LM_BLK("lm_3", LM_3, 0x47000, MIXER_MSM8998_MASK,
-               &msm8998_lm_sblk, PINGPONG_MAX, 0, 0),
+               &msm8998_lm_sblk, PINGPONG_NONE, 0, 0),
        LM_BLK("lm_4", LM_4, 0x48000, MIXER_MSM8998_MASK,
-               &msm8998_lm_sblk, PINGPONG_MAX, 0, 0),
+               &msm8998_lm_sblk, PINGPONG_NONE, 0, 0),
        LM_BLK("lm_5", LM_5, 0x49000, MIXER_MSM8998_MASK,
                &msm8998_lm_sblk, PINGPONG_3, LM_2, 0),
 };
index 0b727252671c0a097ac7f452760eba537e0139e0..36ea1af1089496502c62a67ce870902ebd25ec21 100644 (file)
@@ -102,9 +102,9 @@ static const struct dpu_lm_cfg sdm845_lm[] = {
        LM_BLK("lm_2", LM_2, 0x46000, MIXER_SDM845_MASK,
                &sdm845_lm_sblk, PINGPONG_2, LM_5, 0),
        LM_BLK("lm_3", LM_3, 0x0, MIXER_SDM845_MASK,
-               &sdm845_lm_sblk, PINGPONG_MAX, 0, 0),
+               &sdm845_lm_sblk, PINGPONG_NONE, 0, 0),
        LM_BLK("lm_4", LM_4, 0x0, MIXER_SDM845_MASK,
-               &sdm845_lm_sblk, PINGPONG_MAX, 0, 0),
+               &sdm845_lm_sblk, PINGPONG_NONE, 0, 0),
        LM_BLK("lm_5", LM_5, 0x49000, MIXER_SDM845_MASK,
                &sdm845_lm_sblk, PINGPONG_3, LM_2, 0),
 };
index 1cb5699a5a477ebda00e869e39e56f966439ec4d..677048cc3b7d77ff4251fc46de878f8f77278a77 100644 (file)
@@ -529,7 +529,7 @@ struct dpu_sspp_cfg {
  * @base               register offset of this block
  * @features           bit mask identifying sub-blocks/features
  * @sblk:              LM Sub-blocks information
- * @pingpong:          ID of connected PingPong, PINGPONG_MAX if unsupported
+ * @pingpong:          ID of connected PingPong, PINGPONG_NONE if unsupported
  * @lm_pair_mask:      Bitmask of LMs that can be controlled by same CTL
  */
 struct dpu_lm_cfg {
index 1913a19de7336dc2927babbddd038f2c83c65837..02a0f48aac94a5492f344bd3c64eb723297ec49c 100644 (file)
@@ -191,7 +191,8 @@ enum dpu_dsc {
 };
 
 enum dpu_pingpong {
-       PINGPONG_0 = 1,
+       PINGPONG_NONE,
+       PINGPONG_0,
        PINGPONG_1,
        PINGPONG_2,
        PINGPONG_3,
index d5a06628885eeddb61c9d42b2c11b27b83c4c3b9..bf7b8e7c45b1348435924f48bdb5f6e3dd69fe62 100644 (file)
@@ -117,7 +117,7 @@ int dpu_rm_init(struct dpu_rm *rm,
                struct dpu_hw_mixer *hw;
                const struct dpu_lm_cfg *lm = &cat->mixer[i];
 
-               if (lm->pingpong == PINGPONG_MAX) {
+               if (lm->pingpong == PINGPONG_NONE) {
                        DPU_DEBUG("skip mixer %d without pingpong\n", lm->id);
                        continue;
                }