Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [igt-dev] [PATCH i-g-t] tests/device_reset: Work around for driver unbind issue with audio
  2020-09-14 12:48 [igt-dev] [PATCH i-g-t] tests/device_reset: Work around for driver unbind issue with audio Uma Shankar
@ 2020-09-14 12:26 ` Janusz Krzysztofik
  2020-09-14 12:51   ` Shankar, Uma
  0 siblings, 1 reply; 8+ messages in thread
From: Janusz Krzysztofik @ 2020-09-14 12:26 UTC (permalink / raw)
  To: Uma Shankar, igt-dev; +Cc: marcin.bernatowicz

Hi Uma,

On Mon, 2020-09-14 at 18:18 +0530, Uma Shankar wrote:
> 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.
> 
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
> ---

Even if the code looks the same as in my patch against core_hotunplug,
this is a separate submission so I think you can drop drop my S-o-b, or
replace it with a Suggested-by:, then add my

Reviewed-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>

Thanks,
Janusz



>  tests/device_reset.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> 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);

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [igt-dev] [PATCH i-g-t] tests/device_reset: Work around for driver unbind issue with audio
@ 2020-09-14 12:48 Uma Shankar
  2020-09-14 12:26 ` Janusz Krzysztofik
  0 siblings, 1 reply; 8+ messages in thread
From: Uma Shankar @ 2020-09-14 12:48 UTC (permalink / raw)
  To: igt-dev; +Cc: marcin.bernatowicz

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.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
---
 tests/device_reset.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

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);
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/device_reset: Work around for driver unbind issue with audio
  2020-09-14 12:26 ` Janusz Krzysztofik
@ 2020-09-14 12:51   ` Shankar, Uma
  0 siblings, 0 replies; 8+ messages in thread
From: Shankar, Uma @ 2020-09-14 12:51 UTC (permalink / raw)
  To: Janusz Krzysztofik, igt-dev@lists.freedesktop.org; +Cc: Bernatowicz, Marcin



> -----Original Message-----
> From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
> Sent: Monday, September 14, 2020 5:56 PM
> To: Shankar, Uma <uma.shankar@intel.com>; igt-dev@lists.freedesktop.org
> Cc: Bernatowicz, Marcin <marcin.bernatowicz@intel.com>; Deak, Imre
> <imre.deak@intel.com>
> Subject: Re: [PATCH i-g-t] tests/device_reset: Work around for driver unbind
> issue with audio
> 
> Hi Uma,
> 
> On Mon, 2020-09-14 at 18:18 +0530, Uma Shankar wrote:
> > 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.
> >
> > Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> > Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
> > ---
> 
> Even if the code looks the same as in my patch against core_hotunplug, this is a
> separate submission so I think you can drop drop my S-o-b, or replace it with a
> Suggested-by:, then add my
> 

Sure Janusz, will do the needful. Thanks for the pointers.

Regards,
Uma Shankar

> Reviewed-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>

> Thanks,
> Janusz
> 
> 
> 
> >  tests/device_reset.c | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> >
> > 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);

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [igt-dev] [PATCH i-g-t] tests/device_reset: Work around for driver unbind issue with audio
@ 2020-09-14 13:36 Uma Shankar
  2020-09-14 19:19 ` Janusz Krzysztofik
  0 siblings, 1 reply; 8+ messages in thread
From: Uma Shankar @ 2020-09-14 13:36 UTC (permalink / raw)
  To: igt-dev; +Cc: marcin.bernatowicz

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>
---
 tests/device_reset.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

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);
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/device_reset: Work around for driver unbind issue with audio
  2020-09-14 13:36 Uma Shankar
@ 2020-09-14 19:19 ` Janusz Krzysztofik
  2020-09-14 20:47   ` Vudum, Lakshminarayana
  0 siblings, 1 reply; 8+ messages in thread
From: Janusz Krzysztofik @ 2020-09-14 19:19 UTC (permalink / raw)
  To: Uma Shankar, igt-dev; +Cc: marcin.bernatowicz, Lakshminarayana Vudum

On Mon, 2020-09-14 at 19:06 +0530, Uma Shankar wrote:
> 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>

Pushed.

@Lakshmi, since kernel WARN has been replaced with an IGT warning but
the issue remains the same, please update the filter of the bug.

Thanks,
Janusz

> ---
>  tests/device_reset.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> 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);

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/device_reset: Work around for driver unbind issue with audio
  2020-09-14 19:19 ` Janusz Krzysztofik
@ 2020-09-14 20:47   ` Vudum, Lakshminarayana
  2020-09-15  6:18     ` Janusz Krzysztofik
  0 siblings, 1 reply; 8+ messages in thread
From: Vudum, Lakshminarayana @ 2020-09-14 20:47 UTC (permalink / raw)
  To: Janusz Krzysztofik, Shankar, Uma, igt-dev@lists.freedesktop.org
  Cc: Bernatowicz, Marcin

@Janusz Krzysztofik Can you share the link to the failure that contains IGT warning? 

Thanks,
Lakshmi.
-----Original Message-----
From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> 
Sent: Monday, September 14, 2020 12:19 PM
To: Shankar, Uma <uma.shankar@intel.com>; igt-dev@lists.freedesktop.org
Cc: Bernatowicz, Marcin <marcin.bernatowicz@intel.com>; Deak, Imre <imre.deak@intel.com>; Vudum, Lakshminarayana <lakshminarayana.vudum@intel.com>
Subject: Re: [PATCH i-g-t] tests/device_reset: Work around for driver unbind issue with audio

On Mon, 2020-09-14 at 19:06 +0530, Uma Shankar wrote:
> 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>

Pushed.

@Lakshmi, since kernel WARN has been replaced with an IGT warning but the issue remains the same, please update the filter of the bug.

Thanks,
Janusz

> ---
>  tests/device_reset.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> 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);

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/device_reset: Work around for driver unbind issue with audio
  2020-09-14 20:47   ` Vudum, Lakshminarayana
@ 2020-09-15  6:18     ` Janusz Krzysztofik
  2020-09-15  6:29       ` Janusz Krzysztofik
  0 siblings, 1 reply; 8+ messages in thread
From: Janusz Krzysztofik @ 2020-09-15  6:18 UTC (permalink / raw)
  To: Vudum, Lakshminarayana, Shankar, Uma,
	igt-dev@lists.freedesktop.org
  Cc: Bernatowicz, Marcin

Hi Lakshmi,

On Mon, 2020-09-14 at 20:47 +0000, Vudum, Lakshminarayana wrote:
> @Janusz Krzysztofik Can you share the link to the failure that contains IGT warning?

Here it is:
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9008/shard-hsw4/igt@device_reset@unbind-reset-rebind.html

and before the change for reference:
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5783/shard-hsw8/igt@device_reset@unbind-reset-rebind.html

Thanks,
Janusz

>  
> 
> Thanks,
> Lakshmi.
> -----Original Message-----
> From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> 
> Sent: Monday, September 14, 2020 12:19 PM
> To: Shankar, Uma <uma.shankar@intel.com>; igt-dev@lists.freedesktop.org
> Cc: Bernatowicz, Marcin <marcin.bernatowicz@intel.com>; Deak, Imre <imre.deak@intel.com>; Vudum, Lakshminarayana <lakshminarayana.vudum@intel.com>
> Subject: Re: [PATCH i-g-t] tests/device_reset: Work around for driver unbind issue with audio
> 
> On Mon, 2020-09-14 at 19:06 +0530, Uma Shankar wrote:
> > 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>
> 
> Pushed.
> 
> @Lakshmi, since kernel WARN has been replaced with an IGT warning but the issue remains the same, please update the filter of the bug.
> 
> Thanks,
> Janusz
> 
> > ---
> >  tests/device_reset.c | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> > 
> > 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);

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/device_reset: Work around for driver unbind issue with audio
  2020-09-15  6:18     ` Janusz Krzysztofik
@ 2020-09-15  6:29       ` Janusz Krzysztofik
  0 siblings, 0 replies; 8+ messages in thread
From: Janusz Krzysztofik @ 2020-09-15  6:29 UTC (permalink / raw)
  To: Vudum, Lakshminarayana, Shankar, Uma,
	igt-dev@lists.freedesktop.org
  Cc: Bernatowicz, Marcin

On Tue, 2020-09-15 at 08:18 +0200, Janusz Krzysztofik wrote:
> Hi Lakshmi,
> 
> On Mon, 2020-09-14 at 20:47 +0000, Vudum, Lakshminarayana wrote:
> > @Janusz Krzysztofik Can you share the link to the failure that contains IGT warning?
> 
> Here it is:
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9008/shard-hsw4/igt@device_reset@unbind-reset-rebind.html

The same issue triggered by core_hotunplug@*bind*:
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9008/fi-bdw-5557u/igt@core_hotunplug@unbind-rebind.html

Thanks,
Janusz
> 
> and before the change for reference:
> https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5783/shard-hsw8/igt@device_reset@unbind-reset-rebind.html
> 
> Thanks,
> Janusz
> 
> >  
> > 
> > Thanks,
> > Lakshmi.
> > -----Original Message-----
> > From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> 
> > Sent: Monday, September 14, 2020 12:19 PM
> > To: Shankar, Uma <uma.shankar@intel.com>; igt-dev@lists.freedesktop.org
> > Cc: Bernatowicz, Marcin <marcin.bernatowicz@intel.com>; Deak, Imre <imre.deak@intel.com>; Vudum, Lakshminarayana <lakshminarayana.vudum@intel.com>
> > Subject: Re: [PATCH i-g-t] tests/device_reset: Work around for driver unbind issue with audio
> > 
> > On Mon, 2020-09-14 at 19:06 +0530, Uma Shankar wrote:
> > > 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>
> > 
> > Pushed.
> > 
> > @Lakshmi, since kernel WARN has been replaced with an IGT warning but the issue remains the same, please update the filter of the bug.
> > 
> > Thanks,
> > Janusz
> > 
> > > ---
> > >  tests/device_reset.c | 11 +++++++++++
> > >  1 file changed, 11 insertions(+)
> > > 
> > > 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);

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-09-15  6:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-14 12:48 [igt-dev] [PATCH i-g-t] tests/device_reset: Work around for driver unbind issue with audio Uma Shankar
2020-09-14 12:26 ` Janusz Krzysztofik
2020-09-14 12:51   ` Shankar, Uma
  -- strict thread matches above, loose matches on Subject: below --
2020-09-14 13:36 Uma Shankar
2020-09-14 19:19 ` Janusz Krzysztofik
2020-09-14 20:47   ` Vudum, Lakshminarayana
2020-09-15  6:18     ` Janusz Krzysztofik
2020-09-15  6:29       ` Janusz Krzysztofik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox