Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@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 5/6] lib/igt_kmod: make it less pedantic with audio driver removal
Date: Thu, 5 May 2022 19:57:48 +0200	[thread overview]
Message-ID: <YnQQHG91EMbmhxWq@intel.intel> (raw)
In-Reply-To: <20220504095904.2145592-6-mauro.chehab@linux.intel.com>

Hi Mauro,

> Current Linux Kernel don't report if the audio driver binds
> into the DRM driver. As this is CPU specific, allow audio
> driver unload fail without skipping the IGT tests on legacy
> Kernels, as this may not be mandatory.
> 
> On new kernels where lsmod will properly display de dependency

/de/the/

> between the audio and DRM drivers, skip the core hotunplug
> test if it fails to unload the audio driver, as this is is

/is//

[...]

>  int igt_audio_driver_unload(const char **who)
>  {
> +	const char *drm_driver = "i915";
>  	unsigned int num_mod, i, j;
>  	struct module_ref *mod;
>  	int pos = -1;
> @@ -572,7 +588,7 @@ int igt_audio_driver_unload(const char **who)
>  	mod = read_module_dependencies(&num_mod);
>  
>  	for (i = 0; i < num_mod; i++) {
> -		if (!strcmp(mod[i].name, "i915")) {
> +		if (!strcmp(mod[i].name, drm_driver)) {
>  			break;
>  		}
>  	}
> @@ -580,14 +596,15 @@ int igt_audio_driver_unload(const char **who)
>  	if (i == num_mod)
>  		return 0;
>  
> -	/* Recursively remove all drivers that depend on i915 */
> +	/* Recursively remove all drivers that depend on the drm driver */
>  	for (j = 0; j < mod[i].num_required; j++) {
>  		pos = mod[i].required_by[j];
>  		if (who)
>  			*who = strdup(mod[pos].name);
>  		/*
> -		 * If a sound driver depends on i915, kill audio processes
> -		 * first, in order to make it possible to unload the driver
> +		 * If a sound driver depends on the drm driver, kill audio
> +		 * processes first, in order to make it possible to unload
> +		 * the driver.

Why isn't i915 --> drm_driver done in patch 3?

[...]

Looks good, though,

Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>

Andi

  reply	other threads:[~2022-05-05 17:58 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
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 [this message]
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=YnQQHG91EMbmhxWq@intel.intel \
    --to=andi.shyti@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