diff options
author | Kai Vehmanen <kai.vehmanen@linux.intel.com> | 2022-04-14 12:45:33 -0700 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2022-04-14 21:26:12 -0700 |
commit | 205a47d8f70e659df620573ce409d228c5762d11 (patch) | |
tree | e106b2e7086662f0aedbf638976b4e403c7d4d73 /tests/core_hotunplug.c | |
parent | ea0144ed6ccb66b977f204b4d53b6062ed1cc8bc (diff) |
tests/core_hotunplug: apply audio unload for all i915 hw
The HDA audio driver does not support dynamic hotplug of a HDA codec and
that applies also to the display HDA codec.
To test unbind of i915, audio driver must be first unbound and/or
unloaded. This is the only way to ensure clean unbind, and possibility
to cleanly reestablish connection between audio and i915.
Without this fix, the core_hotunplug test only works if the audio
controller is runtime suspended when the test is run. This is very
brittle and subject to timing races, differences in system configuration
and so forth. A more predictable test is to explicitly unload the audio
and in case some entity is using the audio driver, this is flagged with
a clear, easily understandable error.
References: https://gitlab.freedesktop.org/drm/intel/-/issues/1602
Cc: Uma Shankar <uma.shankar@intel.com>
Cc: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Diffstat (limited to 'tests/core_hotunplug.c')
-rw-r--r-- | tests/core_hotunplug.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index 2f2fb7ac..02eae19e 100644 --- a/tests/core_hotunplug.c +++ b/tests/core_hotunplug.c @@ -621,13 +621,12 @@ igt_main igt_skip_on_f(fd_drm < 0, "No known DRM device found\n"); if (is_i915_device(fd_drm)) { - uint32_t devid = intel_get_drm_devid(fd_drm); - - if ((IS_HASWELL(devid) || IS_BROADWELL(devid) || - IS_DG1(devid)) && (igt_kmod_is_loaded("snd_hda_intel"))) { - igt_debug("Enable WA to unload snd driver\n"); - priv.snd_unload = true; - } + /* + * Audio driver does not support hot unplug via DRM + * audio component framework, so driver must be unloaded + * explicitly for i915 unbind tests. + */ + priv.snd_unload = true; gem_quiescent_gpu(fd_drm); igt_require_gem(fd_drm); |