From: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Chaitanya Kumar Borah" <chaitanya.kumar.borah@intel.com>,
"Riana Tauro" <riana.tauro@intel.com>,
"Michał Grzelak" <michal.grzelak@intel.com>,
"Jeevan B" <jeevan.b@intel.com>,
"Swati Sharma" <swati2.sharma@intel.com>
Subject: [PATCH i-g-t 2/3] tests/intel/xe_configfs: Reload audio driver on exit
Date: Thu, 15 Oct 2026 19:30:34 +0530 [thread overview]
Message-ID: <20261015140035.2686997-2-chaitanya.kumar.borah@intel.com> (raw)
In-Reply-To: <20261015140035.2686997-1-chaitanya.kumar.borah@intel.com>
Commit 117e9ecbdd1d ("xe/igt_kmod_unbind: release audio before
unbinding xe") made igt_audio_driver_unload() be called before
unbinding xe to avoid the audio-component bind warnings/errors that
happen if xe is unbound while snd_hda_intel is still attached. All
call sites in this file passed NULL for the unloaded driver name, so
it was never tracked, and nothing ever reloaded it afterwards.
As a result snd_hda_intel/snd_hdmi_lpe_audio is left unloaded for the
rest of the boot even when every subtest passes, since xe always ends
up rebound by restore() but audio never does.
Capture the unloaded driver name and reload it wherever xe gets bound
again in restore().
Cc: Riana Tauro <riana.tauro@intel.com>
Cc: Michał Grzelak <michal.grzelak@intel.com>
Cc: Jeevan B <jeevan.b@intel.com>
Cc: Swati Sharma <swati2.sharma@intel.com>
Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
---
tests/intel/xe_configfs.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/tests/intel/xe_configfs.c b/tests/intel/xe_configfs.c
index 450c0a119..576a741b2 100644
--- a/tests/intel/xe_configfs.c
+++ b/tests/intel/xe_configfs.c
@@ -25,6 +25,7 @@
static char bus_addr[NAME_MAX];
static struct pci_device *pci_dev;
+static char *snd_driver;
static bool check_registers(const uint32_t reg[], const uint32_t val[],
size_t max)
@@ -55,7 +56,7 @@ static void restore(int sig)
{
int configfs_fd;
- igt_audio_driver_unload(NULL);
+ igt_audio_driver_unload(&snd_driver);
igt_kmod_unbind("xe", bus_addr);
/* Drop all custom configfs settings from subtests */
@@ -66,11 +67,17 @@ static void restore(int sig)
/* Bind again a clean driver with no custom settings */
igt_kmod_bind("xe", bus_addr);
+
+ if (snd_driver) {
+ igt_kmod_load(snd_driver, NULL);
+ free(snd_driver);
+ snd_driver = NULL;
+ }
}
static void set_survivability_mode(int configfs_device_fd, bool value)
{
- igt_audio_driver_unload(NULL);
+ igt_audio_driver_unload(&snd_driver);
igt_kmod_unbind("xe", bus_addr);
igt_sysfs_set_boolean(configfs_device_fd, "survivability_mode", value);
igt_kmod_bind("xe", bus_addr);
@@ -115,7 +122,7 @@ static void test_engines_allowed_invalid(int configfs_device_fd)
* These only test if engine parsing is correct, so just make sure
* there's no device bound
*/
- igt_audio_driver_unload(NULL);
+ igt_audio_driver_unload(&snd_driver);
igt_kmod_unbind("xe", bus_addr);
for (size_t i = 0; i < ARRAY_SIZE(values); i++) {
@@ -142,7 +149,7 @@ static void test_engines_allowed(int configfs_device_fd)
* These only test if engine parsing is correct, so just make sure
* there's no device bound
*/
- igt_audio_driver_unload(NULL);
+ igt_audio_driver_unload(&snd_driver);
igt_kmod_unbind("xe", bus_addr);
for (size_t i = 0; i < ARRAY_SIZE(values); i++) {
@@ -173,7 +180,7 @@ static void test_gt_types_allowed(int configfs_device_fd)
* These only test if gt type parsing is correct, so just make sure
* there's no device bound
*/
- igt_audio_driver_unload(NULL);
+ igt_audio_driver_unload(&snd_driver);
igt_kmod_unbind("xe", bus_addr);
for (size_t i = 0; i < ARRAY_SIZE(values); i++) {
@@ -240,7 +247,7 @@ static void test_ctx_restore_invalid(int configfs_device_fd, const char *type)
* These only test if command parsing is correct,
* so just make sure there's no device bound
*/
- igt_audio_driver_unload(NULL);
+ igt_audio_driver_unload(&snd_driver);
igt_kmod_unbind("xe", bus_addr);
for (size_t i = 0; i < ARRAY_SIZE(values); i++) {
@@ -325,7 +332,7 @@ static void test_ctx_restore(int configfs_device_fd, const char *type,
for (size_t i = 0; i < ARRAY_SIZE(values); i++) {
const struct value *v = &values[i];
- igt_audio_driver_unload(NULL);
+ igt_audio_driver_unload(&snd_driver);
igt_kmod_unbind("xe", bus_addr);
for (int j = 0, off = 0; v->in[j]; j++)
--
2.50.1
next prev parent reply other threads:[~2026-10-15 14:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 14:00 [PATCH i-g-t 1/3] tests/intel/xe_fault_injection: Reload audio driver on exit Chaitanya Kumar Borah
2026-10-15 14:00 ` Chaitanya Kumar Borah [this message]
2026-10-15 14:00 ` [PATCH i-g-t 3/3] tests/intel/xe_survivability: " Chaitanya Kumar Borah
2026-10-23 5:01 ` Bhadane, Dnyaneshwar
2026-10-23 5:28 ` Bhadane, Dnyaneshwar
2026-10-27 10:55 ` Borah, Chaitanya Kumar
2026-10-28 8:13 ` Dnyaneshwar Bhadane
2026-10-28 10:14 ` Borah, Chaitanya Kumar
2026-10-15 18:37 ` ✓ i915.CI.BAT: success for series starting with [i-g-t,1/3] tests/intel/xe_fault_injection: " Patchwork
2026-10-15 20:39 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-10-16 1:56 ` ✗ i915.CI.Full: " Patchwork
2026-10-16 6:03 ` ✓ Xe.CI.FULL: success " Patchwork
2026-10-21 7:43 ` ✓ Xe.CI.BAT: success for series starting with [i-g-t,1/3] tests/intel/xe_fault_injection: Reload audio driver on exit (rev2) Patchwork
2026-10-21 8:03 ` ✓ i915.CI.BAT: " Patchwork
2026-10-21 10:40 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-10-21 11:37 ` ✗ i915.CI.Full: " Patchwork
2026-10-23 6:13 ` [PATCH i-g-t 1/3] tests/intel/xe_fault_injection: Reload audio driver on exit Samala, Pranay
2026-10-27 9:07 ` Borah, Chaitanya Kumar
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=20261015140035.2686997-2-chaitanya.kumar.borah@intel.com \
--to=chaitanya.kumar.borah@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jeevan.b@intel.com \
--cc=michal.grzelak@intel.com \
--cc=riana.tauro@intel.com \
--cc=swati2.sharma@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