summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorUma Shankar <uma.shankar@intel.com>2020-09-14 19:06:52 +0530
committerJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>2020-09-14 21:12:48 +0200
commit265f1d4a5a14998b98f963ee04d695cf3f3c2d3a (patch)
treebc817a10034715d94fea64f0c7eeb9108b0e7c9e /tests
parente271e0778be8204bba5e87b5be425be8454e3445 (diff)
tests/device_reset: Work around for driver unbind issue with audio
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. Suggested-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Signed-off-by: Uma Shankar <uma.shankar@intel.com> Reviewed-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/device_reset.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/device_reset.c b/tests/device_reset.c
index b1181b3b..9cb59ee4 100644
--- a/tests/device_reset.c
+++ b/tests/device_reset.c
@@ -232,9 +232,20 @@ static void set_device_filter(const char* dev_path)
static void unbind_reset_rebind(struct device_fds *dev)
{
+ uint32_t devid = intel_get_drm_devid(dev->fds.dev);
igt_debug("close the device\n");
close_if_opened(&dev->fds.dev);
+ /**
+ * FIXME: Unbinding the i915 driver on some 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((bool) IS_HASWELL(devid) || IS_BROADWELL(devid),
+ "Manually enabling audio PM to work around a kernel WARN\n"))
+ igt_pm_enable_audio_runtime_pm();
+
driver_unbind(dev);
initiate_device_reset(dev);