Skip to content

Add a field or interface to query the FBC superblock size #945

Open

Description

@nyanmisaka

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.

/*
* 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;

Activity

  1. nyanmisaka commented on Apr 10, 2026

    @nyanmisaka
    ContributorAuthor

    Hi~ you can use the patch in the attachment to test.

    base: 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

    Thanks, that looks like what I was hoping for.

  2. nyanmisaka commented on Apr 10, 2026

    @nyanmisaka
    ContributorAuthor

    @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.

  3. VicLiDev commented on Apr 10, 2026

    @VicLiDev
    Contributor

    Thanks, I will pass this on to the relevant colleagues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions