drm/amd/display: Add interface to capture power feature status for debug logging

[Why]
The status of various power features is often important information when
debugging certain issues, such as underflow. This info helps to
narrow down the potential sources of errors.

[How]
Add dc interface to capture power feature enablement status.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: George Shen <george.shen@amd.com>
Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
George Shen
2025-10-06 11:23:31 -04:00
committed by Alex Deucher
parent 607df8248a
commit f64ec952d2
2 changed files with 21 additions and 0 deletions

View File

@@ -6421,6 +6421,13 @@ void dc_get_underflow_debug_data_for_otg(struct dc *dc, int primary_otg_inst,
dc->hwss.get_underflow_debug_data(dc, tg, out_data);
}
void dc_get_power_feature_status(struct dc *dc, int primary_otg_inst,
struct power_features *out_data)
{
out_data->uclk_p_state = dc->current_state->clk_mgr->clks.p_state_change_support;
out_data->fams = dc->current_state->bw_ctx.bw.dcn.clk.fw_based_mclk_switching;
}
void dc_log_preos_dmcub_info(const struct dc *dc)
{
dc_dmub_srv_log_preos_dmcub_info(dc->ctx->dmub_srv);

View File

@@ -1865,6 +1865,18 @@ struct dc_underflow_debug_data {
struct dcn_dccg_reg_state *dccg_reg_state[MAX_PIPES];
};
struct power_features {
bool ips;
bool rcg;
bool replay;
bool dds;
bool sprs;
bool psr;
bool fams;
bool mpo;
bool uclk_p_state;
};
/*
* Create a new surface with default parameters;
*/
@@ -2772,4 +2784,6 @@ bool dc_can_clear_cursor_limit(const struct dc *dc);
*/
void dc_get_underflow_debug_data_for_otg(struct dc *dc, int primary_otg_inst, struct dc_underflow_debug_data *out_data);
void dc_get_power_feature_status(struct dc *dc, int primary_otg_inst, struct power_features *out_data);
#endif /* DC_INTERFACE_H_ */