* [i-g-t PATCH] tests: do snd_hda_intel unbind before unload in module reload test
@ 2016-10-31 8:39 Jani Nikula
2016-10-31 8:43 ` [i-g-t PATCH] tests: add more debugs on failure to unload snd_hda_intel Jani Nikula
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Jani Nikula @ 2016-10-31 8:39 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula, Keqiao Zhang
Try to make sure the snd_hda_intel module is not in use, and can be
unloaded.
Cc: Keqiao Zhang <keqiao.zhang@intel.com>
Cc: Libin Yang <libin.yang@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
Keqiao, Libin, here's the script this patch is against:
https://cgit.freedesktop.org/drm/igt-gpu-tools/tree/tests/drv_module_reload_basic
---
tests/drv_module_reload_basic | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic
index b8cad88133e9..c0676fc65db0 100755
--- a/tests/drv_module_reload_basic
+++ b/tests/drv_module_reload_basic
@@ -33,6 +33,9 @@ function reload() {
pkill alsactl
snd_hda_intel_unloaded=0
if mod_loaded snd_hda_intel; then
+ if [ -e /sys/bus/pci/drivers/snd_hda_intel/unbind ]; then
+ echo "0000:00:03.0" > /sys/bus/pci/drivers/snd_hda_intel/unbind
+ fi
if rmmod snd_hda_intel; then
snd_hda_intel_unloaded=1
else
--
2.1.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread* [i-g-t PATCH] tests: add more debugs on failure to unload snd_hda_intel 2016-10-31 8:39 [i-g-t PATCH] tests: do snd_hda_intel unbind before unload in module reload test Jani Nikula @ 2016-10-31 8:43 ` Jani Nikula 2016-10-31 8:51 ` [i-g-t PATCH] tests: do snd_hda_intel unbind before unload in module reload test Yang, Libin 2016-10-31 11:00 ` [i-g-t PATCH v2] " Jani Nikula 2 siblings, 0 replies; 7+ messages in thread From: Jani Nikula @ 2016-10-31 8:43 UTC (permalink / raw) To: Jani Nikula, intel-gfx; +Cc: Keqiao Zhang List open files under sound devices. Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- tests/drv_module_reload_basic | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic index c0676fc65db0..bbe11f7fe5bd 100755 --- a/tests/drv_module_reload_basic +++ b/tests/drv_module_reload_basic @@ -40,6 +40,7 @@ function reload() { snd_hda_intel_unloaded=1 else lsmod >&2 + lsof /dev/snd/* >&2 fi fi -- 2.1.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [i-g-t PATCH] tests: do snd_hda_intel unbind before unload in module reload test 2016-10-31 8:39 [i-g-t PATCH] tests: do snd_hda_intel unbind before unload in module reload test Jani Nikula 2016-10-31 8:43 ` [i-g-t PATCH] tests: add more debugs on failure to unload snd_hda_intel Jani Nikula @ 2016-10-31 8:51 ` Yang, Libin 2016-10-31 9:05 ` Jani Nikula 2016-10-31 11:00 ` [i-g-t PATCH v2] " Jani Nikula 2 siblings, 1 reply; 7+ messages in thread From: Yang, Libin @ 2016-10-31 8:51 UTC (permalink / raw) To: Nikula, Jani, intel-gfx@lists.freedesktop.org; +Cc: Zhang, Keqiao > -----Original Message----- > From: Nikula, Jani > Sent: Monday, October 31, 2016 4:40 PM > To: intel-gfx@lists.freedesktop.org > Cc: Nikula, Jani <jani.nikula@intel.com>; Zhang, Keqiao > <keqiao.zhang@intel.com>; Yang, Libin <libin.yang@intel.com> > Subject: [i-g-t PATCH] tests: do snd_hda_intel unbind before unload in > module reload test > > Try to make sure the snd_hda_intel module is not in use, and can be > unloaded. > > Cc: Keqiao Zhang <keqiao.zhang@intel.com> > Cc: Libin Yang <libin.yang@intel.com> > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > > --- > > Keqiao, Libin, here's the script this patch is against: > > https://cgit.freedesktop.org/drm/igt-gpu- > tools/tree/tests/drv_module_reload_basic > --- > tests/drv_module_reload_basic | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic > index b8cad88133e9..c0676fc65db0 100755 > --- a/tests/drv_module_reload_basic > +++ b/tests/drv_module_reload_basic > @@ -33,6 +33,9 @@ function reload() { > pkill alsactl > snd_hda_intel_unloaded=0 > if mod_loaded snd_hda_intel; then > + if [ -e /sys/bus/pci/drivers/snd_hda_intel/unbind ]; then > + echo "0000:00:03.0" > "0000:00:03.0" is platform related. We should check lspci -vvv |grep Audio to get the number. Or we can check /sys/bus/pci/drivers/snd_hda_intel/ folder to get the number. And sometimes there are 2 sound cards to unbind. Regards, Libin > /sys/bus/pci/drivers/snd_hda_intel/unbind > + fi > if rmmod snd_hda_intel; then > snd_hda_intel_unloaded=1 > else > -- > 2.1.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [i-g-t PATCH] tests: do snd_hda_intel unbind before unload in module reload test 2016-10-31 8:51 ` [i-g-t PATCH] tests: do snd_hda_intel unbind before unload in module reload test Yang, Libin @ 2016-10-31 9:05 ` Jani Nikula 0 siblings, 0 replies; 7+ messages in thread From: Jani Nikula @ 2016-10-31 9:05 UTC (permalink / raw) To: Yang, Libin, intel-gfx@lists.freedesktop.org; +Cc: Zhang, Keqiao On Mon, 31 Oct 2016, "Yang, Libin" <libin.yang@intel.com> wrote: >> -----Original Message----- >> From: Nikula, Jani >> Sent: Monday, October 31, 2016 4:40 PM >> To: intel-gfx@lists.freedesktop.org >> Cc: Nikula, Jani <jani.nikula@intel.com>; Zhang, Keqiao >> <keqiao.zhang@intel.com>; Yang, Libin <libin.yang@intel.com> >> Subject: [i-g-t PATCH] tests: do snd_hda_intel unbind before unload in >> module reload test >> >> Try to make sure the snd_hda_intel module is not in use, and can be >> unloaded. >> >> Cc: Keqiao Zhang <keqiao.zhang@intel.com> >> Cc: Libin Yang <libin.yang@intel.com> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com> >> >> --- >> >> Keqiao, Libin, here's the script this patch is against: >> >> https://cgit.freedesktop.org/drm/igt-gpu- >> tools/tree/tests/drv_module_reload_basic >> --- >> tests/drv_module_reload_basic | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic >> index b8cad88133e9..c0676fc65db0 100755 >> --- a/tests/drv_module_reload_basic >> +++ b/tests/drv_module_reload_basic >> @@ -33,6 +33,9 @@ function reload() { >> pkill alsactl >> snd_hda_intel_unloaded=0 >> if mod_loaded snd_hda_intel; then >> + if [ -e /sys/bus/pci/drivers/snd_hda_intel/unbind ]; then >> + echo "0000:00:03.0" > > > "0000:00:03.0" is platform related. > We should check lspci -vvv |grep Audio to get the number. > Or we can check /sys/bus/pci/drivers/snd_hda_intel/ folder to get the number. > And sometimes there are 2 sound cards to unbind. How about this? for f in $(find /sys/bus/pci/drivers/snd_hda_intel -name "0000:*" -printf %f); do echo $f > /sys/bus/pci/drivers/snd_hda_intel/unbind done BR, Jani. > > Regards, > Libin > >> /sys/bus/pci/drivers/snd_hda_intel/unbind >> + fi >> if rmmod snd_hda_intel; then >> snd_hda_intel_unloaded=1 >> else >> -- >> 2.1.4 > -- Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* [i-g-t PATCH v2] tests: do snd_hda_intel unbind before unload in module reload test 2016-10-31 8:39 [i-g-t PATCH] tests: do snd_hda_intel unbind before unload in module reload test Jani Nikula 2016-10-31 8:43 ` [i-g-t PATCH] tests: add more debugs on failure to unload snd_hda_intel Jani Nikula 2016-10-31 8:51 ` [i-g-t PATCH] tests: do snd_hda_intel unbind before unload in module reload test Yang, Libin @ 2016-10-31 11:00 ` Jani Nikula 2016-11-01 1:45 ` Yang, Libin 2 siblings, 1 reply; 7+ messages in thread From: Jani Nikula @ 2016-10-31 11:00 UTC (permalink / raw) To: Jani Nikula, intel-gfx; +Cc: Keqiao Zhang Try to make sure the snd_hda_intel module is not in use, and can be unloaded. v2: unbind all cards (Libin) Cc: Keqiao Zhang <keqiao.zhang@intel.com> Cc: Libin Yang <libin.yang@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- Keqiao, Libin, here's the script this patch is against: https://cgit.freedesktop.org/drm/igt-gpu-tools/tree/tests/drv_module_reload_basic --- tests/drv_module_reload_basic | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic index b8cad88133e9..105852a56b46 100755 --- a/tests/drv_module_reload_basic +++ b/tests/drv_module_reload_basic @@ -33,6 +33,11 @@ function reload() { pkill alsactl snd_hda_intel_unloaded=0 if mod_loaded snd_hda_intel; then + # unbind sound cards + for card in $(find /sys/bus/pci/drivers/snd_hda_intel -name "0000:*" -printf "%f\n"); do + echo $card > /sys/bus/pci/drivers/snd_hda_intel/unbind + done + if rmmod snd_hda_intel; then snd_hda_intel_unloaded=1 else -- 2.1.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [i-g-t PATCH v2] tests: do snd_hda_intel unbind before unload in module reload test 2016-10-31 11:00 ` [i-g-t PATCH v2] " Jani Nikula @ 2016-11-01 1:45 ` Yang, Libin 2016-11-01 6:15 ` Jani Nikula 0 siblings, 1 reply; 7+ messages in thread From: Yang, Libin @ 2016-11-01 1:45 UTC (permalink / raw) To: Nikula, Jani, intel-gfx@lists.freedesktop.org; +Cc: Zhang, Keqiao Reviewed-by: Libin Yang <libin.yang@intel.com> Regards, Libin > -----Original Message----- > From: Nikula, Jani > Sent: Monday, October 31, 2016 7:00 PM > To: Nikula, Jani <jani.nikula@intel.com>; intel-gfx@lists.freedesktop.org > Cc: Zhang, Keqiao <keqiao.zhang@intel.com>; Yang, Libin > <libin.yang@intel.com> > Subject: [i-g-t PATCH v2] tests: do snd_hda_intel unbind before unload in > module reload test > > Try to make sure the snd_hda_intel module is not in use, and can be > unloaded. > > v2: unbind all cards (Libin) > > Cc: Keqiao Zhang <keqiao.zhang@intel.com> > Cc: Libin Yang <libin.yang@intel.com> > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > > --- > > Keqiao, Libin, here's the script this patch is against: > > https://cgit.freedesktop.org/drm/igt-gpu- > tools/tree/tests/drv_module_reload_basic > --- > tests/drv_module_reload_basic | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic > index b8cad88133e9..105852a56b46 100755 > --- a/tests/drv_module_reload_basic > +++ b/tests/drv_module_reload_basic > @@ -33,6 +33,11 @@ function reload() { > pkill alsactl > snd_hda_intel_unloaded=0 > if mod_loaded snd_hda_intel; then > + # unbind sound cards > + for card in $(find /sys/bus/pci/drivers/snd_hda_intel -name > "0000:*" -printf "%f\n"); do > + echo $card > > /sys/bus/pci/drivers/snd_hda_intel/unbind > + done > + > if rmmod snd_hda_intel; then > snd_hda_intel_unloaded=1 > else > -- > 2.1.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [i-g-t PATCH v2] tests: do snd_hda_intel unbind before unload in module reload test 2016-11-01 1:45 ` Yang, Libin @ 2016-11-01 6:15 ` Jani Nikula 0 siblings, 0 replies; 7+ messages in thread From: Jani Nikula @ 2016-11-01 6:15 UTC (permalink / raw) To: Yang, Libin, intel-gfx@lists.freedesktop.org; +Cc: Zhang, Keqiao On Tue, 01 Nov 2016, "Yang, Libin" <libin.yang@intel.com> wrote: > Reviewed-by: Libin Yang <libin.yang@intel.com> Pushed both patches to igt, thanks for the review. BR, Jani. > > Regards, > Libin > > >> -----Original Message----- >> From: Nikula, Jani >> Sent: Monday, October 31, 2016 7:00 PM >> To: Nikula, Jani <jani.nikula@intel.com>; intel-gfx@lists.freedesktop.org >> Cc: Zhang, Keqiao <keqiao.zhang@intel.com>; Yang, Libin >> <libin.yang@intel.com> >> Subject: [i-g-t PATCH v2] tests: do snd_hda_intel unbind before unload in >> module reload test >> >> Try to make sure the snd_hda_intel module is not in use, and can be >> unloaded. >> >> v2: unbind all cards (Libin) >> >> Cc: Keqiao Zhang <keqiao.zhang@intel.com> >> Cc: Libin Yang <libin.yang@intel.com> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com> >> >> --- >> >> Keqiao, Libin, here's the script this patch is against: >> >> https://cgit.freedesktop.org/drm/igt-gpu- >> tools/tree/tests/drv_module_reload_basic >> --- >> tests/drv_module_reload_basic | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic >> index b8cad88133e9..105852a56b46 100755 >> --- a/tests/drv_module_reload_basic >> +++ b/tests/drv_module_reload_basic >> @@ -33,6 +33,11 @@ function reload() { >> pkill alsactl >> snd_hda_intel_unloaded=0 >> if mod_loaded snd_hda_intel; then >> + # unbind sound cards >> + for card in $(find /sys/bus/pci/drivers/snd_hda_intel -name >> "0000:*" -printf "%f\n"); do >> + echo $card > >> /sys/bus/pci/drivers/snd_hda_intel/unbind >> + done >> + >> if rmmod snd_hda_intel; then >> snd_hda_intel_unloaded=1 >> else >> -- >> 2.1.4 > -- Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-11-01 6:15 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-10-31 8:39 [i-g-t PATCH] tests: do snd_hda_intel unbind before unload in module reload test Jani Nikula 2016-10-31 8:43 ` [i-g-t PATCH] tests: add more debugs on failure to unload snd_hda_intel Jani Nikula 2016-10-31 8:51 ` [i-g-t PATCH] tests: do snd_hda_intel unbind before unload in module reload test Yang, Libin 2016-10-31 9:05 ` Jani Nikula 2016-10-31 11:00 ` [i-g-t PATCH v2] " Jani Nikula 2016-11-01 1:45 ` Yang, Libin 2016-11-01 6:15 ` Jani Nikula
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).