hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/include/media/vsp1.h
....@@ -1,14 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0+ */
12 /*
23 * vsp1.h -- R-Car VSP1 API
34 *
45 * Copyright (C) 2015 Renesas Electronics Corporation
56 *
67 * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
128 */
139 #ifndef __MEDIA_VSP1_H__
1410 #define __MEDIA_VSP1_H__
....@@ -20,6 +16,9 @@
2016 struct device;
2117
2218 int vsp1_du_init(struct device *dev);
19
+
20
+#define VSP1_DU_STATUS_COMPLETE BIT(0)
21
+#define VSP1_DU_STATUS_WRITEBACK BIT(1)
2322
2423 /**
2524 * struct vsp1_du_lif_config - VSP LIF configuration
....@@ -36,7 +35,7 @@
3635 unsigned int height;
3736 bool interlaced;
3837
39
- void (*callback)(void *data, bool completed, u32 crc);
38
+ void (*callback)(void *data, unsigned int status, u32 crc);
4039 void *callback_data;
4140 };
4241
....@@ -86,11 +85,25 @@
8685 };
8786
8887 /**
88
+ * struct vsp1_du_writeback_config - VSP writeback configuration parameters
89
+ * @pixelformat: plane pixel format (V4L2 4CC)
90
+ * @pitch: line pitch in bytes for the first plane
91
+ * @mem: DMA memory address for each plane of the frame buffer
92
+ */
93
+struct vsp1_du_writeback_config {
94
+ u32 pixelformat;
95
+ unsigned int pitch;
96
+ dma_addr_t mem[3];
97
+};
98
+
99
+/**
89100 * struct vsp1_du_atomic_pipe_config - VSP atomic pipe configuration parameters
90101 * @crc: CRC computation configuration
102
+ * @writeback: writeback configuration
91103 */
92104 struct vsp1_du_atomic_pipe_config {
93105 struct vsp1_du_crc_config crc;
106
+ struct vsp1_du_writeback_config writeback;
94107 };
95108
96109 void vsp1_du_atomic_begin(struct device *dev, unsigned int pipe_index);