aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2773-drm-amd-display-performance-profiling-instrumentatio.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2773-drm-amd-display-performance-profiling-instrumentatio.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2773-drm-amd-display-performance-profiling-instrumentatio.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2773-drm-amd-display-performance-profiling-instrumentatio.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2773-drm-amd-display-performance-profiling-instrumentatio.patch
new file mode 100644
index 00000000..304bfa5f
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2773-drm-amd-display-performance-profiling-instrumentatio.patch
@@ -0,0 +1,74 @@
+From 4cafa80d116c97247caf837cc576a54748450bb7 Mon Sep 17 00:00:00 2001
+From: Tony Cheng <tony.cheng@amd.com>
+Date: Wed, 8 Nov 2017 16:07:53 -0500
+Subject: [PATCH 2773/4131] drm/amd/display: performance profiling
+ instrumentation
+
+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 | 4 ++++
+ drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 ++++
+ drivers/gpu/drm/amd/display/dc/dm_services.h | 7 +++++++
+ 3 files changed, 15 insertions(+)
+
+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 82269ca..56e5492 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
+@@ -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,
+diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+index 1cf7ff0..b7cb8e0 100644
+--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
++++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+@@ -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;
+ }
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dm_services.h b/drivers/gpu/drm/amd/display/dc/dm_services.h
+index d491703..225b7bf 100644
+--- a/drivers/gpu/drm/amd/display/dc/dm_services.h
++++ b/drivers/gpu/drm/amd/display/dc/dm_services.h
+@@ -373,6 +373,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
+ */
+ bool dm_helpers_dc_conn_log(
+--
+2.7.4
+