summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2016-05-10 12:42:26 +1000
committerBen Skeggs <bskeggs@redhat.com>2017-02-17 15:15:01 +1000
commitd2ee360564dca43cbfb2bd8ceead7671c87962d2 (patch)
treea2dee52a4365a000a3fc6202389f480cdec1d457 /drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
parent134fdc1a704f0042465ea993c33540aaec7e1d2e (diff)
drm/nouveau/core/memory: distinguish between coherent/non-coherent targets
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
index ec68ea9747d5..8772a995329a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
@@ -68,7 +68,14 @@ gf100_fifo_runlist_commit(struct gf100_fifo *fifo)
}
nvkm_done(cur);
- target = (nvkm_memory_target(cur) == NVKM_MEM_TARGET_HOST) ? 0x3 : 0x0;
+ switch (nvkm_memory_target(cur)) {
+ case NVKM_MEM_TARGET_VRAM: target = 0; break;
+ case NVKM_MEM_TARGET_NCOH: target = 3; break;
+ default:
+ mutex_unlock(&subdev->mutex);
+ WARN_ON(1);
+ return;
+ }
nvkm_wr32(device, 0x002270, (nvkm_memory_addr(cur) >> 12) |
(target << 28));