Skip to contentSkip to conversation

drm/msm/dpu: correct clk bit for WB2 block

PATCH Applied Dmitry Baryshkov 3 participants 4 messages Dec 3, 2023 – Dec 6, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/msm/dpu: correct clk bit for WB2 block

On sc7280 there are two clk bits for WB2: vbif_cli and clk_ctrl. While programming the VBIF params of WB, the driver should be toggling the former bit, while the sc7180_mdp, sc7280_mdp and sm8250_mdp structs list the latter one.

Correct that to ensure proper programming sequence for WB2 on these platforms.

Fixes 255f056181ac ("drm/msm/dpu: sc7180: add missing WB2 clock control")
Fixes 3ce166380567 ("drm/msm/dpu: add writeback support for sc7280")
Fixes 53324b99bd7b ("drm/msm/dpu: add writeback blocks to the sm8250 DPU catalog")

---

Changes since v1:
- Fixed the bits for all three platforms supporting WB (Abhinav)

---
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 2 +-
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 2 +-
 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h +1 -1
index 94278a3e3483..9f8068fa0175 100644
@@ -32,7 +32,7 @@ static const struct dpu_mdp_cfg sm8250_mdp = {
 		[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2bc, .bit_off = 8 },
 		[DPU_CLK_CTRL_DMA3] = { .reg_off = 0x2c4, .bit_off = 8 },
 		[DPU_CLK_CTRL_REG_DMA] = { .reg_off = 0x2bc, .bit_off = 20 },
-		[DPU_CLK_CTRL_WB2] = { .reg_off = 0x3b8, .bit_off = 24 },
+		[DPU_CLK_CTRL_WB2] = { .reg_off = 0x2bc, .bit_off = 16 },
 	},
 };
 
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h +1 -1
index c0d88ddccb28..9bfa15e4e645 100644
@@ -25,7 +25,7 @@ static const struct dpu_mdp_cfg sc7180_mdp = {
 		[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
 		[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8 },
 		[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2c4, .bit_off = 8 },
-		[DPU_CLK_CTRL_WB2] = { .reg_off = 0x3b8, .bit_off = 24 },
+		[DPU_CLK_CTRL_WB2] = { .reg_off = 0x2bc, .bit_off = 16 },
 	},
 };
 
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h +1 -1
index 15942fa5a8e0..b9c296e51e36 100644
@@ -25,7 +25,7 @@ static const struct dpu_mdp_cfg sc7280_mdp = {
 		[DPU_CLK_CTRL_DMA0] = { .reg_off = 0x2ac, .bit_off = 8 },
 		[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8 },
 		[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2c4, .bit_off = 8 },
-		[DPU_CLK_CTRL_WB2] = { .reg_off = 0x3b8, .bit_off = 24 },
+		[DPU_CLK_CTRL_WB2] = { .reg_off = 0x2bc, .bit_off = 16 },
 	},
 };
 
Signature · 1 line
2.39.2
Reviewed-by on v2 1/1
#1 lore raw
Quoted 14 lines · Dmitry Baryshkov

On sc7280 there are two clk bits for WB2: vbif_cli and clk_ctrl. While programming the VBIF params of WB, the driver should be toggling the former bit, while the sc7180_mdp, sc7280_mdp and sm8250_mdp structs list the latter one.

Correct that to ensure proper programming sequence for WB2 on these platforms.

Fixes 255f056181ac ("drm/msm/dpu: sc7180: add missing WB2 clock control")
Fixes 3ce166380567 ("drm/msm/dpu: add writeback support for sc7280")
Fixes 53324b99bd7b ("drm/msm/dpu: add writeback blocks to the sm8250 DPU catalog")

---

Quoted 9 lines

Changes since v1:
- Fixed the bits for all three platforms supporting WB (Abhinav)

---
  drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 2 +-
  drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 2 +-
  drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)

LGTM now.

Tested-by
#2 lore raw
Quoted 27 lines · Abhinav Kumar
Quoted 14 lines · Dmitry Baryshkov

On sc7280 there are two clk bits for WB2: vbif_cli and clk_ctrl. While programming the VBIF params of WB, the driver should be toggling the former bit, while the sc7180_mdp, sc7280_mdp and sm8250_mdp structs list the latter one.

Correct that to ensure proper programming sequence for WB2 on these platforms.

Fixes 255f056181ac ("drm/msm/dpu: sc7180: add missing WB2 clock control")
Fixes 3ce166380567 ("drm/msm/dpu: add writeback support for sc7280")
Fixes 53324b99bd7b ("drm/msm/dpu: add writeback blocks to the sm8250 DPU catalog")

---

Quoted 9 lines

Changes since v1:
  - Fixed the bits for all three platforms supporting WB (Abhinav)

---

  drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 2 +-
  drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 2 +-
  drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 2 +-
  3 files changed, 3 insertions(+), 3 deletions(-)
Quoted 3 lines

LGTM now.

author Applied
#3 lore raw
In reply to Dmitry Baryshkov
Quoted 9 lines · Dmitry Baryshkov

On sc7280 there are two clk bits for WB2: vbif_cli and clk_ctrl. While programming the VBIF params of WB, the driver should be toggling the former bit, while the sc7180_mdp, sc7280_mdp and sm8250_mdp structs list the latter one.

Correct that to ensure proper programming sequence for WB2 on these platforms.

[...]

Applied, thanks!

[1/1] drm/msm/dpu: correct clk bit for WB2 block

      https://gitlab.freedesktop.org/lumag/msm/-/commit/e843ca2f30e6

Best regards,

Signature · 1 line
Dmitry Baryshkov <[email protected]>