/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
/*
 * Copyright (c) 2020 MediaTek Inc.
 */

#ifndef MDRV_DEMUX_PVR_TRANS_H
#define MDRV_DEMUX_PVR_TRANS_H

enum pvr_data_trans_type {
	PVR_DATA_TRANS_RINGBUF_TYPE,
	PVR_DATA_TRANS_VB2_SPLANE_TYPE,
	PVR_DATA_TRANS_VB2_MPLANE_TYPE,
	PVR_DATA_TRANS_MAX_TYPE
};

enum pvr_data_trans_mode {
	PVR_DATA_TRANS_REE_MODE,
	PVR_DATA_TRANS_TEE_MODE,
	PVR_DATA_TRANS_MAX_MODE
};

struct pvr_data_trans_param {
	struct pvr_slot *pvr_slot;
	u8 *va[2];
	u64 pa[2];
	u32 len[2];
};

typedef int (*pvr_data_trans_fn)(int, struct pvr_data_trans_param *);

struct mdrv_demux_pvr;

int mdrv_demux_pvr_set_strategy_mode(struct mdrv_demux_pvr *pvr,
	u16 path_id, enum pvr_data_trans_mode mode);

int mdrv_demux_pvr_set_strategy_type(struct mdrv_demux_pvr *pvr,
	u16 path_id, enum pvr_data_trans_type type);

#endif /* MDRV_DEMUX_PVR_TRANS_H */
