提交 a2e435a1 编写于 作者: A Alexandre Courbot 提交者: Ben Skeggs

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: NAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 c694ecad
...@@ -55,6 +55,7 @@ gk104_fifo_runlist_commit(struct gk104_fifo *fifo, u32 engine) ...@@ -55,6 +55,7 @@ gk104_fifo_runlist_commit(struct gk104_fifo *fifo, u32 engine)
struct nvkm_device *device = subdev->device; struct nvkm_device *device = subdev->device;
struct nvkm_memory *cur; struct nvkm_memory *cur;
int nr = 0; int nr = 0;
int target;
mutex_lock(&subdev->mutex); mutex_lock(&subdev->mutex);
cur = engn->runlist[engn->cur_runlist]; cur = engn->runlist[engn->cur_runlist];
...@@ -68,7 +69,10 @@ gk104_fifo_runlist_commit(struct gk104_fifo *fifo, u32 engine) ...@@ -68,7 +69,10 @@ gk104_fifo_runlist_commit(struct gk104_fifo *fifo, u32 engine)
} }
nvkm_done(cur); 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); nvkm_wr32(device, 0x002274, (engine << 20) | nr);
if (wait_event_timeout(engn->wait, !(nvkm_rd32(device, 0x002284 + if (wait_event_timeout(engn->wait, !(nvkm_rd32(device, 0x002284 +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册