summaryrefslogtreecommitdiff
path: root/drivers/gpu/host1x/cdma.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-12-11 00:51:04 +0300
committerThierry Reding <treding@nvidia.com>2019-02-04 10:35:54 +0300
commit0747a672a32829809675028ba396f394b104ee31 (patch)
tree2b77877421b339cc552c12df7ae9ce23009bfead /drivers/gpu/host1x/cdma.c
parentdb5adf4d6dced4e3326ce369fe0c213c968095f4 (diff)
downloadlinux-0747a672a32829809675028ba396f394b104ee31.tar.xz
gpu: host1x: Use completion instead of semaphore
In this usage, the two are completely equivalent, but the completion documents better what is going on, and we generally try to avoid semaphores these days. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x/cdma.c')
-rw-r--r--drivers/gpu/host1x/cdma.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/host1x/cdma.c b/drivers/gpu/host1x/cdma.c
index 91df51e631b2..15bdeb836e3d 100644
--- a/drivers/gpu/host1x/cdma.c
+++ b/drivers/gpu/host1x/cdma.c
@@ -210,7 +210,7 @@ unsigned int host1x_cdma_wait_locked(struct host1x_cdma *cdma,
cdma->event = event;
mutex_unlock(&cdma->lock);
- down(&cdma->sem);
+ wait_for_completion(&cdma->complete);
mutex_lock(&cdma->lock);
}
@@ -314,7 +314,7 @@ static void update_cdma_locked(struct host1x_cdma *cdma)
if (signal) {
cdma->event = CDMA_EVENT_NONE;
- up(&cdma->sem);
+ complete(&cdma->complete);
}
}
@@ -416,7 +416,7 @@ int host1x_cdma_init(struct host1x_cdma *cdma)
int err;
mutex_init(&cdma->lock);
- sema_init(&cdma->sem, 0);
+ init_completion(&cdma->complete);
INIT_LIST_HEAD(&cdma->sync_queue);