Files
android_kernel_xiaomi_sm8450/include/trace/hooks/v4l2mc.h
Louis Kuo e6a59da61e ANDROID: media: v4l2-core: Fix deadlock in vendor hook
The vendor hook functions we implemented will invoke callback functions which have do some sleep or spinlock
operations and have risk of deadlock due to preemption disabled of normal vendor hook function.
So we have to use restricted vendor hook function instead.
Due to KMI freeze we could not change the existing hooks.

trace_android_rvh_media_device_setup_link	=>invoke setup_link, link_notify callback
trace_android_rvh_v4l2subdev_set_xxx		=>invoke set_xxx callback

Bug: 193870284

Signed-off-by: Louis Kuo <louis.kuo@mediatek.com>
Change-Id: I94fe2e112b6c3d9ac5177abb30a99b7007068f7e
2021-07-21 13:05:27 +00:00

28 lines
779 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM v4l2mc
#define TRACE_INCLUDE_PATH trace/hooks
#if !defined(_TRACE_HOOK_V4L2MC_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_HOOK_V4L2MC_H
#include <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h>
struct media_link;
struct media_link_desc;
DECLARE_HOOK(android_vh_media_device_setup_link,
TP_PROTO(struct media_link *link, struct media_link_desc *linkd, int *ret),
TP_ARGS(link, linkd, ret));
DECLARE_RESTRICTED_HOOK(android_rvh_media_device_setup_link,
TP_PROTO(struct media_link *link,
struct media_link_desc *linkd, int *ret),
TP_ARGS(link, linkd, ret), 1);
#endif /* _TRACE_HOOK_V4L2MC_H */
/* This part must be outside protection */
#include <trace/define_trace.h>