hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/gpu/host1x/cdma.h
....@@ -1,26 +1,15 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Tegra host1x Command DMA
34 *
45 * Copyright (c) 2010-2013, NVIDIA Corporation.
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms and conditions of the GNU General Public License,
8
- * version 2, as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope it will be useful, but WITHOUT
11
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
- * more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
176 */
187
198 #ifndef __HOST1X_CDMA_H
209 #define __HOST1X_CDMA_H
2110
2211 #include <linux/sched.h>
23
-#include <linux/semaphore.h>
12
+#include <linux/completion.h>
2413 #include <linux/list.h>
2514
2615 struct host1x_syncpt;
....@@ -69,8 +58,8 @@
6958
7059 struct host1x_cdma {
7160 struct mutex lock; /* controls access to shared state */
72
- struct semaphore sem; /* signalled when event occurs */
73
- enum cdma_event event; /* event that sem is waiting for */
61
+ struct completion complete; /* signalled when event occurs */
62
+ enum cdma_event event; /* event that complete is waiting for */
7463 unsigned int slots_used; /* pb slots used in current submit */
7564 unsigned int slots_free; /* pb slots free in current submit */
7665 unsigned int first_get; /* DMAGET value, where submit begins */
....@@ -90,6 +79,8 @@
9079 int host1x_cdma_deinit(struct host1x_cdma *cdma);
9180 int host1x_cdma_begin(struct host1x_cdma *cdma, struct host1x_job *job);
9281 void host1x_cdma_push(struct host1x_cdma *cdma, u32 op1, u32 op2);
82
+void host1x_cdma_push_wide(struct host1x_cdma *cdma, u32 op1, u32 op2,
83
+ u32 op3, u32 op4);
9384 void host1x_cdma_end(struct host1x_cdma *cdma, struct host1x_job *job);
9485 void host1x_cdma_update(struct host1x_cdma *cdma);
9586 void host1x_cdma_peek(struct host1x_cdma *cdma, u32 dmaget, int slot,