Skip to content

Commit f6ecfda

Browse files
Sid127airlied
authored andcommitted
drm/nouveau: keep DMA buffers required for suspend/resume
Nouveau deallocates a few buffers post GPU init which are required for GPU suspend/resume to function correctly. This is likely not as big an issue on systems where the NVGPU is the only GPU, but on multi-GPU set ups it leads to a regression where the kernel module errors and results in a system-wide rendering freeze. This commit addresses that regression by moving the two buffers required for suspend and resume to be deallocated at driver unload instead of post init. Fixes: 042b5f8 ("drm/nouveau: fix several DMA buffer leaks") Signed-off-by: Sid Pranjale <sidpranjale127@protonmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent f7916c4 commit f6ecfda

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • drivers/gpu/drm/nouveau/nvkm/subdev/gsp

drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,8 +1054,6 @@ r535_gsp_postinit(struct nvkm_gsp *gsp)
10541054
/* Release the DMA buffers that were needed only for boot and init */
10551055
nvkm_gsp_mem_dtor(gsp, &gsp->boot.fw);
10561056
nvkm_gsp_mem_dtor(gsp, &gsp->libos);
1057-
nvkm_gsp_mem_dtor(gsp, &gsp->rmargs);
1058-
nvkm_gsp_mem_dtor(gsp, &gsp->wpr_meta);
10591057

10601058
return ret;
10611059
}
@@ -2163,6 +2161,8 @@ r535_gsp_dtor(struct nvkm_gsp *gsp)
21632161

21642162
r535_gsp_dtor_fws(gsp);
21652163

2164+
nvkm_gsp_mem_dtor(gsp, &gsp->rmargs);
2165+
nvkm_gsp_mem_dtor(gsp, &gsp->wpr_meta);
21662166
nvkm_gsp_mem_dtor(gsp, &gsp->shm.mem);
21672167
nvkm_gsp_mem_dtor(gsp, &gsp->loginit);
21682168
nvkm_gsp_mem_dtor(gsp, &gsp->logintr);

0 commit comments

Comments
 (0)