forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/media/platform/qcom/venus/helpers.h
....@@ -1,16 +1,7 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
34 * Copyright (C) 2017 Linaro Ltd.
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 and
7
- * only version 2 as published by the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- *
145 */
156 #ifndef __VENUS_HELPERS_H__
167 #define __VENUS_HELPERS_H__
....@@ -18,11 +9,12 @@
189 #include <media/videobuf2-v4l2.h>
1910
2011 struct venus_inst;
12
+struct venus_core;
2113
2214 bool venus_helper_check_codec(struct venus_inst *inst, u32 v4l2_pixfmt);
2315 struct vb2_v4l2_buffer *venus_helper_find_buf(struct venus_inst *inst,
2416 unsigned int type, u32 idx);
25
-void venus_helper_buffers_done(struct venus_inst *inst,
17
+void venus_helper_buffers_done(struct venus_inst *inst, unsigned int type,
2618 enum vb2_buffer_state state);
2719 int venus_helper_vb2_buf_init(struct vb2_buffer *vb);
2820 int venus_helper_vb2_buf_prepare(struct vb2_buffer *vb);
....@@ -41,7 +33,7 @@
4133 unsigned int width, unsigned int height,
4234 u32 buftype);
4335 int venus_helper_set_work_mode(struct venus_inst *inst, u32 mode);
44
-int venus_helper_set_core_usage(struct venus_inst *inst, u32 usage);
36
+int venus_helper_init_codec_freq_data(struct venus_inst *inst);
4537 int venus_helper_set_num_bufs(struct venus_inst *inst, unsigned int input_bufs,
4638 unsigned int output_bufs,
4739 unsigned int output2_bufs);
....@@ -60,6 +52,15 @@
6052 u32 *out2_fmt, bool ubwc);
6153 int venus_helper_alloc_dpb_bufs(struct venus_inst *inst);
6254 int venus_helper_free_dpb_bufs(struct venus_inst *inst);
63
-int venus_helper_power_enable(struct venus_core *core, u32 session_type,
64
- bool enable);
55
+int venus_helper_intbufs_alloc(struct venus_inst *inst);
56
+int venus_helper_intbufs_free(struct venus_inst *inst);
57
+int venus_helper_intbufs_realloc(struct venus_inst *inst);
58
+int venus_helper_queue_dpb_bufs(struct venus_inst *inst);
59
+int venus_helper_unregister_bufs(struct venus_inst *inst);
60
+int venus_helper_process_initial_cap_bufs(struct venus_inst *inst);
61
+int venus_helper_process_initial_out_bufs(struct venus_inst *inst);
62
+void venus_helper_get_ts_metadata(struct venus_inst *inst, u64 timestamp_us,
63
+ struct vb2_v4l2_buffer *vbuf);
64
+int venus_helper_get_profile_level(struct venus_inst *inst, u32 *profile, u32 *level);
65
+int venus_helper_set_profile_level(struct venus_inst *inst, u32 profile, u32 level);
6566 #endif