Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Cleanup and fixes in drmm_add_action_or_reset usage
@ 2024-04-12  8:02 Himal Prasad Ghimiray
  2024-04-12  8:02 ` [PATCH v3 1/7] drm/xe: Simplify function return using drmm_add_action_or_reset() Himal Prasad Ghimiray
                   ` (14 more replies)
  0 siblings, 15 replies; 32+ messages in thread
From: Himal Prasad Ghimiray @ 2024-04-12  8:02 UTC (permalink / raw)
  To: intel-xe
  Cc: Himal Prasad Ghimiray, Rodrigo Vivi, Tejas Upadhyay,
	Daniele Ceraolo Spurio, Niranjana Vishwanathapura

drmm_add_action_or_reset automatically triggers the corresponding action
if there's a failure. However, certain functions were previously relying
on return codes to trigger cleanup, leading to redundant calls. Removed
these functions to prevent multiple invocations.

In case of a failure, drmm_add_action_or_reset automatically triggers a
warning message, such as 'failed to add action "action_name" for
"drm_device".' Despite this, the driver was redundantly issuing similar
warning messages upon failure, offering no additional value. Remove these 
redundant warnings calls.

When encountering failures in sysfs creations or
drmm_add_action_or_reset, errors were previously suppressed. Now,
escalate these errors up the call chain, ensuring they are appropriately
handled in the caller.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tejas Upadhyay <tejas.upadhyay@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Himal Prasad Ghimiray (4):
  drm/xe: Simplify function return using drmm_add_action_or_reset()
  drm/xe: Incase of action add failure, remove sysfs only once.
  drm/xe: Incase of action add failure, free_gsc_pkt only once.
  drm/xe: Return NULL incase of drmm_add_action_or_reset failure
  drm/xe/gt: Abort driver load for sysfs creation failure
  drm/xe/tile: Abort driver load for sysfs creation failure
  drm/xe/pm: Capture errors and handle them

 drivers/gpu/drm/xe/display/xe_display.c       |  8 +----
 drivers/gpu/drm/xe/xe_device.c                |  6 +---
 drivers/gpu/drm/xe/xe_device_sysfs.c          | 12 +++----
 drivers/gpu/drm/xe/xe_device_sysfs.h          |  2 +-
 drivers/gpu/drm/xe/xe_gsc_proxy.c             |  7 +---
 drivers/gpu/drm/xe/xe_gt.c                    | 27 ++++++++-------
 drivers/gpu/drm/xe/xe_gt_ccs_mode.c           | 17 ++++------
 drivers/gpu/drm/xe/xe_gt_ccs_mode.h           |  2 +-
 drivers/gpu/drm/xe/xe_gt_freq.c               | 29 ++++++++--------
 drivers/gpu/drm/xe/xe_gt_freq.h               |  2 +-
 drivers/gpu/drm/xe/xe_gt_idle.c               | 17 ++++------
 drivers/gpu/drm/xe/xe_gt_idle.h               |  2 +-
 drivers/gpu/drm/xe/xe_gt_sysfs.c              | 15 +++-----
 drivers/gpu/drm/xe/xe_gt_sysfs.h              |  2 +-
 drivers/gpu/drm/xe/xe_gt_throttle_sysfs.c     | 11 +++---
 drivers/gpu/drm/xe/xe_gt_throttle_sysfs.h     |  2 +-
 drivers/gpu/drm/xe/xe_guc_pc.c                |  6 +---
 drivers/gpu/drm/xe/xe_huc.c                   |  9 +----
 drivers/gpu/drm/xe/xe_hw_engine.c             |  6 +---
 drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 28 +++++----------
 drivers/gpu/drm/xe/xe_pm.c                    | 34 +++++++++++++++----
 drivers/gpu/drm/xe/xe_pm.h                    |  2 +-
 drivers/gpu/drm/xe/xe_tile.c                  |  2 +-
 drivers/gpu/drm/xe/xe_tile_sysfs.c            | 17 +++++-----
 drivers/gpu/drm/xe/xe_tile_sysfs.h            |  2 +-
 drivers/gpu/drm/xe/xe_vram_freq.c             | 21 +++++-------
 drivers/gpu/drm/xe/xe_vram_freq.h             |  2 +-
 27 files changed, 125 insertions(+), 165 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2024-04-12 17:07 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-12  8:02 [PATCH 0/4] Cleanup and fixes in drmm_add_action_or_reset usage Himal Prasad Ghimiray
2024-04-12  8:02 ` [PATCH v3 1/7] drm/xe: Simplify function return using drmm_add_action_or_reset() Himal Prasad Ghimiray
2024-04-12 12:52   ` Lucas De Marchi
2024-04-12 14:54     ` Ghimiray, Himal Prasad
2024-04-12  8:02 ` [PATCH v3 2/7] drm/xe: Incase of action add failure, remove sysfs only once Himal Prasad Ghimiray
2024-04-12 13:09   ` Lucas De Marchi
2024-04-12 13:13   ` Lucas De Marchi
2024-04-12 14:41     ` Jani Nikula
2024-04-12 14:55       ` Ghimiray, Himal Prasad
2024-04-12  8:02 ` [PATCH v3 3/7] drm/xe: Incase of action add failure, free_gsc_pkt " Himal Prasad Ghimiray
2024-04-12 13:14   ` Lucas De Marchi
2024-04-12 15:38     ` Ghimiray, Himal Prasad
2024-04-12  8:02 ` [PATCH v3 4/7] drm/xe: Return NULL incase of drmm_add_action_or_reset failure Himal Prasad Ghimiray
2024-04-12  8:02 ` [PATCH v3 5/7] drm/xe/gt: Abort driver load for sysfs creation failure Himal Prasad Ghimiray
2024-04-12 13:30   ` Lucas De Marchi
2024-04-12 15:38     ` Ghimiray, Himal Prasad
2024-04-12  8:02 ` [PATCH v3 6/7] drm/xe/tile: " Himal Prasad Ghimiray
2024-04-12 13:32   ` Lucas De Marchi
2024-04-12 15:39     ` Ghimiray, Himal Prasad
2024-04-12  8:02 ` [PATCH v3 7/7] drm/xe/pm: Capture errors and handle them Himal Prasad Ghimiray
2024-04-12 13:42   ` Lucas De Marchi
2024-04-12 16:31     ` Ghimiray, Himal Prasad
2024-04-12 16:58       ` Lucas De Marchi
2024-04-12 17:07         ` Ghimiray, Himal Prasad
2024-04-12  8:15 ` ✓ CI.Patch_applied: success for Cleanup and fixes in drmm_add_action_or_reset usage (rev3) Patchwork
2024-04-12  8:15 ` ✓ CI.checkpatch: " Patchwork
2024-04-12  8:17 ` ✓ CI.KUnit: " Patchwork
2024-04-12  8:31 ` ✓ CI.Build: " Patchwork
2024-04-12  8:34 ` ✓ CI.Hooks: " Patchwork
2024-04-12  8:35 ` ✓ CI.checksparse: " Patchwork
2024-04-12  8:58 ` ✓ CI.BAT: " Patchwork
2024-04-12 12:13 ` ✗ CI.FULL: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox