ANDROID: arm scmi: add vendor hook to adjust the rx timeout.
Add a vendor hook in scmi transfer, to adjust the rx timeout for performance tuning. Bug: 189610155 Change-Id: Ic1687b3cf8568ca205f640fd97a7ce3bbfc61a36 Signed-off-by: Jiachiam Liu <jiachiam.liu@mediatek.com>
This commit is contained in:
parent
89e44fb838
commit
5cf77864a3
3 changed files with 24 additions and 0 deletions
|
|
@ -59,6 +59,7 @@
|
|||
#include <trace/hooks/mmc_core.h>
|
||||
#include <trace/hooks/v4l2core.h>
|
||||
#include <trace/hooks/v4l2mc.h>
|
||||
#include <trace/hooks/scmi.h>
|
||||
|
||||
/*
|
||||
* Export tracepoints that act as a bare tracehook (ie: have no trace event
|
||||
|
|
@ -308,3 +309,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_media_device_setup_link);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_clear_reserved_fmt_fields);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_fill_ext_fmtdesc);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_clear_mask_adjust);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_scmi_timeout_sync);
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/scmi.h>
|
||||
#undef CREATE_TRACE_POINTS
|
||||
#include <trace/hooks/scmi.h>
|
||||
|
||||
enum scmi_error_codes {
|
||||
SCMI_SUCCESS = 0, /* Success */
|
||||
|
|
@ -461,6 +463,7 @@ static int do_xfer(const struct scmi_protocol_handle *ph,
|
|||
} else {
|
||||
/* And we wait for the response. */
|
||||
timeout = msecs_to_jiffies(info->desc->max_rx_timeout_ms);
|
||||
trace_android_vh_scmi_timeout_sync(&timeout);
|
||||
if (!wait_for_completion_timeout(&xfer->done, timeout)) {
|
||||
dev_err(dev, "timed out in resp(caller: %pS)\n",
|
||||
(void *)_RET_IP_);
|
||||
|
|
|
|||
19
include/trace/hooks/scmi.h
Normal file
19
include/trace/hooks/scmi.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM scmi
|
||||
#undef TRACE_INCLUDE_PATH
|
||||
#define TRACE_INCLUDE_PATH trace/hooks
|
||||
|
||||
#if !defined(_TRACE_HOOK_SCMI_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_HOOK_SCMI_H
|
||||
|
||||
#include <linux/tracepoint.h>
|
||||
#include <trace/hooks/vendor_hooks.h>
|
||||
|
||||
DECLARE_HOOK(android_vh_scmi_timeout_sync,
|
||||
TP_PROTO(int *timeout),
|
||||
TP_ARGS(timeout));
|
||||
|
||||
#endif /* _TRACE_HOOK_SCMI_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
Loading…
Add table
Add a link
Reference in a new issue