]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: performance profiling instrumentation
authorTony Cheng <tony.cheng@amd.com>
Wed, 8 Nov 2017 21:07:53 +0000 (16:07 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Dec 2017 17:48:08 +0000 (12:48 -0500)
Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/dm_services.h

index 82269caedc075c9ae6b87c89b19a48e2ca7ff53e..56e5492491342bfc6d537271d9ccfe379087c060 100644 (file)
@@ -41,6 +41,10 @@ unsigned long long dm_get_timestamp(struct dc_context *ctx)
        return 0;
 }
 
+void dm_perf_trace_timestamp(const char *func_name, unsigned int line)
+{
+}
+
 bool dm_write_persistent_data(struct dc_context *ctx,
                const struct dc_sink *sink,
                const char *module_name,
index c92eba0f0df84504718876a398155c3ddd2c4feb..ad0e3b9be05511b8743b4b3873c86c3114dd42b3 100644 (file)
@@ -1047,6 +1047,8 @@ dcn10_translate_regamma_to_hw_format(const struct dc_transfer_func *output_tf,
        if (output_tf == NULL || regamma_params == NULL || output_tf->type == TF_TYPE_BYPASS)
                return false;
 
+       PERF_TRACE();
+
        arr_points = regamma_params->arr_points;
        rgb_resulted = regamma_params->rgb_resulted;
        hw_points = 0;
@@ -1189,6 +1191,8 @@ dcn10_translate_regamma_to_hw_format(const struct dc_transfer_func *output_tf,
 
        convert_to_custom_float(rgb_resulted, arr_points, hw_points);
 
+       PERF_TRACE();
+
        return true;
 }
 
index d4917037ac4260f39b3436f5ac113153de47a2c7..225b7bfb09a98484ee1efbb48fbd805b017063ee 100644 (file)
@@ -372,6 +372,13 @@ bool dm_dmcu_set_pipe(struct dc_context *ctx, unsigned int controller_id);
 
 unsigned long long dm_get_timestamp(struct dc_context *ctx);
 
+/*
+ * performance tracing
+ */
+void dm_perf_trace_timestamp(const char *func_name, unsigned int line);
+#define PERF_TRACE()   dm_perf_trace_timestamp(__func__, __LINE__)
+
+
 /*
  * Debug and verification hooks
  */