[PATCH v4 00/13] Cleanup error handling on probe
Lucas De Marchi
lucas.demarchi at intel.com
Wed Feb 12 19:35:47 UTC 2025
Mixing style with goto and devm_add_action_or_reset() is very confusing
and error prone. Clean that up. The only missing one is one of the
display calls, but that can be done in parallel to the review of these
first patches.
Tested on LNL, BMG and ADL-P with driver bind/unbind.
I have other changes on top of these that will make devm compatible.
That will need some drivers/base/ changes though, so it's probably good
to do it in parallel.
v2:
- Add callback-based removed to overcome issue with gsc/mei
integration: it can't be removed with devm.
- More cleanups, adding drm_dev_unplug in the right place, fixing
hwmon, pmu and oa
v3:
- Drop the hwmon patch changing the mutex destroy: we can use drmm_
only if we also migrate the hwmon allocation to drmm_, but
there isn't much reason to do so
v4:
- Move the callback infro to be the first patch and also use it
for xe_display_fini()
- Make our internal api similar to the devm API for easy conversion
Lucas De Marchi (13):
drm/xe: Add callback support for driver remove
drm/xe: Fix xe_display_fini() calls
drm/xe: Fix error handling in xe_irq_install()
drm/xe: Fix xe_tile_init_noalloc() error propagation
drm/xe: Stop ignoring errors from xe_ttm_stolen_mgr_init()
drm/xe: Remove leftover pxp comment
drm/xe: Cleanup unwind of gt initialization
drm/xe: Cleanup extra calls to xe_hw_fence_irq_finish()
drm/xe/oa: Move fini to xe_oa
drm/xe: Move drm_dev_unplug() out of display function
drm/xe/oa: Handle errors in xe_oa_register()
drm/xe/pmu: Fail probe if xe_pmu_register() fails
drm/xe/hwmon: Stop ignoring errors on probe
drivers/gpu/drm/xe/display/xe_display.c | 22 ++--
drivers/gpu/drm/xe/display/xe_display.h | 2 -
drivers/gpu/drm/xe/xe_device.c | 151 +++++++++++++++++-------
drivers/gpu/drm/xe/xe_device.h | 4 +
drivers/gpu/drm/xe/xe_device_types.h | 17 +++
drivers/gpu/drm/xe/xe_gsc.c | 9 --
drivers/gpu/drm/xe/xe_gsc.h | 1 -
drivers/gpu/drm/xe/xe_gsc_proxy.c | 63 +++++-----
drivers/gpu/drm/xe/xe_gsc_proxy.h | 1 -
drivers/gpu/drm/xe/xe_gsc_types.h | 1 +
drivers/gpu/drm/xe/xe_gt.c | 50 +++-----
drivers/gpu/drm/xe/xe_gt.h | 1 -
drivers/gpu/drm/xe/xe_hwmon.c | 31 ++---
drivers/gpu/drm/xe/xe_hwmon.h | 4 +-
drivers/gpu/drm/xe/xe_irq.c | 14 +--
drivers/gpu/drm/xe/xe_oa.c | 78 ++++++------
drivers/gpu/drm/xe/xe_oa.h | 4 +-
drivers/gpu/drm/xe/xe_pci.c | 4 +-
drivers/gpu/drm/xe/xe_tile.c | 4 +-
drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 17 +--
drivers/gpu/drm/xe/xe_ttm_stolen_mgr.h | 2 +-
drivers/gpu/drm/xe/xe_uc.c | 13 --
drivers/gpu/drm/xe/xe_uc.h | 1 -
23 files changed, 261 insertions(+), 233 deletions(-)
--
2.48.1
More information about the Intel-xe
mailing list