Skip to content

Commit 205e18c

Browse files
committed
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: Dave Airlie <airlied@redhat.com> Link: https://lore.kernel.org/all/20240110011826.3996289-1-airlied@gmail.com/
1 parent 9caaeb0 commit 205e18c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

drivers/gpu/drm/nouveau/nvkm/engine/fifo/ga100.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,10 @@ ga100_fifo_nonstall_ctor(struct nvkm_fifo *fifo)
550550
struct nvkm_engn *engn = list_first_entry(&runl->engns, typeof(*engn), head);
551551

552552
runl->nonstall.vector = engn->func->nonstall(engn);
553+
554+
/* if no nonstall vector just keep going */
555+
if (runl->nonstall.vector == -1)
556+
continue;
553557
if (runl->nonstall.vector < 0) {
554558
RUNL_ERROR(runl, "nonstall %d", runl->nonstall.vector);
555559
return runl->nonstall.vector;

drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ r535_engn_nonstall(struct nvkm_engn *engn)
350350
int ret;
351351

352352
ret = nvkm_gsp_intr_nonstall(subdev->device->gsp, subdev->type, subdev->inst);
353-
WARN_ON(ret < 0);
353+
WARN_ON(ret == -ENOENT);
354354
return ret;
355355
}
356356

drivers/gpu/drm/nouveau/nvkm/subdev/gsp/base.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,8 @@ int
2525
nvkm_gsp_intr_nonstall(struct nvkm_gsp *gsp, enum nvkm_subdev_type type, int inst)
2626
{
2727
for (int i = 0; i < gsp->intr_nr; i++) {
28-
if (gsp->intr[i].type == type && gsp->intr[i].inst == inst) {
29-
if (gsp->intr[i].nonstall != ~0)
30-
return gsp->intr[i].nonstall;
31-
32-
return -EINVAL;
33-
}
28+
if (gsp->intr[i].type == type && gsp->intr[i].inst == inst)
29+
return gsp->intr[i].nonstall;
3430
}
3531

3632
return -ENOENT;

0 commit comments

Comments
 (0)