diff options
author | Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> | 2020-08-25 10:36:19 +0200 |
---|---|---|
committer | Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> | 2020-09-14 20:51:09 +0200 |
commit | efbf6371d9cbf49ba556d4a1ba5c8cf5e5131896 (patch) | |
tree | ce73bff494ed9dfd5d9af65590ec4c4847e158fe | |
parent | fee1ccb45d3127ccb8b2a7838b811a18fae617d9 (diff) |
tests/core_hotunplug: HSW/BDW audio issue workaround
Unbinding the i915 driver on some Haswell and Broadwell platforms with
Azalia audio results in a kernel WARNING on "i915 raw-wakerefs=1
wakelocks=1 on cleanup". The issue can be worked around by manually
enabling runtime power management for the conflicting audio adapter.
Use that method but also display a warning to preserve visibility of
the issue. Also tag the workaround with a FIXME comment.
v2: Extend the scope of the workaround over Broadwell
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: MichaĆ Winiarski <michal.winiarski@intel.com>
-rw-r--r-- | tests/core_hotunplug.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index ac106d964..3e2a76ddb 100644 --- a/tests/core_hotunplug.c +++ b/tests/core_hotunplug.c @@ -484,8 +484,23 @@ 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); + gem_quiescent_gpu(fd_drm); igt_require_gem(fd_drm); + + /** + * FIXME: Unbinding the i915 driver on some Haswell + * platforms with Azalia audio results in a kernel WARN + * on "i915 raw-wakerefs=1 wakelocks=1 on cleanup". The + * below CI friendly user level workaround prevents the + * warning from appearing. Drop this hack as soon as + * this is fixed in the kernel. + */ + if (igt_warn_on_f(IS_HASWELL(devid) || + IS_BROADWELL(devid), + "Manually enabling audio PM to work around a kernel WARN\n")) + igt_pm_enable_audio_runtime_pm(); } /* Make sure subtests always reopen the same device */ |