forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/platform/xilinx/xilinx-vip.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0 */
12 /*
23 * Xilinx Video IP Core
34 *
....@@ -6,15 +7,12 @@
67 *
78 * Contacts: Hyun Kwon <hyun.kwon@xilinx.com>
89 * Laurent Pinchart <laurent.pinchart@ideasonboard.com>
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License version 2 as
12
- * published by the Free Software Foundation.
1310 */
1411
1512 #ifndef __XILINX_VIP_H__
1613 #define __XILINX_VIP_H__
1714
15
+#include <linux/bitops.h>
1816 #include <linux/io.h>
1917 #include <media/v4l2-subdev.h>
2018
....@@ -38,23 +36,23 @@
3836
3937 /* Xilinx Video IP Control Registers */
4038 #define XVIP_CTRL_CONTROL 0x0000
41
-#define XVIP_CTRL_CONTROL_SW_ENABLE (1 << 0)
42
-#define XVIP_CTRL_CONTROL_REG_UPDATE (1 << 1)
43
-#define XVIP_CTRL_CONTROL_BYPASS (1 << 4)
44
-#define XVIP_CTRL_CONTROL_TEST_PATTERN (1 << 5)
45
-#define XVIP_CTRL_CONTROL_FRAME_SYNC_RESET (1 << 30)
46
-#define XVIP_CTRL_CONTROL_SW_RESET (1 << 31)
39
+#define XVIP_CTRL_CONTROL_SW_ENABLE BIT(0)
40
+#define XVIP_CTRL_CONTROL_REG_UPDATE BIT(1)
41
+#define XVIP_CTRL_CONTROL_BYPASS BIT(4)
42
+#define XVIP_CTRL_CONTROL_TEST_PATTERN BIT(5)
43
+#define XVIP_CTRL_CONTROL_FRAME_SYNC_RESET BIT(30)
44
+#define XVIP_CTRL_CONTROL_SW_RESET BIT(31)
4745 #define XVIP_CTRL_STATUS 0x0004
48
-#define XVIP_CTRL_STATUS_PROC_STARTED (1 << 0)
49
-#define XVIP_CTRL_STATUS_EOF (1 << 1)
46
+#define XVIP_CTRL_STATUS_PROC_STARTED BIT(0)
47
+#define XVIP_CTRL_STATUS_EOF BIT(1)
5048 #define XVIP_CTRL_ERROR 0x0008
51
-#define XVIP_CTRL_ERROR_SLAVE_EOL_EARLY (1 << 0)
52
-#define XVIP_CTRL_ERROR_SLAVE_EOL_LATE (1 << 1)
53
-#define XVIP_CTRL_ERROR_SLAVE_SOF_EARLY (1 << 2)
54
-#define XVIP_CTRL_ERROR_SLAVE_SOF_LATE (1 << 3)
49
+#define XVIP_CTRL_ERROR_SLAVE_EOL_EARLY BIT(0)
50
+#define XVIP_CTRL_ERROR_SLAVE_EOL_LATE BIT(1)
51
+#define XVIP_CTRL_ERROR_SLAVE_SOF_EARLY BIT(2)
52
+#define XVIP_CTRL_ERROR_SLAVE_SOF_LATE BIT(3)
5553 #define XVIP_CTRL_IRQ_ENABLE 0x000c
56
-#define XVIP_CTRL_IRQ_ENABLE_PROC_STARTED (1 << 0)
57
-#define XVIP_CTRL_IRQ_EOF (1 << 1)
54
+#define XVIP_CTRL_IRQ_ENABLE_PROC_STARTED BIT(0)
55
+#define XVIP_CTRL_IRQ_EOF BIT(1)
5856 #define XVIP_CTRL_VERSION 0x0010
5957 #define XVIP_CTRL_VERSION_MAJOR_MASK (0xff << 24)
6058 #define XVIP_CTRL_VERSION_MAJOR_SHIFT 24
....@@ -111,7 +109,6 @@
111109 * @code: media bus format code
112110 * @bpp: bytes per pixel (when stored in memory)
113111 * @fourcc: V4L2 pixel format FCC identifier
114
- * @description: format description, suitable for userspace
115112 */
116113 struct xvip_video_format {
117114 unsigned int vf_code;
....@@ -120,7 +117,6 @@
120117 unsigned int code;
121118 unsigned int bpp;
122119 u32 fourcc;
123
- const char *description;
124120 };
125121
126122 const struct xvip_video_format *xvip_get_format_by_code(unsigned int code);