[PATCH 1/2] [v2] drm/nouveau: retain device pointer in nvkm_gsp_mem object

Timur Tabi ttabi at nvidia.com
Tue Jun 18 18:33:31 UTC 2024


On Mon, 2024-06-17 at 19:48 +0200, Danilo Krummrich wrote:

+       mem->size = size;

+       mem->dev = gsp->subdev.device->dev;


If this can potentially out-live the drivers remove() callback, we have to take

a device reference here and drop it in nvkm_gsp_mem_dtor().


        mem->dev = get_device(gsp->subdev.device->dev);

That's an excellent idea, thanks.  It's not currently a problem, but like you said, the idea is to allow it.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20240618/c12ae3d5/attachment.htm>


More information about the Nouveau mailing list