From: Andi Shyti <andi.shyti@linux.intel.com>
To: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org,
Ch Sai Gowtham <sai.gowtham.ch@intel.com>,
Petri Latvala <petri.latvala@intel.com>,
Andrzej Hajda <andrzej.hajda@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t v2 2/6] lib/igt_kmod: always fill who when unloading audio driver
Date: Thu, 5 May 2022 17:57:20 +0200 [thread overview]
Message-ID: <YnPz4C84UZ1kWUKD@intel.intel> (raw)
In-Reply-To: <20220504095904.2145592-3-mauro.chehab@linux.intel.com>
Hi Mauro,
On Wed, May 04, 2022 at 11:59:00AM +0200, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab@kernel.org>
>
> As we'll use this information at core_hotunplug to announce
> when an audio module is unloaded, fill it even if return code
> is zero.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> ---
> lib/igt_aux.c | 2 +-
> lib/igt_kmod.c | 7 +++----
> 2 files changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> index 4f1d88ed68dd..15fe87839567 100644
> --- a/lib/igt_aux.c
> +++ b/lib/igt_aux.c
> @@ -1422,7 +1422,7 @@ static void pulseaudio_unload_module(proc_t *proc_info)
> homedir = pw->pw_dir;
> snprintf(xdg_dir, sizeof(xdg_dir), "/run/user/%d", proc_info->euid);
>
> - igt_info("Ask pulseaudio to stop using audio device\n");
> + igt_info("Request pulseaudio to stop using audio device\n");
>
> setgid(proc_info->egid);
> setuid(proc_info->euid);
> diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
> index 87a59245f699..716e03f426c9 100644
> --- a/lib/igt_kmod.c
> +++ b/lib/igt_kmod.c
> @@ -400,16 +400,15 @@ int igt_audio_driver_unload(const char **who)
>
> for (const char **m = sound; *m; m++) {
> if (igt_kmod_is_loaded(*m)) {
> + if (who)
> + *who = *m;
> if (igt_lsof_kill_audio_processes())
> return 1;
>
> kick_snd_hda_intel();
> ret = igt_kmod_unload(*m, 0);
> - if (ret) {
> - if (who)
> - *who = *m;
> + if (ret)
> return ret;
> - }
this answers one of my comments from the previous patch :)
It could have been squashed with the previous... but it doesn't
really matter:
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Thanks,
Andi
> }
> }
> return 0;
> --
> 2.35.1
next prev parent reply other threads:[~2022-05-05 15:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-04 9:58 [igt-dev] [PATCH i-g-t v2 0/6] Improve logic to work with audio dependency on DRM driver Mauro Carvalho Chehab
2022-05-04 9:58 ` [igt-dev] [PATCH i-g-t v2 1/6] tests/core_hotunplug: properly finish processes using audio devices Mauro Carvalho Chehab
2022-05-05 15:54 ` Andi Shyti
2022-05-05 17:52 ` Andi Shyti
2022-05-06 8:36 ` Mauro Carvalho Chehab
2022-05-04 9:59 ` [igt-dev] [PATCH i-g-t v2 2/6] lib/igt_kmod: always fill who when unloading audio driver Mauro Carvalho Chehab
2022-05-05 15:57 ` Andi Shyti [this message]
2022-05-04 9:59 ` [igt-dev] [PATCH i-g-t v2 3/6] lib/igt_kmod: improve audio unbind logic Mauro Carvalho Chehab
2022-05-05 16:44 ` Andi Shyti
2022-05-06 9:12 ` Mauro Carvalho Chehab
2022-05-04 9:59 ` [igt-dev] [PATCH i-g-t v2 4/6] core_hotunplug: fix " Mauro Carvalho Chehab
2022-05-05 17:22 ` Andi Shyti
2022-05-04 9:59 ` [igt-dev] [PATCH i-g-t v2 5/6] lib/igt_kmod: make it less pedantic with audio driver removal Mauro Carvalho Chehab
2022-05-05 17:57 ` Andi Shyti
2022-05-04 9:59 ` [igt-dev] [PATCH i-g-t v2 6/6] lib/igt_kmod: properly handle pipewire-pulse Mauro Carvalho Chehab
2022-05-05 18:18 ` Andi Shyti
2022-05-06 6:32 ` Mauro Carvalho Chehab
2022-05-04 11:57 ` [igt-dev] ✗ Fi.CI.BAT: failure for Improve logic to work with audio dependency on DRM driver Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YnPz4C84UZ1kWUKD@intel.intel \
--to=andi.shyti@linux.intel.com \
--cc=andrzej.hajda@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=mauro.chehab@linux.intel.com \
--cc=petri.latvala@intel.com \
--cc=sai.gowtham.ch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox