xref: /linux/drivers/media/platform/verisilicon/hantro_v4l2.h (revision cdd5b5a9761fd66d17586e4f4ba6588c70e640ea)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Hantro VPU codec driver
4  *
5  * Copyright (C) 2018 Rockchip Electronics Co., Ltd.
6  *	Alpha Lin <Alpha.Lin@rock-chips.com>
7  *	Jeffy Chen <jeffy.chen@rock-chips.com>
8  *
9  * Copyright 2018 Google LLC.
10  *	Tomasz Figa <tfiga@chromium.org>
11  *
12  * Based on s5p-mfc driver by Samsung Electronics Co., Ltd.
13  * Copyright (C) 2011 Samsung Electronics Co., Ltd.
14  */
15 
16 #ifndef HANTRO_V4L2_H_
17 #define HANTRO_V4L2_H_
18 
19 #include "hantro.h"
20 
21 #define HANTRO_FORCE_POSTPROC	true
22 #define HANTRO_AUTO_POSTPROC	false
23 
24 extern const struct v4l2_ioctl_ops hantro_ioctl_ops;
25 extern const struct vb2_ops hantro_queue_ops;
26 
27 int hantro_reset_raw_fmt(struct hantro_ctx *ctx, int bit_depth, bool need_postproc);
28 void hantro_reset_fmts(struct hantro_ctx *ctx);
29 int hantro_get_format_depth(u32 fourcc);
30 const struct hantro_fmt *
31 hantro_get_default_fmt(const struct hantro_ctx *ctx, bool bitstream,
32 		       int bit_depth, bool need_postproc);
33 
34 #endif /* HANTRO_V4L2_H_ */
35