]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe/guc: move guc_fini over to devm
authorMatthew Auld <matthew.auld@intel.com>
Wed, 22 May 2024 10:21:47 +0000 (11:21 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 22 May 2024 12:22:39 +0000 (13:22 +0100)
commit241f5d25ff198f86bbd812a655ddc86834dedb94
tree869737b5b7b91dc38ce0817abf849e81cf95f4e2
parent3a1c27cd0122409a9fc425106fff79655ceeaa20
drm/xe/guc: move guc_fini over to devm

Make sure to actually call this when the device is removed. Currently we
only trigger it when the driver instance goes away, but that doesn't
work too well with hotunplug, since device can be removed and re-probed
with a new driver instance, where the guc_fini() is called too late.
Move the fini over to devm to ensure this is called when device is
removed.

References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1717
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-22-matthew.auld@intel.com
drivers/gpu/drm/xe/xe_guc.c