Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm/disp: pull in common tiled YUV format parameters

Pull common params of tiled YUV formats into corresponding macro
definitions, simplifying format table.

Patchwork: https://patchwork.freedesktop.org/patch/688174/
Link: https://lore.kernel.org/r/20251114-dpu-formats-v3-7-cae312379d49@oss.qualcomm.com
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # qcm6490-fairphone-fp5
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

+13 -15
+13 -15
drivers/gpu/drm/msm/disp/mdp_format.c
··· 284 284 .tile_height = MDP_TILE_HEIGHT_DEFAULT \ 285 285 } 286 286 287 - #define PSEUDO_YUV_FMT_TILED(fmt, a, r, g, b, e0, e1, chroma, \ 288 - flg, fm, np, th) \ 287 + #define PSEUDO_YUV_FMT_TILED(fmt, r, g, b, e0, e1, chroma, flg, th) \ 289 288 { \ 290 289 .pixel_format = DRM_FORMAT_ ## fmt, \ 291 290 .fetch_type = MDP_PLANE_PSEUDO_PLANAR, \ ··· 293 294 .bpc_g_y = g, \ 294 295 .bpc_b_cb = b, \ 295 296 .bpc_r_cr = r, \ 296 - .bpc_a = a, \ 297 + .bpc_a = 0, \ 297 298 .chroma_sample = chroma, \ 298 299 .unpack_count = 2, \ 299 300 .bpp = 2, \ 300 - .fetch_mode = fm, \ 301 - .flags = MSM_FORMAT_FLAG_UNPACK_TIGHT | flg, \ 302 - .num_planes = np, \ 301 + .fetch_mode = MDP_FETCH_UBWC, \ 302 + .flags = MSM_FORMAT_FLAG_UNPACK_TIGHT | \ 303 + MSM_FORMAT_FLAG_YUV | \ 304 + MSM_FORMAT_FLAG_COMPRESSED | flg, \ 305 + .num_planes = 4, \ 303 306 .tile_height = th \ 304 307 } 305 308 ··· 624 623 C2_R_Cr, C0_G_Y, C1_B_Cb, C3_ALPHA), 625 624 626 625 PSEUDO_YUV_FMT_TILED(NV12, 627 - 0, BPC8, BPC8, BPC8, 626 + BPC8, BPC8, BPC8, 628 627 C1_B_Cb, C2_R_Cr, 629 - CHROMA_420, MSM_FORMAT_FLAG_YUV | 630 - MSM_FORMAT_FLAG_COMPRESSED, 631 - MDP_FETCH_UBWC, 4, MDP_TILE_HEIGHT_NV12), 628 + CHROMA_420, 0, 629 + MDP_TILE_HEIGHT_NV12), 632 630 633 631 PSEUDO_YUV_FMT_TILED(P010, 634 - 0, BPC8, BPC8, BPC8, 632 + BPC8, BPC8, BPC8, 635 633 C1_B_Cb, C2_R_Cr, 636 - CHROMA_420, MSM_FORMAT_FLAG_DX | 637 - MSM_FORMAT_FLAG_YUV | 638 - MSM_FORMAT_FLAG_COMPRESSED, 639 - MDP_FETCH_UBWC, 4, MDP_TILE_HEIGHT_UBWC), 634 + CHROMA_420, MSM_FORMAT_FLAG_DX, 635 + MDP_TILE_HEIGHT_UBWC), 640 636 }; 641 637 642 638 const struct msm_format *mdp_get_format(struct msm_kms *kms, uint32_t format,