From: Peter Senna Tschudin <peter.senna@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
igt-dev@lists.freedesktop.org
Cc: Francois Dugast <francois.dugast@intel.com>
Subject: Re: [PATCH i-g-t 4/4] lib/igt_device_scan: Fix scan vs bind/unbind/reload
Date: Wed, 18 Dec 2024 07:07:04 +0100 [thread overview]
Message-ID: <f134a51b-c72b-459e-976b-2c26906b7efa@linux.intel.com> (raw)
In-Reply-To: <20241218051324.2696557-5-lucas.demarchi@intel.com>
Hi Lucas,
Please see my comment below.
On 18.12.2024 06:13, Lucas De Marchi wrote:
> There's no guarantee a card will end up with the same device node when
> modules are loaded/unloaded and drivers bound/unbound. There's some
> fundamental issue with the igt's the way it is and it's also puzzling
> from the logs it looks like the device vanished from the bus, when in
> reality is just the SW state out of sync with what the kernel is
> exporting.
>
> Re-scanning when trying to match a device is not expensive compared to
> what most tests are doing, so simply force it to occur whenever trying
> to match a card.
>
> Example for xe_wedged:
>
> $ sudo ./build/tests/xe_wedged --device pci:0000:03:00.0 --r wedged-at-any-timeout
> (xe_wedged:11173) drmtest-DEBUG: Looking for devices to open using filter 0: pci:0000:03:00.0
> (xe_wedged:11173) drmtest-DEBUG: Filter matched /dev/dri/card1 | /dev/dri/renderD129
>
> ... [ wedge and rebind here ]
>
> (xe_wedged:11173) drmtest-DEBUG: Looking for devices to open using filter 0: pci:0000:03:00.0
> (xe_wedged:11173) drmtest-DEBUG: Filter matched /dev/dri/card2 | /dev/dri/renderD130
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
> lib/igt_device_scan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c
> index 8e2297087..956719fba 100644
> --- a/lib/igt_device_scan.c
> +++ b/lib/igt_device_scan.c
> @@ -1983,7 +1983,7 @@ static bool __igt_device_card_match(const char *filter,
> * Scan devices in case the user hasn't yet,
> * but leave a decision on forced rescan on the user side.
> */
The comment needs love. What about:
/*
* There are no guarantees about the association between device node and
* GPU. Force a rescan to prevent mismatch between device node and gpu.
*/
> - igt_devices_scan(false);
> + igt_devices_scan(true);
>
> if (igt_device_filter_apply(filter) == false)
> return false;
next prev parent reply other threads:[~2024-12-18 6:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 5:13 [PATCH i-g-t 0/4] Device scan fixes Lucas De Marchi
2024-12-18 5:13 ` [PATCH i-g-t 1/4] lib/drmtest: Fix drm_close_driver() Lucas De Marchi
2024-12-18 5:13 ` [PATCH i-g-t 2/4] lib/igt_sysfs: Fix close when rebinding Lucas De Marchi
2024-12-18 5:13 ` [PATCH i-g-t 3/4] lib/igt_sysfs: Move close to be common to all actions Lucas De Marchi
2024-12-18 5:13 ` [PATCH i-g-t 4/4] lib/igt_device_scan: Fix scan vs bind/unbind/reload Lucas De Marchi
2024-12-18 6:07 ` Peter Senna Tschudin [this message]
2024-12-18 6:17 ` Zbigniew Kempczyński
2024-12-20 19:10 ` Lucas De Marchi
2024-12-18 6:34 ` Zbigniew Kempczyński
2024-12-19 16:35 ` Lucas De Marchi
2024-12-20 6:59 ` Zbigniew Kempczyński
2024-12-20 18:52 ` Lucas De Marchi
2024-12-18 8:20 ` Kamil Konieczny
2024-12-18 8:16 ` [PATCH i-g-t 0/4] Device scan fixes Peter Senna Tschudin
2024-12-18 22:04 ` Lucas De Marchi
2024-12-19 8:44 ` Peter Senna Tschudin
2024-12-18 20:55 ` ✓ i915.CI.BAT: success for " Patchwork
2024-12-18 23:00 ` ✓ Xe.CI.BAT: " Patchwork
2024-12-19 10:18 ` ✗ i915.CI.Full: failure " Patchwork
2024-12-19 14:13 ` ✗ Xe.CI.Full: " 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=f134a51b-c72b-459e-976b-2c26906b7efa@linux.intel.com \
--to=peter.senna@linux.intel.com \
--cc=francois.dugast@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=lucas.demarchi@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