Add a field or interface to query the FBC superblock size #945
Copy link
Copy link
Open
Description
The MPP_FRAME_FMT_IS_AFBC() macro cannot distinguish the superblock size. For example, RK356x and RK3588 use AFBC 16x16, while RK3572 and similar models use AFBC 32x8. And we assume that RKFBC only has one type, 64x4, which is used by RK3576.
mpp/mpp/hal/rkdec/inc/vdpu38x_com.h
Lines 112 to 118 in c2c1ee5
| /* | |
| * 0:pp output raster. | |
| * 1:pp output tile4x4. | |
| * 2:pp output rkfbc64x4. | |
| * 3:pp output afbc32x8. | |
| */ | |
| RK_U32 pp_output_mode : 2; |
This requirement arises because RGA requires the FBC superblock size to be explicitly specified during configuration. Without such size info, we have to maintain a SOC->FBC size mapping table to support multiple SOC models, which is inconvenient.
typedef enum {
IM_RASTER_MODE = 1 << 0,
IM_AFBC16x16_MODE = 1 << 1,
IM_TILE8x8_MODE = 1 << 2,
IM_TILE4x4_MODE = 1 << 3,
IM_RKFBC64x4_MODE = 1 << 4,
IM_AFBC32x8_MODE = 1 << 5,
/* legacy */
IM_FBC_MODE = IM_AFBC16x16_MODE,
IM_TILE_MODE = IM_TILE8x8_MODE,
} IM_RD_MODE;Metadata
Metadata
Assignees
Labels
No labels
Activity
VicLiDev commentedon Apr 10, 2026
Hi~ you can use the patch in the attachment to test.
base: https://github.com/HermanChen/mpp
0001-feat-mpp_soc-Add-FBC-tile-info-to-the-SoC-module.patch
0002-feat-mpp_frame-Add-data_layout-info-to-the-MppFrame.patch
nyanmisaka commentedon Apr 10, 2026
Thanks, that looks like what I was hoping for.
nyanmisaka commentedon Apr 10, 2026
@VicLiDev Another suggestion is that when MPP adds a new definition to public headers
mpp/inc, it's best to also bump the version number in pkgconf before tagging a new release. This way, downstream users can use it to check if a new definition is available.VicLiDev commentedon Apr 10, 2026
Thanks, I will pass this on to the relevant colleagues.
feat[mpp_frame]: Add data_layout info to the MppFrame.