Skip to content

Commit 47cebb7

Browse files
committed
drm/msm/dpu: enable writeback on SM8150
Enable WB2 hardware block, enabling writeback support on this platform. Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/570192/ Link: https://lore.kernel.org/r/[email protected] [DB: picked up WB_SDM845_MASK from sdm845 patch] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 25b8507 commit 47cebb7

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ static const struct dpu_mdp_cfg sm8150_mdp = {
3333
[DPU_CLK_CTRL_DMA1] = { .reg_off = 0x2b4, .bit_off = 8 },
3434
[DPU_CLK_CTRL_DMA2] = { .reg_off = 0x2bc, .bit_off = 8 },
3535
[DPU_CLK_CTRL_DMA3] = { .reg_off = 0x2c4, .bit_off = 8 },
36+
[DPU_CLK_CTRL_WB2] = { .reg_off = 0x2bc, .bit_off = 16 },
3637
},
3738
};
3839

@@ -290,6 +291,21 @@ static const struct dpu_dsc_cfg sm8150_dsc[] = {
290291
},
291292
};
292293

294+
static const struct dpu_wb_cfg sm8150_wb[] = {
295+
{
296+
.name = "wb_2", .id = WB_2,
297+
.base = 0x65000, .len = 0x2c8,
298+
.features = WB_SDM845_MASK,
299+
.format_list = wb2_formats_rgb,
300+
.num_formats = ARRAY_SIZE(wb2_formats_rgb),
301+
.clk_ctrl = DPU_CLK_CTRL_WB2,
302+
.xin_id = 6,
303+
.vbif_idx = VBIF_RT,
304+
.maxlinewidth = 4096,
305+
.intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4),
306+
},
307+
};
308+
293309
static const struct dpu_intf_cfg sm8150_intf[] = {
294310
{
295311
.name = "intf_0", .id = INTF_0,
@@ -384,6 +400,8 @@ const struct dpu_mdss_cfg dpu_sm8150_cfg = {
384400
.pingpong = sm8150_pp,
385401
.merge_3d_count = ARRAY_SIZE(sm8150_merge_3d),
386402
.merge_3d = sm8150_merge_3d,
403+
.wb_count = ARRAY_SIZE(sm8150_wb),
404+
.wb = sm8150_wb,
387405
.intf_count = ARRAY_SIZE(sm8150_intf),
388406
.intf = sm8150_intf,
389407
.vbif_count = ARRAY_SIZE(sdm845_vbif),

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,16 @@
9696

9797
#define INTF_SC7280_MASK (INTF_SC7180_MASK)
9898

99-
#define WB_SM8250_MASK (BIT(DPU_WB_LINE_MODE) | \
99+
#define WB_SDM845_MASK (BIT(DPU_WB_LINE_MODE) | \
100100
BIT(DPU_WB_UBWC) | \
101101
BIT(DPU_WB_YUV_CONFIG) | \
102102
BIT(DPU_WB_PIPE_ALPHA) | \
103103
BIT(DPU_WB_XY_ROI_OFFSET) | \
104104
BIT(DPU_WB_QOS) | \
105105
BIT(DPU_WB_QOS_8LVL) | \
106-
BIT(DPU_WB_CDP) | \
106+
BIT(DPU_WB_CDP))
107+
108+
#define WB_SM8250_MASK (WB_SDM845_MASK | \
107109
BIT(DPU_WB_INPUT_CTRL))
108110

109111
#define DEFAULT_PIXEL_RAM_SIZE (50 * 1024)

0 commit comments

Comments
 (0)