From: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Cc: igt-dev@lists.freedesktop.org, ashutosh.dixit@intel.com,
"Krzysztof Karas" <krzysztof.karas@intel.com>,
"Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Subject: Re: [PATCH] tools/igt_power: Fix crash on Xe devices by initializing xe_device cache
Date: Tue, 19 May 2026 13:47:01 +0200 [thread overview]
Message-ID: <DIMMNFLMXWP9.248NDUD1GYKFC@intel.com> (raw)
In-Reply-To: <20260519112825.7c7gpzdpevydhkjt@kamilkon-DESK.igk.intel.com>
Hi,
On Tue May 19, 2026 at 1:28 PM CEST, Kamil Konieczny wrote:
> Hi Sebastian,
> On 2026-05-18 at 14:32:24 +0200, Sebastian Brzezinka wrote:
>> Opening a DRM device with plain open() does not initialize the Xe device
>> cache. When igt_power_open() calls is_intel_dgfx() -> xe_has_vram(), it
>> uses find_in_cache() which asserts the cache entry exists, causing a crash
>> on Xe devices with: xe_query-CRITICAL: Failed assertion: xe_dev
>>
>> Fix this by opening the device with O_RDWR (required for DRM ioctls),
>> calling xe_device_get() for Xe devices to populate the cache before
>> calling igt_power_open(), and calling xe_device_put() on cleanup for
>> proper cache management.
>>
>> Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
>> ---
>> tools/igt_power.c | 18 +++++++++++++++---
>> 1 file changed, 15 insertions(+), 3 deletions(-)
>>
>> diff --git a/tools/igt_power.c b/tools/igt_power.c
>> index 6dd180d34..11da0430b 100644
>> --- a/tools/igt_power.c
>> +++ b/tools/igt_power.c
>> @@ -11,6 +11,7 @@
>>
>> #include "drmtest.h"
>> #include "igt_power.h"
>> +#include "xe/xe_query.h"
>>
>
> While you fix it now, your change make it even more difficult
> to remove 'testing' dependancy in tools, see work item
> https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/work_items/16
> IGT command line tools load redundant GUI libraries
Yeah, I know. I can probably handle it in igt_power_open(), but I’m
not sure it helps much with the dependency issue overall. Still, it
should be a bit cleaner, so I’ll go with v2.
--
Best regards,
Sebastian
next prev parent reply other threads:[~2026-05-19 11:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 12:32 [PATCH] tools/igt_power: Fix crash on Xe devices by initializing xe_device cache Sebastian Brzezinka
2026-05-19 1:22 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-05-19 1:43 ` ✓ i915.CI.BAT: " Patchwork
2026-05-19 9:19 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-19 10:23 ` [PATCH] " Krzysztof Karas
2026-05-19 10:28 ` Sebastian Brzezinka
2026-05-19 10:52 ` Zbigniew Kempczyński
2026-05-19 11:28 ` Kamil Konieczny
2026-05-19 11:47 ` Sebastian Brzezinka [this message]
2026-05-19 20:55 ` ✗ i915.CI.Full: failure for " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DIMMNFLMXWP9.248NDUD1GYKFC@intel.com \
--to=sebastian.brzezinka@intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=krzysztof.karas@intel.com \
--cc=zbigniew.kempczynski@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox