summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/engine/fifo
diff options
context:
space:
mode:
authorBen Skeggs2018-05-08 12:39:46 +0200
committerBen Skeggs2018-05-18 07:01:21 +0200
commit4f2fc25c0f8bcc8db1b8a7b21e88c3d7f35c5acb (patch)
tree45a28b1d92f68e1f8e1d7e778037a51cb6140670 /drivers/gpu/drm/nouveau/nvkm/engine/fifo
parentdrm/nouveau/fifo/gk104-: add interfaces to support different runlist layouts (diff)
downloadkernel-qcow2-linux-4f2fc25c0f8bcc8db1b8a7b21e88c3d7f35c5acb.tar.gz
kernel-qcow2-linux-4f2fc25c0f8bcc8db1b8a7b21e88c3d7f35c5acb.tar.xz
kernel-qcow2-linux-4f2fc25c0f8bcc8db1b8a7b21e88c3d7f35c5acb.zip
drm/nouveau/fifo/gk104-: poll for runlist update completion
Newer HW doesn't appear to send this event, which will cause long delays in runlist updates if they don't complete immediately. RM doesn't use these events anywhere, and an NVGPU commit message notes that polling is the preferred method even on HW that supports the event. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/fifo')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
index afb3ed06ec89..2b8e0d3d2d96 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
@@ -170,10 +170,10 @@ gk104_fifo_runlist_commit(struct gk104_fifo *fifo, int runl)
(target << 28));
nvkm_wr32(device, 0x002274, (runl << 20) | nr);
- if (wait_event_timeout(fifo->runlist[runl].wait,
- !(nvkm_rd32(device, 0x002284 + (runl * 0x08))
- & 0x00100000),
- msecs_to_jiffies(2000)) == 0)
+ if (nvkm_msec(device, 2000,
+ if (!(nvkm_rd32(device, 0x002284 + (runl * 0x08)) & 0x00100000))
+ break;
+ ) < 0)
nvkm_error(subdev, "runlist %d update timeout\n", runl);
unlock:
mutex_unlock(&subdev->mutex);