1
linux/drivers/media/platform/qcom/venus/dbgfs.h
Dikshita Agarwal 748b080f21 media: venus: Add support for SSR trigger using fault injection
Here we introduce a new fault injection for SSR trigger.

To trigger the SSR:
 echo 100 >  /sys/kernel/debug/venus/fail_ssr/probability
 echo 1 >  /sys/kernel/debug/venus/fail_ssr/times

Co-developed-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-07-07 09:20:15 +01:00

26 lines
534 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 Linaro Ltd. */
#ifndef __VENUS_DBGFS_H__
#define __VENUS_DBGFS_H__
#include <linux/fault-inject.h>
struct venus_core;
#ifdef CONFIG_FAULT_INJECTION
extern struct fault_attr venus_ssr_attr;
static inline bool venus_fault_inject_ssr(void)
{
return should_fail(&venus_ssr_attr, 1);
}
#else
static inline bool venus_fault_inject_ssr(void) { return false; }
#endif
void venus_dbgfs_init(struct venus_core *core);
void venus_dbgfs_deinit(struct venus_core *core);
#endif