hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h
....@@ -1,23 +1,15 @@
1
+/* SPDX-License-Identifier: GPL-2.0 */
12 /*
23 * Copyright (c) 2016 MediaTek Inc.
34 * Author: PC Chen <pc.chen@mediatek.com>
45 * Tiffany Lin <tiffany.lin@mediatek.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
146 */
157
168 #ifndef _MTK_VCODEC_DEC_H_
179 #define _MTK_VCODEC_DEC_H_
1810
1911 #include <media/videobuf2-core.h>
20
-#include <media/videobuf2-v4l2.h>
12
+#include <media/v4l2-mem2mem.h>
2113
2214 #define VCODEC_CAPABILITY_4K_DISABLED 0x10
2315 #define VCODEC_DEC_4K_CODED_WIDTH 4096U
....@@ -41,11 +33,10 @@
4133
4234 /**
4335 * struct mtk_video_dec_buf - Private data related to each VB2 buffer.
44
- * @b: VB2 buffer
36
+ * @m2m_buf: M2M buffer
4537 * @list: link list
4638 * @used: Capture buffer contain decoded frame data and keep in
4739 * codec data structure
48
- * @ready_to_display: Capture buffer not display yet
4940 * @queued_in_vb2: Capture buffer is queue in vb2
5041 * @queued_in_v4l2: Capture buffer is in v4l2 driver, but not in vb2
5142 * queue yet
....@@ -56,11 +47,9 @@
5647 * Note : These status information help us track and debug buffer state
5748 */
5849 struct mtk_video_dec_buf {
59
- struct vb2_v4l2_buffer vb;
60
- struct list_head list;
50
+ struct v4l2_m2m_buffer m2m_buf;
6151
6252 bool used;
63
- bool ready_to_display;
6453 bool queued_in_vb2;
6554 bool queued_in_v4l2;
6655 bool lastframe;