Skip to content

New force-wake guard class

Michal Wajdeczko intel-xe 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 10 repliesIn review
  2. v1 RFC3 patches 13 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/xe: Introduce force-wake guard classdrivers/gpu/drm/xe/xe_force_wake.h drivers/gpu/drm/xe/xe_force_wake_types.h+22 -06 replies
2/2drm/xe: Use new force-wake guard class in xe_mocs.cdrivers/gpu/drm/xe/xe_mocs.c+3 -74 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchRodrigo ViviRaag Jadav
1/2A-b R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] New force-wake guard class

There is support for 'classes' with constructor and destructor semantics that can be used for any scope-based resource management, like device force-wake management.

This should allow us to use:

	CLASS(xe_fw, var)(fw, XE_FORCEWAKE_ALL);
or
	guard(xe_fw)(fw, XE_FW_GT);
or
	scoped_guard(xe_fw, fw, XE_FW_GT)
		foo();

without any concern of leaking the force-wake references.

v1: https://patchwork.freedesktop.org/series/134958/
v2: rebased

Cc Rodrigo Vivi <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Himal Prasad Ghimiray <[email protected]>

Michal Wajdeczko (2):
drm/xe: Introduce force-wake guard class drm/xe: Use new force-wake guard class in xe_mocs.c

 drivers/gpu/drm/xe/xe_force_wake.h       | 12 ++++++++++++
 drivers/gpu/drm/xe/xe_force_wake_types.h | 10 ++++++++++
 drivers/gpu/drm/xe/xe_mocs.c             | 10 +++-------
 3 files changed, 25 insertions(+), 7 deletions(-)
Signature · 1 line
2.43.0