android_kernel_xiaomi_sm7250/include/linux/fastcvpd.h
Chinmay Sawarkar e8507af28b msm: vidc: Add snapshot of MSM video driver
This is a snapshot from branch msm-4.14
'commit 195f5d0cdc2c ("cnss2: Do not handle MHI device
error during driver unloading")'.

CRs-Fixed: 2344373
Change-Id: Ifd98751c64924852de74a56f4827b0ec7b9eb291
Signed-off-by: Tapas Kumar Kundu <tkundu@codeaurora.org>
Signed-off-by: Vaibhav Deshu Venkatesh <vdeshuve@codeaurora.org>
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2018-11-21 16:25:40 -08:00

81 lines
1.7 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2018, The Linux Foundation. All rights reserved.
*/
#ifndef FASTCVPD_H
#define FASTCVPD_H
#include <linux/types.h>
#define FASTCVPD_GLINK_GUID "fastcvpd-glink-apps-dsp"
#define FASTCVPD_SMD_GUID "fastcvpd-smd-apps-dsp"
#define FASTCVPD_DEVICE_NAME "fastcvpd-smd"
#ifdef CONFIG_MSM_FASTCVPD
/*
* API for Video driver to send physical address to FastCVP driver
* @param phys_addr
* Physical address of command message queue
* that needs to be mapped to CDSP.
* It should be allocated from CMA adsp_mem region.
*
* @param size_in_bytes
* Size in bytes of command message queue
*/
int fastcvpd_video_send_cmd_hfi_queue(phys_addr_t *phys_addr,
uint32_t size_in_bytes);
/*
* API for Video driver to suspend CVP session during
* power collapse
*
* @param session_flag
* Flag to share details of session.
*/
int fastcvpd_video_suspend(uint32_t session_flag);
/*
* API for Video driver to resume CVP session during
* power collapse
*
* @param session_flag
* Flag to share details of session.
*/
int fastcvpd_video_resume(uint32_t session_flag);
/*
* API for Video driver to shutdown CVP session during
* video subsystem error.
*
* @param session_flag
* Flag to share details of session.
*/
int fastcvpd_video_shutdown(uint32_t session_flag);
#else
static inline int fastcvpd_video_send_cmd_hfi_queue(
phys_addr_t *phys_addr,
uint32_t size_in_bytes)
{
return -ENODEV;
}
static inline int fastcvpd_video_shutdown(uint32_t session_flag)
{
return -ENODEV;
}
static inline int fastcvpd_video_suspend(uint32_t session_flag)
{
return -ENODEV;
}
static inline int fastcvpd_video_resume(uint32_t session_flag)
{
return -ENODEV;
}
#endif // CONFIG_FASTCVPD
#endif // FASTCVPD_H