All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] tools/igt_power: fix Xe crash via drmtest path helpers
@ 2026-05-28 10:20 ` Sebastian Brzezinka
  0 siblings, 0 replies; 14+ messages in thread
From: Sebastian Brzezinka @ 2026-05-26 11:39 UTC (permalink / raw)
  To: igt-dev
  Cc: Sebastian Brzezinka, kamil.konieczny, krzysztof.karas,
	zbigniew.kempczynski, x.wang

igt_power opened its DRM device fd with a raw open() call, which skips
the Xe device cache initialisation performed by the drmtest open
helpers. This caused an assertion failure in xe_query the moment
igt_power_open() called into is_intel_dgfx() on a Xe device.

The fix is split into two patches. The first adds __drm_open_driver_path()
to lib/drmtest, a non-asserting helper that validates the fd is a real DRM
device (DRM_IOCTL_VERSION) before initialising the Xe cache. The second
switches igt_power to that helper and its matching __drm_close_driver(),
completely removing the direct Xe dependency from the tool.

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: fix crash on Xe devices by initializing xe_device
    cache

 lib/drmtest.c     | 30 ++++++++++++++++++++++++++++++
 lib/drmtest.h     |  1 +
 tools/igt_power.c |  6 +++---
 3 files changed, 34 insertions(+), 3 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-05-29 13:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 11:39 [PATCH v4 0/2] tools/igt_power: fix Xe crash via drmtest path helpers Sebastian Brzezinka
2026-05-28 10:20 ` [PATCH i-g-t " Sebastian Brzezinka
2026-05-26 11:39 ` [PATCH v4 1/2] lib/drmtest: add __drm_open_driver_path() Sebastian Brzezinka
2026-05-28 10:20   ` [PATCH i-g-t " Sebastian Brzezinka
2026-05-26 11:39   ` [PATCH v4 2/2] tools/igt_power: fix crash on Xe devices by initializing xe_device cache Sebastian Brzezinka
2026-05-28 10:20     ` [PATCH i-g-t " Sebastian Brzezinka
2026-05-26 11:51   ` [PATCH v4 1/2] lib/drmtest: add __drm_open_driver_path() Jani Nikula
2026-05-26 11:59     ` Sebastian Brzezinka
2026-05-26 12:07       ` Jani Nikula
2026-05-27 13:22         ` Kamil Konieczny
2026-05-27 14:22           ` Ville Syrjälä
2026-05-29 13:37           ` Gustavo Sousa
2026-05-28 15:17   ` Kamil Konieczny
2026-05-27 14:32 ` [PATCH v4 0/2] tools/igt_power: fix Xe crash via drmtest path helpers Kamil Konieczny

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.