drm/nouveau: keep DMA buffers required for suspend/resume
authorSid Pranjale <sidpranjale127@protonmail.com>
Thu, 29 Feb 2024 16:22:05 +0000 (21:52 +0530)
committerDave Airlie <airlied@redhat.com>
Fri, 1 Mar 2024 05:27:04 +0000 (15:27 +1000)
commitf6ecfdad359a01c7fd8a3bcfde3ef0acdf107e6e
tree9a43029efc0adfc9fc370a68ee5fd6d781e73f50
parentf7916c47f66d778817068d86e5c9b5e511e23c86
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: 042b5f83841fb ("drm/nouveau: fix several DMA buffer leaks")
Signed-off-by: Sid Pranjale <sidpranjale127@protonmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c