Skip to content

tools/igt_power: fix Xe crash via drmtest path helpers

Sebastian Brzezinka igt-dev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest2 patches 5 repliesIn review
  2. v5 posting 2/22 patches 2 repliesSuperseded
  3. v5 posting 1/20 of 2 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v42 patches8 repliesSuperseded

Changes in v6 from the cover letter

- shorten commit message for drm_open_driver_path()
- update doc to mention DRM_IOCTL_VERSION check instead of xe_device cache
- split combined __get_drm_device_name()/name[0] condition into separate checks using goto err pattern

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2lib/drmtest: add drm_open_driver_path()lib/drmtest.c lib/drmtest.h+36 -02 replies
2/2tools/igt_power: initialize xe_device cachetools/igt_power.c+3 -31 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchKamil KoniecznyKrzysztof Karas
1/2R-b R-b
2/2R-b R-b

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

Read the v6 thread

Cover letter [PATCH i-g-t v6 0/2] tools/igt_power: fix Xe crash via drmtest path helpers

v6:
- shorten commit message for drm_open_driver_path()
- update doc to mention DRM_IOCTL_VERSION check instead of xe_device cache
- split combined __get_drm_device_name()/name[0] condition into separate checks using goto err pattern

v5:
- rename __drm_open_driver_path() to drm_open_driver_path() since xe_device_get() internally uses igt_assert(), making the __ no-assert prefix semantically incorrect
- add name[0] != 0 check after __get_drm_device_name() to guard against an empty driver name being treated as a valid DRM device

v4:
- rename drm_open_driver_path to __drm_open_driver_path (no asserts/requires)
- add DRM_IOCTL_VERSION check to verify fd is a DRM device before proceeding
- split the single patch into two: lib helper addition and igt_power

v3:
- remove redundant if (fd >= 0) guards on both close call sites

v2:
- move Xe cache setup/teardown out of igt_power
- add drm_open_driver_path() and use __drm_close_driver()
- drop the direct xe/xe_query dependency from igt_power

Sebastian Brzezinka (2):
lib/drmtest: add drm_open_driver_path()
tools/igt_power: initialize xe_device cache

 lib/drmtest.c     | 35 +++++++++++++++++++++++++++++++++++
 lib/drmtest.h     |  1 +
 tools/igt_power.c |  6 +++---
 3 files changed, 39 insertions(+), 3 deletions(-)
Signature · 1 line
2.53.0