STRUCT MPC_FUNCS(9)
π struct mpc_funcs(9) β Kernel API Manual π
πΈ NAME πΈ
struct mpc_funcs β literally the funcs struct. Thatβs the name, bestie, no notes. π
β¨ SYNOPSIS β¨
okay so the whole struct is right here, and yes every single function pointer is invited to the party. Copy it exactly, do not touch the semicolons, and keep the nested rmcm struct β itβs iconic:
struct mpc_funcs {
void (*read_mpcc_state)( struct mpc *mpc, int mpcc_inst, struct
mpcc_state *s);
void (*mpc_read_reg_state)( struct mpc *mpc, int mpcc_inst, struct
dcn_mpc_reg_state *mpc_reg_state);
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);
void (*set_movable_cm_location)(struct mpc *mpc, enum
mpcc_movable_cm_location location, int mpcc_id);
void (*update_3dlut_fast_load_select)(struct mpc *mpc, int mpcc_id,
int hubp_idx);
void (*get_3dlut_fast_load_status)(struct mpc *mpc, int mpcc_id,
uint32_t *done, uint32_t *soft_underflow, uint32_t *hard_underflow);
void (*populate_lut)(struct mpc *mpc, const enum MCM_LUT_ID id,
const union mcm_lut_params *params, const bool lut_bank_a, const int
mpcc_id);
void (*program_lut_read_write_control)(struct mpc *mpc, const enum
MCM_LUT_ID id, const bool lut_bank_a, const unsigned int bit_depth,
const int mpcc_id);
void (*program_lut_mode)(struct mpc *mpc, const enum MCM_LUT_ID id,
const bool enable, const bool lut_bank_a, const enum dc_cm_lut_size
size, const int mpcc_id);
void (*get_lut_mode)(struct mpc *mpc, const enum MCM_LUT_ID id,
const int mpcc_id, bool *enable, bool *lut_bank_a);
struct {
void (*fl_3dlut_configure)(struct mpc *mpc, struct
mpc_fl_3dlut_config *cfg, int mpcc_id);
void (*enable_3dlut_fl)(struct mpc *mpc, bool enable, int
mpcc_id);
void (*update_3dlut_fast_load_select)(struct mpc *mpc, int
mpcc_id, int hubp_idx);
void (*program_lut_read_write_control)(struct mpc *mpc, const enum
MCM_LUT_ID id, bool lut_bank_a, bool enabled, int mpcc_id);
void (*program_lut_mode)(struct mpc *mpc, bool enable, bool
lut_bank_a, int mpcc_id);
void (*program_3dlut_size)(struct mpc *mpc, const enum
dc_cm_lut_size size, int mpcc_id);
void (*program_bias_scale)(struct mpc *mpc, uint16_t bias,
uint16_t scale, int mpcc_id);
void (*program_bit_depth)(struct mpc *mpc, uint16_t bit_depth, int
mpcc_id);
bool (*is_config_supported)(uint32_t width);
void (*power_on_shaper_3dlut)(struct mpc *mpc, uint32_t mpcc_id,
bool power_on);
void (*populate_lut)(struct mpc *mpc, const union mcm_lut_params
params, bool lut_bank_a, int mpcc_id);
void (*get_3dlut_mode)(struct mpc *mpc, int mpcc_id, bool *enable,
bool *lut_bank_a);
} rmcm;
};
π«Ά Members π«Ά
okay bestie, now we go member by member. Yes, all the documented ones from this part. Grab a strawberry π and letβs get into it.
π read_mpcc_state π
Read the register content from the given MPCC physical instance. π
Parameters:
[in/out] mpcβ MPC context[in] mpcc_instanceβ MPC context instance[in] mpcc_stateβ MPC context state
Return: void
π mpc_read_reg_state π
Read the MPC register state for debugging underflow purposes. Underflow detective behavior, fr fr. π
Parameters:
[in] mpcβ MPC context[out] reg_stateβ MPC register state structure
Return: void
π insert_plane π
Insert a DPP into the MPC tree based on the 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. IfNULL, 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. Bye bestie, youβre out of the 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. Clean slate energy. π§Ό
Parameters:
[in/out] mpcβ MPC context.
Return: void
π mpc_init_single_inst π
Initialize the given MPCC physical instance. π
Parameters:
[in/out] mpcβ MPC context.[in] mpcc_idβ The MPCC physical instance to be initialized.
π update_blending π
Update the blending configuration for a specified MPCC. Glow-up for the blend config. π
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. Cursor, but make it communal. π±οΈ
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 a DPP into the secondary MPC tree based on the specified blending position. Only used for planes that are part of blending chain for DWB output. secondary-tree main character energy. π
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. IfNULL, 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. Not the main tree, bestie β the secondary one. π
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
π get_mpcc_for_dpp_from_secondary π
Find, if it exists, a MPCC from a given 'secondary' MPC tree that is associated with the specified plane. Search era. π
Parameters:
[in/out] treeβ MPC tree structure to search for plane.[in] dpp_idβ DPP to be searched.
Return: struct mpcc* β pointer to plane or NULL if no plane found.
π get_mpcc_for_dpp π
Find, if it exists, a MPCC from a given MPC tree that is associated with the specified plane. Same search vibe, main tree edition. πΈ
Parameters:
[in/out] treeβ MPC tree structure to search for plane.[in] dpp_idβ DPP to be searched.
Return: struct mpcc* β pointer to plane or NULL if no plane found.
π wait_for_idle π
Wait for a MPCC in MPC context to enter idle state. Patience, bestie. β³
Parameters:
[in/out] mpcβ MPC Context.[in] idβ MPCC to wait for idle state.
Return: void
π assert_mpcc_idle_before_connect π
Assert if the MPCC in MPC context is in idle state. Pre-connect vibe check. β
Parameters:
[in/out] mpcβ MPC context.[in] idβ MPCC to assert idle state.
Return: void
π init_mpcc_list_from_hw π
Iterate through the MPCC array from a given MPC context struct and configure each MPCC according to its registersβ values. Hardware says jump, the MPCC array says how high. π₯
Parameters:
[in/out] mpcβ MPC context to initialize MPCC array.[in/out] treeβ MPC tree structure containing MPCC contexts to initialize.
Return: void β okay that's the tail of the previous function, bestie; we're back in the Members zone and it's about to be a whole parade of MPC ops π
set_denorm πΈ
Sets the corresponding OPP DENORM_CONTROL register value to a specific denorm_mode, based on the given color depth. Lowkey one of those "tiny register, big mood" situations.
Parameters:
[in/out] mpcβ MPC context.[in] opp_idβ Corresponding OPP to update register.[in] output_depthβ Arbitrary color depth to setdenorm_mode.
Return: void
set_denorm_clamp π
Sets denorm clamp values on the corresponding OPP DENORM CONTROL register. Clamp it, bestie.
Parameters:
[in/out] mpcβ MPC context.[in] opp_idβ Corresponding OPP to update register.[in] denorm_clampβ Arbitrary denorm clamp to be set.
Return: void
set_output_csc β¨
Sets the Output Color Space Conversion matrix with the given values and mode. Color math? We're doing it.
Parameters:
[in/out] mpcβ MPC context.[in] opp_idβ Corresponding OPP to update register.[in] regvalβ Values to set in CSC matrix.[in] ocsc_modeβ Mode to set CSC.
Return: void
set_ocsc_default π¦
Sets the Output Color Space Conversion matrix to default values according to the color space. Defaults but make it fashion.
Parameters:
[in/out] mpcβ MPC context.[in] opp_idβ Corresponding OPP to update register.[in] color_spaceβ OCSC color space.[in] ocsc_modeβ Mode to set CSC.
Return: void
set_output_gamma π₯
Sets output gamma with the given curve parameters. Gamma curve said "I'm the main character."
Parameters:
[in/out] mpcβ MPC context.[in] mpcc_idβ Corresponding MPC to update registers.[in] paramsβ Parameters.
Return: void
power_on_mpc_mem_pwr π
Powers on/off memory LUT for the given MPCC. Powering on enables LUT to be updated. Powering off allows entering low power mode. It's giving "lights on, lights off" but for hardware.
Parameters:
[in/out] mpcβ MPC context.[in] mpcc_idβ MPCC to power on.[in] power_on
Return: void
set_dwb_mux π
Sets the corresponding Display Writeback mux MPC register field to the given MPCC id. Mux it, bestie.
Parameters:
[in/out] mpcβ MPC context.[in] dwb_idβ DWB to be set.[in] mpcc_idβ MPCC id to be stored in DWB mux register.
Return: void
disable_dwb_mux π
Resets the corresponding Display Writeback mux MPC register field. Reset era.
Parameters:
[in/out] mpcβ MPC context.[in] dwb_idβ DWB to be set.
Return: void
is_dwb_idle π€
Checks DWB status on the MPC_DWB0_MUX_STATUS register field. Returns if it is null. Basically a vibe check for DWB.
Parameters:
[in/out] mpcβ MPC context.[in] dwb_idβ DWB to be checked.
Return: bool β wheter DWB is idle or not
set_out_rate_control ποΈ
Sets display output rate control. Rate control walked in with main character energy.
Parameters:
[in/out] mpcβ MPC context.[in] opp_idβ OPP to be set.[in] enable[in] rate_2x_mode[in] flow_control
Return: void
set_gamut_remap π¨
Sets post-blending CTM for the given MPCC. Gamut remap said "not me being iconic."
Parameters:
[in] mpcβ MPC context.[in] mpcc_idβ MPCC to set gamut map.[in] adjust
Return: void
program_1dlut β
Sets 1 dimensional Lookup Table. One dimension, infinite slay.
Parameters:
[in/out] mpcβ MPC context[in] paramsβ curve parameters for the LUT configuration[in] rmu_idx
Return: bool β wheter LUT was set (set with given parameters) or not (params is NULL and LUT is disabled).
program_shaper π§
Sets shaper. Shape it, bestie.
Parameters:
[in/out] mpcβ MPC context[in] paramsβ curve parameters to be set[in] rmu_idx
Return: bool β wheter shaper was set (set with given parameters) or not (params is NULL and LUT is disabled).
acquire_rmu π
Sets the given MPCC to be multiplexed to the given RMU unit. Claiming your RMU like it's a group chat invite.
Parameters:
[in/out] mpcβ MPC context[in] mpcc_idβ MPCC[in] rmu_idxβ Given RMU unit to set MPCC to be multiplexed to.
Return: unit32_t β rmu_idx if operation was successful, -1 else.
program_3dlut π
Sets 3 dimensional Lookup Table. Three dimensions of LUT, no cap.
Parameters:
[in/out] mpcβ MPC context[in] paramsβ tetrahedral parameters for the LUT configuration[in] rmu_idx
Return: bool β wheter LUT was set (set with given parameters) or not (params is NULL and LUT is disabled).
release_rmu π«Ά
For a given MPCC, releases the RMU unit it muliplexes to. Let it go, let it gooo.
Parameters:
[in/out] mpcβ MPC context[in] mpcc_idβ MPCC
Return: int β a valid rmu_idx representing released RMU unit or -1 if there was no RMU unit to release.
get_mpc_out_mux π
Returns MPC out mux. Out mux said "here's my answer."
Parameters:
[in] mpcβ MPC context.[in] opp_idβ OPP
Return: unsigned int β Out Mux
set_bg_color πΈ
Finds the corresponding bottommost MPCC and sets its bg color. Bottommost MPCC is lowkey the foundation of the look.
Parameters:
[in/out] mpcβ MPC context.[in] bg_colorβ background color to be set.[in] mpcc_id
Return: void
set_mpc_mem_lp_mode π
Sets mpc_mem_lp_mode. Short and mysterious, honestly.
Parameters:
[in/out] mpcβ MPC context.
Return: void
set_movable_cm_location π
Sets Movable CM Location. Movable? Location? We're relocating the whole vibe.
Parameters:
[in/out] mpcβ MPC context.[in] location[in] mpcc_id
Return: void
update_3dlut_fast_load_select β‘
Updates 3D LUT fast load select. Fast load, fast slay.
Parameters:
[in/out] mpcβ MPC context.[in] mpcc_id[in] hubp_idx
Return: void
get_3dlut_fast_load_status π‘
Gets 3D LUT fast load status and references them with done, soft_underflow and hard_underflow pointers. Receipts via pointers, iykyk.
Parameters:
[in/out] mpcβ MPC context.[in] mpcc_id[in/out] done[in/out] soft_underflow[in/out] hard_underflow
Return: void
populate_lut π§
Populates LUT with the given tetrahedral parameters. Fill that LUT like it's a Stanley cup.
Parameters:
[in/out] mpcβ MPC context.[in] id[in] params[in] lut_bank_a[in] mpcc_id
Return: void
program_lut_read_write_control π
Programs LUT RW control. Read/write control is the bouncer at the LUT club.
Parameters:
[in/out] mpcβ MPC context.[in] id[in] lut_bank_a[in] bit_depth[in] mpcc_id
Return: void
program_lut_mode ποΈ
Programs LUT mode. Mode setting but make it fashion.
Parameters:
[in/out] mpcβ MPC context.[in] id[in] enable[in] lut_bank_a[in] size[in] mpcc_id
Return: void
get_lut_mode π
Obtains enablement and ram bank status. It's giving "status check, but for LUT."
Parameters:
[in/out] mpcβ MPC context.[in] id[in] mpcc_id[out] enable[out] lut_bank_a
Return: void
rmcm π
MPC RMCM new HW sequential programming functions. That's the whole description, bestie β sometimes the icon speaks for itself.
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/amd/display/dc/inc/hw/mpc.hoverview(9),enum mpcc_alpha_blend_mode(9),struct mpcc_blnd_cfg(9),struct mpcc(9),struct mpc_tree(9)
And that's the page, bestie! Footer vibes for the very end: source/version is ./drivers/gpu/drm/amd/display/..., date is October 2026, and this manual page is struct mpc_funcs(9). Periodt. πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms