Commit 205e18c1 authored by Dave Airlie's avatar Dave Airlie

nouveau/gsp: handle engines in runl without nonstall interrupts.

It appears on TU106 GPUs (2070), that some of the nvdec engines
are in the runlist but have no valid nonstall interrupt, nouveau
didn't handle that too well.

This should let nouveau/gsp work on those.

Cc: stable@vger.kernel.org # v6.7+
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Link: https://lore.kernel.org/all/20240110011826.3996289-1-airlied@gmail.com/
parent 9caaeb09
...@@ -550,6 +550,10 @@ ga100_fifo_nonstall_ctor(struct nvkm_fifo *fifo) ...@@ -550,6 +550,10 @@ ga100_fifo_nonstall_ctor(struct nvkm_fifo *fifo)
struct nvkm_engn *engn = list_first_entry(&runl->engns, typeof(*engn), head); struct nvkm_engn *engn = list_first_entry(&runl->engns, typeof(*engn), head);
runl->nonstall.vector = engn->func->nonstall(engn); runl->nonstall.vector = engn->func->nonstall(engn);
/* if no nonstall vector just keep going */
if (runl->nonstall.vector == -1)
continue;
if (runl->nonstall.vector < 0) { if (runl->nonstall.vector < 0) {
RUNL_ERROR(runl, "nonstall %d", runl->nonstall.vector); RUNL_ERROR(runl, "nonstall %d", runl->nonstall.vector);
return runl->nonstall.vector; return runl->nonstall.vector;
......
...@@ -350,7 +350,7 @@ r535_engn_nonstall(struct nvkm_engn *engn) ...@@ -350,7 +350,7 @@ r535_engn_nonstall(struct nvkm_engn *engn)
int ret; int ret;
ret = nvkm_gsp_intr_nonstall(subdev->device->gsp, subdev->type, subdev->inst); ret = nvkm_gsp_intr_nonstall(subdev->device->gsp, subdev->type, subdev->inst);
WARN_ON(ret < 0); WARN_ON(ret == -ENOENT);
return ret; return ret;
} }
......
...@@ -25,12 +25,8 @@ int ...@@ -25,12 +25,8 @@ int
nvkm_gsp_intr_nonstall(struct nvkm_gsp *gsp, enum nvkm_subdev_type type, int inst) nvkm_gsp_intr_nonstall(struct nvkm_gsp *gsp, enum nvkm_subdev_type type, int inst)
{ {
for (int i = 0; i < gsp->intr_nr; i++) { for (int i = 0; i < gsp->intr_nr; i++) {
if (gsp->intr[i].type == type && gsp->intr[i].inst == inst) { if (gsp->intr[i].type == type && gsp->intr[i].inst == inst)
if (gsp->intr[i].nonstall != ~0)
return gsp->intr[i].nonstall; return gsp->intr[i].nonstall;
return -EINVAL;
}
} }
return -ENOENT; return -ENOENT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment