Skip to content

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

@nyanmisaka

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;

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