disp: msm: sde: add support for hwfence profiling

This change adds hwfence input and output fence profiling
registers and debugfs to enable them.
To enable input hw fences timestamps:
echo 0x1 > /d/dri/0/debug/hw_fence_status
To enable output hw fences timestamps:
echo 0x2 > /d/dri/0/debug/hw_fence_status
To enable both, input and output hw fences timestamps:
echo 0x3 > /d/dri/0/debug/hw_fence_status.

Change-Id: I269a38f3843a01ec8c0816890e50bb7d847a4ed9
Signed-off-by: Christina Oliveira <quic_coliveir@quicinc.com>
This commit is contained in:
Christina Oliveira
2022-05-18 09:38:40 -07:00
parent d2d060cf80
commit 21ca2acab9
11 changed files with 252 additions and 23 deletions

View File

@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
*/
@@ -420,6 +421,34 @@ TRACE_EVENT(sde_perf_uidle_status,
)
);
TRACE_EVENT(sde_hw_fence_status,
TP_PROTO(u32 crtc,
char *fence,
u32 hw_fence_start_timestamp,
u32 hw_fence_end_timestamp),
TP_ARGS(crtc,
fence,
hw_fence_start_timestamp,
hw_fence_end_timestamp),
TP_STRUCT__entry(
__field(u32, crtc)
__field(char *, fence)
__field(u32, hw_fence_start_timestamp)
__field(u32, hw_fence_end_timestamp)),
TP_fast_assign(
__entry->crtc = crtc;
__entry->fence = fence;
__entry->hw_fence_start_timestamp = hw_fence_start_timestamp;
__entry->hw_fence_end_timestamp = hw_fence_end_timestamp;),
TP_printk(
"crtc:%d %s hw-fence start timestamp:%llu end timestamp:%llu",
__entry->crtc,
__entry->fence,
__entry->hw_fence_start_timestamp,
__entry->hw_fence_end_timestamp
)
);
#define sde_atrace trace_tracing_mark_write
#define SDE_ATRACE_END(name) sde_atrace('E', current, name, 0)