From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH igt] module_reload: remove snd_hda_intel Date: Tue, 22 Oct 2013 22:19:02 -0700 Message-ID: <20131023051902.GD851@bwidawsk.net> References: <1382363769-1785-1-git-send-email-przanoni@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.bwidawsk.net (bwidawsk.net [166.78.191.112]) by gabe.freedesktop.org (Postfix) with ESMTP id 6091DE78DC for ; Tue, 22 Oct 2013 22:19:06 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1382363769-1785-1-git-send-email-przanoni@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Paulo Zanoni Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org On Mon, Oct 21, 2013 at 11:56:09AM -0200, Paulo Zanoni wrote: > From: Paulo Zanoni > > The audio driver uses the power well provided by our driver, so on > Haswell we can't "rmmod i915" if we don't "rmmod snd_hda_intel" first. > > The problem with removing snd_hda_intel is that we also need to kill > its users. On the specific machine I tested, the only user seem to be > alsactl, but on other machines this may change. IMHO we should leave > the "kill user space" step to whoever is running the script, but > Daniel asked me to put it here so we have a better chance of Just > Working on QA's machines. > > Signed-off-by: Paulo Zanoni > --- > tests/module_reload | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/tests/module_reload b/tests/module_reload > index 3d8cb85..c1fd395 100755 > --- a/tests/module_reload > +++ b/tests/module_reload > @@ -18,6 +18,10 @@ if ! echo 0 > /sys/class/vtconsole/vtcon1/bind ; then > exit 77 > fi > > +# The sound driver uses our power well > +pkill alsactl > +rmmod snd_hda_intel &> /dev/null > + > #ignore errors in ips - gen5 only > rmmod intel_ips &> /dev/null > rmmod i915 > @@ -38,6 +42,8 @@ fi > modprobe i915 > echo 1 > /sys/class/vtconsole/vtcon1/bind > > +modprobe snd_hda_intel > + > # try to run something > $SOURCE_DIR/gem_exec_nop > /dev/null && echo "module successfully loaded again" > I don't really pretend to understand how module dependencies are calculated. However, I would think the dependency should be *somewhere* and so modprobe -r i915 should work. Don't read that as a nak. Rather, a wtf is with the existing stuff? -- Ben Widawsky, Intel Open Source Technology Center