Re: [PATCH 3/4] drm/msm/dpu: use PINGPONG_NONE for LMs with no PP attached

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/05/2023 01:17, Marijn Suijten wrote:
On 2023-04-30 23:35:55, Dmitry Baryshkov wrote:
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.

dpu_lm_cfg::pingpong still has a doc-comment stating that PINGPONG_MAX
is to be used if this is unsupported, that should be updated to read
PINGPONG_NONE as well.


Ack, missed that. Thanks for the note.


Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>

Good cleanup otherwise:

Reviewed-by: Marijn Suijten <marijn.suijten@xxxxxxxxxxxxxx>

---
  drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 4 ++--
  drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h  | 4 ++--
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h             | 3 ++-
  drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c                  | 2 +-
  4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h
index bdcd554fc8a8..6ae30f806ebc 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h
@@ -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),
  };
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h
index ceca741e93c9..4a94fd9b64a9 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h
@@ -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),
  };
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
index 2d9192a6ce00..56826a92c155 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
@@ -191,7 +191,8 @@ enum dpu_dsc {
  };
enum dpu_pingpong {
-	PINGPONG_0 = 1,
+	PINGPONG_NONE,
+	PINGPONG_0,
  	PINGPONG_1,
  	PINGPONG_2,
  	PINGPONG_3,
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
index d5a06628885e..bf7b8e7c45b1 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
@@ -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;
  		}
--
2.39.2


--
With best wishes
Dmitry




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux