drm/nouveau: retain device pointer in nvkm_gsp_mem object
authorTimur Tabi <ttabi@nvidia.com>
Wed, 30 Oct 2024 20:29:51 +0000 (15:29 -0500)
committerDanilo Krummrich <dakr@kernel.org>
Wed, 4 Dec 2024 20:47:47 +0000 (21:47 +0100)
commit7c995e2fd966ae0c94582ae23575c077be0160b7
treea18e8b9c9de13f6099a3e8f5385de64aff18d99f
parent97118a1816d2be258d360da8a9819ff0f34949eb
drm/nouveau: retain device pointer in nvkm_gsp_mem object

Store the struct device pointer used to allocate the DMA buffer in
the nvkm_gsp_mem object.  This allows nvkm_gsp_mem_dtor() to release
the buffer without needing the nvkm_gsp.  This is needed so that
we can retain DMA buffers even after the nvkm_gsp object is deleted.

Signed-off-by: Timur Tabi <ttabi@nvidia.com>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20241030202952.694055-1-ttabi@nvidia.com
drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c