diff options
author | Anthony Koo <Anthony.Koo@amd.com> | 2018-04-24 15:21:33 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-05-18 16:08:26 -0500 |
commit | 66dec27a987bfcd2572bfc7520826b11340d264f (patch) | |
tree | cc00da553183e915bfeede98063e3f40dfc6ae17 /drivers/gpu/drm/amd | |
parent | cba5e8708ee6123af14ab1f1196353dcda3eb533 (diff) | |
download | linux-stable-66dec27a987bfcd2572bfc7520826b11340d264f.tar.gz linux-stable-66dec27a987bfcd2572bfc7520826b11340d264f.tar.bz2 linux-stable-66dec27a987bfcd2572bfc7520826b11340d264f.zip |
drm/amd/display: Fix up dm logging functionality
Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
5 files changed, 17 insertions, 18 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c index ca0b08bfa2cf..bd449351803f 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c @@ -330,11 +330,6 @@ bool dm_helpers_dp_mst_send_payload_allocation( return true; } -bool dm_helpers_dc_conn_log(struct dc_context *ctx, struct log_entry *entry, enum dc_log_type event) -{ - return true; -} - void dm_dtn_log_begin(struct dc_context *ctx) {} diff --git a/drivers/gpu/drm/amd/display/dc/basics/log_helpers.c b/drivers/gpu/drm/amd/display/dc/basics/log_helpers.c index 854678a0c54b..021451549ff7 100644 --- a/drivers/gpu/drm/amd/display/dc/basics/log_helpers.c +++ b/drivers/gpu/drm/amd/display/dc/basics/log_helpers.c @@ -94,7 +94,6 @@ void dc_conn_log(struct dc_context *ctx, dm_logger_append(&entry, "%2.2X ", hex_data[i]); dm_logger_append(&entry, "^\n"); - dm_helpers_dc_conn_log(ctx, &entry, event); fail: dm_logger_close(&entry); diff --git a/drivers/gpu/drm/amd/display/dc/basics/logger.c b/drivers/gpu/drm/amd/display/dc/basics/logger.c index 0001a3c5b862..738a818d58d1 100644 --- a/drivers/gpu/drm/amd/display/dc/basics/logger.c +++ b/drivers/gpu/drm/amd/display/dc/basics/logger.c @@ -402,3 +402,4 @@ cleanup: entry->max_buf_bytes = 0; } } + diff --git a/drivers/gpu/drm/amd/display/dc/dm_services.h b/drivers/gpu/drm/amd/display/dc/dm_services.h index 8eafe1af8a5e..4ff9b2bba178 100644 --- a/drivers/gpu/drm/amd/display/dc/dm_services.h +++ b/drivers/gpu/drm/amd/display/dc/dm_services.h @@ -355,10 +355,6 @@ void dm_perf_trace_timestamp(const char *func_name, unsigned int line); /* * Debug and verification hooks */ -bool dm_helpers_dc_conn_log( - struct dc_context *ctx, - struct log_entry *entry, - enum dc_log_type event); void dm_dtn_log_begin(struct dc_context *ctx); void dm_dtn_log_append_v(struct dc_context *ctx, const char *msg, ...); diff --git a/drivers/gpu/drm/amd/display/modules/stats/stats.c b/drivers/gpu/drm/amd/display/modules/stats/stats.c index d16aac7b30b3..ae2d92b73cf1 100644 --- a/drivers/gpu/drm/amd/display/modules/stats/stats.c +++ b/drivers/gpu/drm/amd/display/modules/stats/stats.c @@ -168,6 +168,7 @@ void mod_stats_dump(struct mod_stats *mod_stats) struct core_stats *core_stats = NULL; struct stats_time_cache *time = NULL; unsigned int index = 0; + struct log_entry log_entry; if (mod_stats == NULL) return; @@ -177,17 +178,22 @@ void mod_stats_dump(struct mod_stats *mod_stats) logger = dc->ctx->logger; time = core_stats->time; - dm_logger_write(logger, LOG_DISPLAYSTATS, "==Display Caps=="); - dm_logger_write(logger, LOG_DISPLAYSTATS, " "); + dm_logger_open( + dc->ctx->logger, + &log_entry, + LOG_DISPLAYSTATS); - dm_logger_write(logger, LOG_DISPLAYSTATS, "==Display Stats=="); - dm_logger_write(logger, LOG_DISPLAYSTATS, " "); + dm_logger_append(&log_entry, "==Display Caps==\n"); + dm_logger_append(&log_entry, "\n"); - dm_logger_write(logger, LOG_DISPLAYSTATS, + dm_logger_append(&log_entry, "==Display Stats==\n"); + dm_logger_append(&log_entry, "\n"); + + dm_logger_append(&log_entry, "%10s %10s %10s %10s %10s" " %11s %11s %17s %10s %14s" " %10s %10s %10s %10s %10s" - " %10s %10s %10s %10s", + " %10s %10s %10s %10s\n", "render", "avgRender", "minWindow", "midPoint", "maxWindow", "vsyncToFlip", "flipToVsync", "vsyncsBetweenFlip", @@ -197,11 +203,11 @@ void mod_stats_dump(struct mod_stats *mod_stats) "vSyncTime4", "vSyncTime5", "flags"); for (int i = 0; i < core_stats->index && i < core_stats->entries; i++) { - dm_logger_write(logger, LOG_DISPLAYSTATS, + dm_logger_append(&log_entry, "%10u %10u %10u %10u %10u" " %11u %11u %17u %10u %14u" " %10u %10u %10u %10u %10u" - " %10u %10u %10u %10u", + " %10u %10u %10u %10u\n", time[i].render_time_in_us, time[i].avg_render_time_in_us_last_ten, time[i].min_window, @@ -222,6 +228,8 @@ void mod_stats_dump(struct mod_stats *mod_stats) time[i].v_sync_time_in_us[4], time[i].flags); } + + dm_logger_close(&log_entry); } void mod_stats_reset_data(struct mod_stats *mod_stats) |