]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/nouveau/gsp: fix rm shutdown wait condition
authorBen Skeggs <bskeggs@nvidia.com>
Tue, 4 Feb 2025 17:12:51 +0000 (03:12 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 18 May 2025 20:29:22 +0000 (06:29 +1000)
Though the initial upstreamed GSP-RM version in nouveau was 535.113.01,
the code was developed against earlier versions.

535.42.02 modified the mailbox value used by GSP-RM to signal shutdown
has completed, which was missed at the time.

I'm not aware of any issues caused by this, but noticed the bug while
working on GB20x support.

Signed-off-by: Ben Skeggs <bskeggs@nvidia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Timur Tabi <ttabi@nvidia.com>
Tested-by: Timur Tabi <ttabi@nvidia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c

index 969f6b921fdbd4cebd976d77c4d6d4784302755b..64b58efd31322ba071a62ccd75afd6a2b9a92633 100644 (file)
@@ -2844,7 +2844,7 @@ r535_gsp_fini(struct nvkm_gsp *gsp, bool suspend)
                return ret;
 
        nvkm_msec(gsp->subdev.device, 2000,
-               if (nvkm_falcon_rd32(&gsp->falcon, 0x040) & 0x80000000)
+               if (nvkm_falcon_rd32(&gsp->falcon, 0x040) == 0x80000000)
                        break;
        );