Skip to contentSkip to conversation

nouveau/gsp: get zeroed pages for any device allocations we need

PATCH In review Dave Airlie 2 participants 2 messages Jun 17, 2025

Subsystems (3)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

PATCH 1/1 nouveau/gsp: get zeroed pages for any device allocations we need

From: Dave Airlie <[email protected]>

This seems to remove some random behaviour around suspend/resume operations, and ordering of memory allocations.

---
 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c +1 -1
index baf42339f93e..4460da3239b5 100644
@@ -1583,7 +1583,7 @@ nvkm_gsp_sg(struct nvkm_device *device, u64 size, struct sg_table *sgt)
 		return ret;
 
 	for_each_sgtable_sg(sgt, sgl, i) {
-		struct page *page = alloc_page(GFP_KERNEL);
+		struct page *page = alloc_page(GFP_KERNEL | __GFP_ZERO);
 
 		if (!page) {
 			nvkm_gsp_sg_free(device, sgt);
Signature · 1 line
2.49.0
maintainer
#1 lore raw
Quoted 4 lines · Dave Airlie

From: Dave Airlie <[email protected]>

This seems to remove some random behaviour around suspend/resume operations, and ordering of memory allocations.

What do you mean with ordering of memory allocations?

Quoted 2 lines

I think we should add:

Fixes 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM")
Quoted 19 lines
---
  drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c +1 -1
index baf42339f93e..4460da3239b5 100644
@@ -1583,7 +1583,7 @@ nvkm_gsp_sg(struct nvkm_device *device, u64 size, struct sg_table *sgt)
  		return ret;
 
  	for_each_sgtable_sg(sgt, sgl, i) {
-		struct page *page = alloc_page(GFP_KERNEL);
+		struct page *page = alloc_page(GFP_KERNEL | __GFP_ZERO);
 
  		if (!page) {
  			nvkm_gsp_sg_free(device, sgt);