diff options
author | Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> | 2020-09-15 12:33:43 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-10-26 13:33:59 -0400 |
commit | 9d83722d06feae80209483351db1e985f60a1c5a (patch) | |
tree | 5da18604fc3cf4282ada179aac9ad6ea6e4c8f8e /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | |
parent | b51366f77b9e07572d424381931c0dedb5526a5b (diff) |
drm/amd/display: Decouple amdgpu_dm_trace from service
Our DC currently uses some of the tracepoint function inside a DC
header, which means that many other files implicitly include part of the
trace function. This situation limits how we can expand this feature for
other parts of the driver by generating multiple compilation errors when
we try to reuse some of the existing structures. This commit decouples
part of the amdgpu_dm_trace from DC core to simplify the trace
enlargement in future changes.
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c index 51f57420fadd..d9e33c6bccd9 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c @@ -33,18 +33,23 @@ #include "amdgpu_dm.h" #include "amdgpu_dm_irq.h" #include "amdgpu_pm.h" +#include "amdgpu_dm_trace.h" - - -unsigned long long dm_get_elapse_time_in_ns(struct dc_context *ctx, - unsigned long long current_time_stamp, - unsigned long long last_time_stamp) + unsigned long long + dm_get_elapse_time_in_ns(struct dc_context *ctx, + unsigned long long current_time_stamp, + unsigned long long last_time_stamp) { return current_time_stamp - last_time_stamp; } -void dm_perf_trace_timestamp(const char *func_name, unsigned int line) +void dm_perf_trace_timestamp(const char *func_name, unsigned int line, struct dc_context *ctx) { + trace_amdgpu_dc_performance(ctx->perf_trace->read_count, + ctx->perf_trace->write_count, + &ctx->perf_trace->last_entry_read, + &ctx->perf_trace->last_entry_write, + func_name, line); } /**** power component interfaces ****/ |