Skip to contentSkip to conversation

nouveau: check gsp->rm as well as gsp pointer before gcx ready

PATCH New Dave Airlie 1 participant 1 message Sep 30

Subsystems (3)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

PATCH 1/1 nouveau: check gsp->rm as well as gsp pointer before gcx ready

From: Dave Airlie <[email protected]>

In turing systems where gsp exists, but can end up not being used, we need to add a second check.

Fixes cb4c7603678c ("drm/nouveau/gsp/r570: Add support for INTERNAL_GCX_ENTRY_PREREQUISITE")
Cc Lyude Paul <[email protected]>
---
 drivers/gpu/drm/nouveau/nvkm/engine/device/user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/engine/device/user.c +1 -1
index f78e6b9b4292..b841d66f8bb3 100644
@@ -201,7 +201,7 @@ nvkm_udevice_gcx_ready(struct nvkm_udevice *udev, void *data, u32 size)
 	} *args = data;
 	int ret = -ENOSYS;
 
-	if (!gsp) {
+	if (!gsp || !gsp->rm) {
 		args->v0.ready = NV_DEVICE_GC6_READY | NV_DEVICE_GCOFF_READY;
 		return 0;
 	}
Signature · 1 line
2.55.0