Skip to contentSkip to conversation

nouveau/gsp: allocate enough space for all channel ids.

PATCH New Dave Airlie 1 participant 1 message Nov 21, 2023

Subsystems (3)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

PATCH 1/1 nouveau/gsp: allocate enough space for all channel ids.

From: Dave Airlie <[email protected]>

This probably isn't the ideal fix, but we ended up using chids sparsely, and lots of things rely on indexing into the full range, so just allocate the full range up front.

The GSP code fixes 8 channels into a userd page, but we end up using a single userd page per channel so end up sparsely using the range.

Fixes a few crashes seen with multiple channels.

---
 drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c +1 -1
index 3adbb05ff587..d088e636edc3 100644
@@ -539,7 +539,7 @@ r535_fifo_runl_ctor(struct nvkm_fifo *fifo)
 	struct nvkm_runl *runl;
 	struct nvkm_engn *engn;
 	u32 cgids = 2048;
-	u32 chids = 2048 / CHID_PER_USERD;
+	u32 chids = 2048;
 	int ret;
 	NV2080_CTRL_FIFO_GET_DEVICE_INFO_TABLE_PARAMS *ctrl;
 
Signature · 1 line
2.42.0