]> www.infradead.org Git - nvme.git/commitdiff
nouveau/gsp: handle engines in runl without nonstall interrupts.
authorDave Airlie <airlied@redhat.com>
Wed, 10 Jan 2024 01:14:05 +0000 (11:14 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 15 Jan 2024 06:04:48 +0000 (16:04 +1000)
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/
drivers/gpu/drm/nouveau/nvkm/engine/fifo/ga100.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/base.c

index c8ce7ff187135b0992b52a3c62d8a48593b2e625..e74493a4569edb933e7d55c817709cb93e701a56 100644 (file)
@@ -550,6 +550,10 @@ ga100_fifo_nonstall_ctor(struct nvkm_fifo *fifo)
                struct nvkm_engn *engn = list_first_entry(&runl->engns, typeof(*engn), head);
 
                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) {
                        RUNL_ERROR(runl, "nonstall %d", runl->nonstall.vector);
                        return runl->nonstall.vector;
index d088e636edc31c407582bdbe8ab0ee28653956bf..de2ebe8f21348c06d7585e1a7b02ae28d8fa29c1 100644 (file)
@@ -350,7 +350,7 @@ r535_engn_nonstall(struct nvkm_engn *engn)
        int ret;
 
        ret = nvkm_gsp_intr_nonstall(subdev->device->gsp, subdev->type, subdev->inst);
-       WARN_ON(ret < 0);
+       WARN_ON(ret == -ENOENT);
        return ret;
 }
 
index 04bceaa28a197d93d85db77098e9f8330c63cff0..da1bebb896f7fb1ec5bba033600f16d23f29f96c 100644 (file)
@@ -25,12 +25,8 @@ int
 nvkm_gsp_intr_nonstall(struct nvkm_gsp *gsp, enum nvkm_subdev_type type, int inst)
 {
        for (int i = 0; i < gsp->intr_nr; i++) {
-               if (gsp->intr[i].type == type && gsp->intr[i].inst == inst) {
-                       if (gsp->intr[i].nonstall != ~0)
-                               return gsp->intr[i].nonstall;
-
-                       return -EINVAL;
-               }
+               if (gsp->intr[i].type == type && gsp->intr[i].inst == inst)
+                       return gsp->intr[i].nonstall;
        }
 
        return -ENOENT;