| .. | .. | 
|---|
|  | 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ | 
|---|
| 1 | 2 | /* | 
|---|
| 2 | 3 | * Tegra host1x Command DMA | 
|---|
| 3 | 4 | * | 
|---|
| 4 | 5 | * 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/>. | 
|---|
| 17 | 6 | */ | 
|---|
| 18 | 7 |  | 
|---|
| 19 | 8 | #ifndef __HOST1X_CDMA_H | 
|---|
| 20 | 9 | #define __HOST1X_CDMA_H | 
|---|
| 21 | 10 |  | 
|---|
| 22 | 11 | #include <linux/sched.h> | 
|---|
| 23 |  | -#include <linux/semaphore.h> | 
|---|
|  | 12 | +#include <linux/completion.h> | 
|---|
| 24 | 13 | #include <linux/list.h> | 
|---|
| 25 | 14 |  | 
|---|
| 26 | 15 | struct host1x_syncpt; | 
|---|
| .. | .. | 
|---|
| 69 | 58 |  | 
|---|
| 70 | 59 | struct host1x_cdma { | 
|---|
| 71 | 60 | 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 */ | 
|---|
| 74 | 63 | unsigned int slots_used;	/* pb slots used in current submit */ | 
|---|
| 75 | 64 | unsigned int slots_free;	/* pb slots free in current submit */ | 
|---|
| 76 | 65 | unsigned int first_get;		/* DMAGET value, where submit begins */ | 
|---|
| .. | .. | 
|---|
| 90 | 79 | int host1x_cdma_deinit(struct host1x_cdma *cdma); | 
|---|
| 91 | 80 | int host1x_cdma_begin(struct host1x_cdma *cdma, struct host1x_job *job); | 
|---|
| 92 | 81 | 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); | 
|---|
| 93 | 84 | void host1x_cdma_end(struct host1x_cdma *cdma, struct host1x_job *job); | 
|---|
| 94 | 85 | void host1x_cdma_update(struct host1x_cdma *cdma); | 
|---|
| 95 | 86 | void host1x_cdma_peek(struct host1x_cdma *cdma, u32 dmaget, int slot, | 
|---|