drm/xe: Cleanup unwind of gt initialization
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 13 Feb 2025 19:29:03 +0000 (11:29 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 14 Feb 2025 19:42:55 +0000 (11:42 -0800)
commitff6cd29b690b11fff7d1d998852fc6eeb02bed73
tree4f27d4e127168e6898a463d58e001c93d9a7f107
parentc0aeb90b28b88fa2eedef4eae4bd649de6fc2a3e
drm/xe: Cleanup unwind of gt initialization

The only thing in xe_gt_remove() that really needs to happen on the
device remove callback is the xe_uc_remove(). That's because of the
following call chain:

xe_gt_remove()
  xe_uc_remove()
    xe_gsc_remove()
      xe_gsc_proxy_remove()

Move xe_gsc_proxy_remove() to be handled as a xe_device_remove_action,
so it's recorded when it should run during device removal. The rest can
be handled normally by devm infra.

Besides removing the deep call chain above, xe_device_probe() doesn't
have to unwind the gt loop and it's also more in line with the
xe_device_probe() style.

Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250213192909.996148-7-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_device.c
drivers/gpu/drm/xe/xe_gsc.c
drivers/gpu/drm/xe/xe_gsc.h
drivers/gpu/drm/xe/xe_gsc_proxy.c
drivers/gpu/drm/xe/xe_gsc_proxy.h
drivers/gpu/drm/xe/xe_gsc_types.h
drivers/gpu/drm/xe/xe_gt.c
drivers/gpu/drm/xe/xe_gt.h
drivers/gpu/drm/xe/xe_uc.c
drivers/gpu/drm/xe/xe_uc.h