Commit 6d244be8 authored by Tony Cheng's avatar Tony Cheng Committed by Alex Deucher

drm/amd/display: plumbing to allow easy print of HW state for DTN

Signed-off-by: default avatarTony Cheng <tony.cheng@amd.com>
Reviewed-by: default avatarWesley Chalmers <Wesley.Chalmers@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fc095690
......@@ -2035,3 +2035,10 @@ bool dc_init_dchub(struct dc *dc, struct dchub_init_data *dh_data)
}
void dc_log_hw_state(struct dc *dc)
{
struct core_dc *core_dc = DC_TO_CORE(dc);
if (core_dc->hwss.log_hw_state)
core_dc->hwss.log_hw_state(core_dc);
}
......@@ -236,6 +236,8 @@ void dc_destroy(struct dc **dc);
bool dc_init_dchub(struct dc *dc, struct dchub_init_data *dh_data);
void dc_log_hw_state(struct dc *dc);
/*******************************************************************************
* Surface Interfaces
******************************************************************************/
......
......@@ -1851,6 +1851,17 @@ static void dcn10_setup_stereo(struct pipe_ctx *pipe_ctx, struct core_dc *dc)
return;
}
static void dcn10_log_hw_state(struct core_dc *dc)
{
struct dc_context *dc_ctx = dc->ctx;
DTN_INFO("%s: Hello World", __func__);
/* todo: add meaningful register reads and print out HW state
*
*/
}
static bool dcn10_dummy_display_power_gating(
struct core_dc *dc,
uint8_t controller_id,
......@@ -1887,6 +1898,7 @@ static const struct hw_sequencer_funcs dcn10_funcs = {
.set_static_screen_control = set_static_screen_control,
.setup_stereo = dcn10_setup_stereo,
.set_avmute = dce110_set_avmute,
.log_hw_state = dcn10_log_hw_state,
};
......
......@@ -154,6 +154,8 @@ struct hw_sequencer_funcs {
struct core_dc *dc);
void (*set_avmute)(struct pipe_ctx *pipe_ctx, bool enable);
void (*log_hw_state)(struct core_dc *dc);
};
void color_space_to_black_color(
......
......@@ -123,6 +123,10 @@ void context_clock_trace(
dm_logger_write(dc_ctx->logger, LOG_ERROR, \
__VA_ARGS__);
#define DTN_INFO(...) \
dm_logger_write(dc_ctx->logger, LOG_DTN, \
__VA_ARGS__)
#define DC_SYNC_INFO(...) \
dm_logger_write(dc_ctx->logger, LOG_SYNC, \
__VA_ARGS__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment