Skip to content

Commit 688c773

Browse files
Yuanjie Yanglumag
authored andcommitted
drm/msm/dpu: Add Kaanapali SSPP sub-block support
Add support for Kaanapali platform SSPP sub-blocks, which introduce structural changes including register additions, removals, and relocations. Add the new common and rectangle blocks, and update register definitions and handling to ensure compatibility with DPU v13.0. Co-developed-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com> Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com> Signed-off-by: Yuanjie Yang <yuanjie.yang@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/698712/ Link: https://lore.kernel.org/r/20260115092749.533-11-yuanjie.yang@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
1 parent cc4b81f commit 688c773

7 files changed

Lines changed: 373 additions & 4 deletions

File tree

drivers/gpu/drm/msm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ msm-display-$(CONFIG_DRM_MSM_DPU) += \
8686
disp/dpu1/dpu_hw_lm.o \
8787
disp/dpu1/dpu_hw_pingpong.o \
8888
disp/dpu1/dpu_hw_sspp.o \
89+
disp/dpu1/dpu_hw_sspp_v13.o \
8990
disp/dpu1/dpu_hw_dspp.o \
9091
disp/dpu1/dpu_hw_merge3d.o \
9192
disp/dpu1/dpu_hw_top.o \

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,18 @@ struct dpu_dsc_blk {
208208
u32 len;
209209
};
210210

211+
/**
212+
* struct dpu_sspp_v13_rec_blk - SSPP REC sub-blk information
213+
* @name: string name for debug purposes
214+
* @base: offset of this sub-block relative to the block offset
215+
* @len: register block length of this sub-block
216+
*/
217+
struct dpu_sspp_v13_rec_blk {
218+
char name[DPU_HW_BLK_NAME_LEN];
219+
u32 base;
220+
u32 len;
221+
};
222+
211223
/**
212224
* enum dpu_qos_lut_usage - define QoS LUT use cases
213225
*/
@@ -294,6 +306,8 @@ struct dpu_sspp_sub_blks {
294306
u32 qseed_ver;
295307
struct dpu_scaler_blk scaler_blk;
296308
struct dpu_pp_blk csc_blk;
309+
struct dpu_sspp_v13_rec_blk sspp_rec0_blk;
310+
struct dpu_sspp_v13_rec_blk sspp_rec1_blk;
297311

298312
const u32 *format_list;
299313
u32 num_formats;

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,14 @@ static void dpu_hw_sspp_setup_format(struct dpu_sw_pipe *pipe,
247247
}
248248
}
249249

250+
if (fmt->fetch_mode != MDP_FETCH_LINEAR) {
251+
u32 hbb = ctx->ubwc->highest_bank_bit - 13;
252+
253+
DPU_REG_WRITE(&ctx->hw, SSPP_FETCH_CONFIG,
254+
DPU_FETCH_CONFIG_RESET_VALUE |
255+
hbb << 18);
256+
}
257+
250258
dpu_hw_setup_format_impl(pipe, fmt, flags, ctx, op_mode_off,
251259
unpack_pat_off, format_off,
252260
ubwc_ctrl_off, ubwc_error_off);
@@ -307,9 +315,6 @@ void dpu_hw_setup_format_impl(struct dpu_sw_pipe *pipe, const struct msm_format
307315
if (MSM_FORMAT_IS_UBWC(fmt))
308316
opmode |= MDSS_MDP_OP_BWC_EN;
309317
src_format |= (fmt->fetch_mode & 3) << 30; /*FRAME_FORMAT */
310-
DPU_REG_WRITE(c, SSPP_FETCH_CONFIG,
311-
DPU_FETCH_CONFIG_RESET_VALUE |
312-
hbb << 18);
313318

314319
if (ctx->ubwc->ubwc_enc_version == UBWC_1_0) {
315320
fast_clear = fmt->alpha_enable ? BIT(31) : 0;
@@ -742,7 +747,10 @@ struct dpu_hw_sspp *dpu_hw_sspp_init(struct drm_device *dev,
742747

743748
hw_pipe->mdss_ver = mdss_rev;
744749

745-
_setup_layer_ops(hw_pipe, hw_pipe->cap->features, mdss_rev);
750+
if (mdss_rev->core_major_ver >= 13)
751+
dpu_hw_sspp_init_v13(hw_pipe, hw_pipe->cap->features, mdss_rev);
752+
else
753+
_setup_layer_ops(hw_pipe, hw_pipe->cap->features, mdss_rev);
746754

747755
return hw_pipe;
748756
}

drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,5 +384,9 @@ void dpu_hw_setup_solidfill_impl(struct dpu_sw_pipe *pipe,
384384
void dpu_hw_sspp_setup_qos_ctrl_impl(struct dpu_hw_sspp *ctx,
385385
bool danger_safe_en, u32 ctrl_off);
386386

387+
void dpu_hw_sspp_init_v13(struct dpu_hw_sspp *c,
388+
unsigned long features,
389+
const struct dpu_mdss_version *mdss_rev);
390+
387391
#endif /*_DPU_HW_SSPP_H */
388392

0 commit comments

Comments
 (0)