DCN Blocks

In this section, you will find some extra details about some of the DCN blocks and the code documentation when it is automatically generated.

DCHUBBUB

Display Controller Hub (DCHUB) is the gateway between the Scalable Data Port (SDP) and DCN. This component has multiple features, such as memory arbitration, rotation, and cursor manipulation.

There is one HUBP allocated per pipe, which fetches data and converts different pixel formats (i.e. ARGB8888, NV12, etc) into linear, interleaved and fixed-depth streams of pixel data.

HUBP

Display Controller Hub (DCHUB) is the gateway between the Scalable Data Port (SDP) and DCN. This component has multiple features, such as memory arbitration, rotation, and cursor manipulation.

There is one HUBP allocated per pipe, which fetches data and converts different pixel formats (i.e. ARGB8888, NV12, etc) into linear, interleaved and fixed-depth streams of pixel data.

DPP

Display Controller Hub (DCHUB) is the gateway between the Scalable Data Port (SDP) and DCN. This component has multiple features, such as memory arbitration, rotation, and cursor manipulation.

There is one HUBP allocated per pipe, which fetches data and converts different pixel formats (i.e. ARGB8888, NV12, etc) into linear, interleaved and fixed-depth streams of pixel data.

MPC

Multiple Pipe/Plane Combiner (MPC) is a component in the hardware pipeline that performs blending of multiple planes, using global and per-pixel alpha. It also performs post-blending color correction operations according to the hardware capabilities, such as color transformation matrix and gamma 1D and 3D LUT.

MPC receives output from all DPP pipes and combines them to multiple outputs supporting “M MPC inputs -> N MPC outputs” flexible composition architecture. It features:

  • Programmable blending structure to allow software controlled blending and cascading;

  • Programmable window location of each DPP in active region of display;

  • Combining multiple DPP pipes in one active region when a single DPP pipe cannot process very large surface;

  • Combining multiple DPP from different SLS with blending;

  • Stereo formats from single DPP in top-bottom or side-by-side modes;

  • Stereo formats from 2 DPPs;

  • Alpha blending of multiple layers from different DPP pipes;

  • Programmable background color;

enum mpcc_alpha_blend_mode

define the alpha blend mode regarding pixel alpha and plane alpha values

Constants

MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA

per pixel alpha using DPP alpha value

MPCC_ALPHA_BLEND_MODE_PER_PIXEL_ALPHA_COMBINED_GLOBAL_GAIN

per pixel alpha using DPP alpha value multiplied by a global gain (plane alpha)

MPCC_ALPHA_BLEND_MODE_GLOBAL_ALPHA

global alpha value, ignores pixel alpha and consider only plane alpha

struct mpcc_blnd_cfg

MPCC blending configuration

Definition:

struct mpcc_blnd_cfg {
    struct tg_color black_color;
    enum mpcc_alpha_blend_mode alpha_mode;
    bool pre_multiplied_alpha;
    int global_gain;
    int global_alpha;
    bool overlap_only;
    int bottom_gain_mode;
    int background_color_bpc;
    int top_gain;
    int bottom_inside_gain;
    int bottom_outside_gain;
};

Members

black_color

background color.

alpha_mode

alpha blend mode (MPCC_ALPHA_BLND_MODE).

pre_multiplied_alpha

Whether pixel color values were pre-multiplied by the alpha channel (MPCC_ALPHA_MULTIPLIED_MODE).

global_gain

Used when blend mode considers both pixel alpha and plane.

global_alpha

Plane alpha value.

overlap_only

Whether overlapping of different planes is allowed.

bottom_gain_mode

Blend mode for bottom gain setting.

background_color_bpc

Background color for bpc.

top_gain

Top gain setting.

bottom_inside_gain

Blend mode for bottom inside.

bottom_outside_gain

Blend mode for bottom outside.

struct mpcc

MPCC connection and blending configuration for a single MPCC instance.

Definition:

struct mpcc {
    int mpcc_id;
    int dpp_id;
    struct mpcc *mpcc_bot;
    struct mpcc_blnd_cfg blnd_cfg;
    struct mpcc_sm_cfg sm_cfg;
    bool shared_bottom;
};

Members

mpcc_id

MPCC physical instance.

dpp_id

DPP input to this MPCC

mpcc_bot

Pointer to bottom layer MPCC. NULL when not connected.

blnd_cfg

The blending configuration for this MPCC.

sm_cfg

stereo mix setting for this MPCC

shared_bottom

If MPCC output to both OPP and DWB endpoints, true. Otherwise, false.

Description

This struct is used as a node in an MPC tree.

struct mpc_tree

MPC tree represents all MPCC connections for a pipe.

Definition:

struct mpc_tree {
    int opp_id;
    struct mpcc *opp_list;
};

Members

opp_id

The OPP instance that owns this MPC tree.

opp_list

the top MPCC layer of the MPC tree that outputs to OPP endpoint

Description

struct mpc_funcs

funcs

Definition:

struct mpc_funcs {
    void (*read_mpcc_state)(struct mpc *mpc,int mpcc_inst, struct mpcc_state *s);
    struct mpcc* (*insert_plane)(struct mpc *mpc,struct mpc_tree *tree,struct mpcc_blnd_cfg *blnd_cfg,struct mpcc_sm_cfg *sm_cfg,struct mpcc *insert_above_mpcc,int dpp_id, int mpcc_id);
    void (*remove_mpcc)(struct mpc *mpc,struct mpc_tree *tree, struct mpcc *mpcc);
    void (*mpc_init)(struct mpc *mpc);
    void (*mpc_init_single_inst)(struct mpc *mpc, unsigned int mpcc_id);
    void (*update_blending)(struct mpc *mpc,struct mpcc_blnd_cfg *blnd_cfg, int mpcc_id);
    void (*cursor_lock)(struct mpc *mpc,int opp_id, bool lock);
    struct mpcc* (*insert_plane_to_secondary)(struct mpc *mpc,struct mpc_tree *tree,struct mpcc_blnd_cfg *blnd_cfg,struct mpcc_sm_cfg *sm_cfg,struct mpcc *insert_above_mpcc,int dpp_id, int mpcc_id);
    void (*remove_mpcc_from_secondary)(struct mpc *mpc,struct mpc_tree *tree, struct mpcc *mpcc);
    struct mpcc* (*get_mpcc_for_dpp_from_secondary)(struct mpc_tree *tree, int dpp_id);
    struct mpcc* (*get_mpcc_for_dpp)(struct mpc_tree *tree, int dpp_id);
    void (*wait_for_idle)(struct mpc *mpc, int id);
    void (*assert_mpcc_idle_before_connect)(struct mpc *mpc, int mpcc_id);
    void (*init_mpcc_list_from_hw)(struct mpc *mpc, struct mpc_tree *tree);
    void (*set_denorm)(struct mpc *mpc,int opp_id, enum dc_color_depth output_depth);
    void (*set_denorm_clamp)(struct mpc *mpc,int opp_id, struct mpc_denorm_clamp denorm_clamp);
    void (*set_output_csc)(struct mpc *mpc,int opp_id,const uint16_t *regval, enum mpc_output_csc_mode ocsc_mode);
    void (*set_ocsc_default)(struct mpc *mpc,int opp_id,enum dc_color_space color_space, enum mpc_output_csc_mode ocsc_mode);
    void (*set_output_gamma)(struct mpc *mpc,int mpcc_id, const struct pwl_params *params);
    void (*power_on_mpc_mem_pwr)(struct mpc *mpc,int mpcc_id, bool power_on);
    void (*set_dwb_mux)(struct mpc *mpc,int dwb_id, int mpcc_id);
    void (*disable_dwb_mux)(struct mpc *mpc, int dwb_id);
    bool (*is_dwb_idle)(struct mpc *mpc, int dwb_id);
    void (*set_out_rate_control)(struct mpc *mpc,int opp_id,bool enable,bool rate_2x_mode, struct mpc_dwb_flow_control *flow_control);
    void (*set_gamut_remap)(struct mpc *mpc,int mpcc_id, const struct mpc_grph_gamut_adjustment *adjust);
    bool (*program_1dlut)(struct mpc *mpc,const struct pwl_params *params, uint32_t rmu_idx);
    bool (*program_shaper)(struct mpc *mpc,const struct pwl_params *params, uint32_t rmu_idx);
    uint32_t (*acquire_rmu)(struct mpc *mpc, int mpcc_id, int rmu_idx);
    bool (*program_3dlut)(struct mpc *mpc,const struct tetrahedral_params *params, int rmu_idx);
    int (*release_rmu)(struct mpc *mpc, int mpcc_id);
    unsigned int (*get_mpc_out_mux)(struct mpc *mpc, int opp_id);
    void (*set_bg_color)(struct mpc *mpc,struct tg_color *bg_color, int mpcc_id);
    void (*set_mpc_mem_lp_mode)(struct mpc *mpc);
};

Members

insert_plane

Insert DPP into MPC tree based on specified blending position. Only used for planes that are part of blending chain for OPP output

Parameters:

  • [in/out] mpc - MPC context.

  • [in/out] tree - MPC tree structure that plane will be added to.

  • [in] blnd_cfg - MPCC blending configuration for the new blending layer.

  • [in] sm_cfg - MPCC stereo mix configuration for the new blending layer.

    stereo mix must disable for the very bottom layer of the tree config.

  • [in] insert_above_mpcc - Insert new plane above this MPCC.

    If NULL, insert as bottom plane.

  • [in] dpp_id - DPP instance for the plane to be added.

  • [in] mpcc_id - The MPCC physical instance to use for blending.

Return:

struct mpcc* - MPCC that was added.

remove_mpcc

Remove a specified MPCC from the MPC tree.

Parameters:

  • [in/out] mpc - MPC context.

  • [in/out] tree - MPC tree structure that plane will be removed from.

  • [in/out] mpcc - MPCC to be removed from tree.

Return:

void

mpc_init

Reset the MPCC HW status by disconnecting all muxes.

Parameters:

  • [in/out] mpc - MPC context.

Return:

void

update_blending

Update the blending configuration for a specified MPCC.

Parameters:

  • [in/out] mpc - MPC context.

  • [in] blnd_cfg - MPCC blending configuration.

  • [in] mpcc_id - The MPCC physical instance.

Return:

void

cursor_lock

Lock cursor updates for the specified OPP. OPP defines the set of MPCC that are locked together for cursor.

Parameters:

  • [in] mpc - MPC context.

  • [in] opp_id - The OPP to lock cursor updates on

  • [in] lock - lock/unlock the OPP

Return:

void

insert_plane_to_secondary

Add DPP into secondary MPC tree based on specified blending position. Only used for planes that are part of blending chain for DWB output

Parameters:

  • [in/out] mpc - MPC context.

  • [in/out] tree - MPC tree structure that plane will be added to.

  • [in] blnd_cfg - MPCC blending configuration for the new blending layer.

  • [in] sm_cfg - MPCC stereo mix configuration for the new blending layer.

    stereo mix must disable for the very bottom layer of the tree config.

  • [in] insert_above_mpcc - Insert new plane above this MPCC. If

    NULL, insert as bottom plane.

  • [in] dpp_id - DPP instance for the plane to be added.

  • [in] mpcc_id - The MPCC physical instance to use for blending.

Return:

struct mpcc* - MPCC that was added.

remove_mpcc_from_secondary

Remove a specified DPP from the ‘secondary’ MPC tree.

Parameters:

  • [in/out] mpc - MPC context.

  • [in/out] tree - MPC tree structure that plane will be removed from.

  • [in] mpcc - MPCC to be removed from tree.

Return:

void

OPP

The Output Plane Processor (OPP) block groups have functions that format pixel streams such that they are suitable for display at the display device. The key functions contained in the OPP are:

  • Adaptive Backlight Modulation (ABM)

  • Formatter (FMT) which provide pixel-by-pixel operations for format the incoming pixel stream.

  • Output Buffer that provide pixel replication, and overlapping.

  • Interface between MPC and OPTC.

  • Clock and reset generation.

  • CRC generation.

DIO

Display Input Output (DIO), is the display input and output unit in DCN. It includes output encoders to support different display output, like DisplayPort, HDMI, DVI interface, and others. It also includes the control and status channels for these interfaces.