diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2016-03-01 16:51:58 +0900 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-03-14 10:13:31 +1000 |
commit | a2e435a1b0a3c2bc766d40356151610cc54b8772 (patch) | |
tree | 35b0ac667f8e8570ecbf8940f39a642454efdd2e /drivers/gpu | |
parent | c694ecad9dc4b2b367e33387c4407532b706dab7 (diff) | |
download | blackbird-op-linux-a2e435a1b0a3c2bc766d40356151610cc54b8772.tar.gz blackbird-op-linux-a2e435a1b0a3c2bc766d40356151610cc54b8772.zip |
drm/nouveau/fifo/gk104: take runlist target into account
Bits 28:29 of RUNLIST_BASE specify the memory target of the runlist. Set
it to 0x3 (SYS_MEM_NONCOHERENT) if the runlist object resides in system
memory.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c index d6a88cf67416..cd0f08a2f811 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c @@ -55,6 +55,7 @@ gk104_fifo_runlist_commit(struct gk104_fifo *fifo, u32 engine) struct nvkm_device *device = subdev->device; struct nvkm_memory *cur; int nr = 0; + int target; mutex_lock(&subdev->mutex); cur = engn->runlist[engn->cur_runlist]; @@ -68,7 +69,10 @@ gk104_fifo_runlist_commit(struct gk104_fifo *fifo, u32 engine) } nvkm_done(cur); - nvkm_wr32(device, 0x002270, nvkm_memory_addr(cur) >> 12); + target = (nvkm_memory_target(cur) == NVKM_MEM_TARGET_HOST) ? 0x3 : 0x0; + + nvkm_wr32(device, 0x002270, (nvkm_memory_addr(cur) >> 12) | + (target << 28)); nvkm_wr32(device, 0x002274, (engine << 20) | nr); if (wait_event_timeout(engn->wait, !(nvkm_rd32(device, 0x002284 + |