]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/xe: covert sysfs over to devm
authorMatthew Auld <matthew.auld@intel.com>
Wed, 22 May 2024 10:21:45 +0000 (11:21 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 22 May 2024 12:22:38 +0000 (13:22 +0100)
commitc60f91bbc4bcd91f9c7f3de36c541951b12d165a
tree0ac0cc9964ad2780e16ee6263daa2b38c2cbb978
parent4465b8c6d3539811ce576f163cb3bf3890e5c883
drm/xe: covert sysfs over to devm

Hotunplugging the device seems to result in stuff like:

kobject_add_internal failed for tile0 with -EEXIST, don't try to
register things with the same name in the same directory.

We only remove the sysfs as part of drmm, however that is tied to the
lifetime of the driver instance and not the device underneath. Attempt
to fix by using devm for all of the remaining sysfs stuff related to the
device.

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1667
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1432
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-20-matthew.auld@intel.com
drivers/gpu/drm/xe/xe_device_sysfs.c
drivers/gpu/drm/xe/xe_gt_ccs_mode.c
drivers/gpu/drm/xe/xe_gt_freq.c
drivers/gpu/drm/xe/xe_gt_idle.c
drivers/gpu/drm/xe/xe_gt_sysfs.c
drivers/gpu/drm/xe/xe_gt_throttle_sysfs.c
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
drivers/gpu/drm/xe/xe_tile_sysfs.c
drivers/gpu/drm/xe/xe_vram_freq.c