Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org,
	Jonathan Cavitt <jonathan.cavitt@intel.com>,
	Petri Latvala <petri.latvala@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t v5 3/9] lib/igt_kmod: improve audio unbind logic
Date: Wed, 18 May 2022 11:56:08 +0200	[thread overview]
Message-ID: <YoTCuJXQv28HQ8r5@intel.intel> (raw)
In-Reply-To: <20220517124447.211014-4-mauro.chehab@linux.intel.com>

Hi Mauro,

On Tue, May 17, 2022 at 02:44:41PM +0200, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab@kernel.org>
> 
> The dependencies between audio and DRM drivers are not trivial.
> 
> On several CPUs, the logic inside snd-hda-intel, for instance, tries to
> hook into i915 driver, via drm_audio_component logic. That also happens
> when there's no runtime PM.
> 
> When the audio driver is bound into i915, removing or unbinding i915
> without first removing the audio driver produce Kernel errors.
> 
> So, the audio driver(s) should be removed first, and this can only
> happen after pulseaudio, pipewire-pulse, audioctl and any other
> userspace program stops using it.
> 
> This is more prune to failures. So, the best is to only try to stop
> the audio driver when it is known to have dependencies on the video
> driver.
> 
> Before an upcoming Kernel patch, there's no way to detect if the
> audio driver required a DRM one. So, the safest way is to always
> remove the audio drivers that are known to cause issues.
> 
> After the new Kernel, the logic can be more selective, only removing
> the audio driver if /proc/modules shows dependencies with the DRM
> driver.
> 
> Reviewed-by Jonathan Cavitt <jonathan.cavitt@intel.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

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

Andi

  reply	other threads:[~2022-05-18  9:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17 12:44 [igt-dev] [PATCH i-g-t v5 0/9] Add support to collecr code coverage data Mauro Carvalho Chehab
2022-05-17 12:44 ` [igt-dev] [PATCH i-g-t v5 1/9] tests/core_hotunplug: properly finish processes using audio devices Mauro Carvalho Chehab
2022-05-17 12:44 ` [igt-dev] [PATCH i-g-t v5 2/9] lib/igt_kmod: always fill who when unloading audio driver Mauro Carvalho Chehab
2022-05-17 12:44 ` [igt-dev] [PATCH i-g-t v5 3/9] lib/igt_kmod: improve audio unbind logic Mauro Carvalho Chehab
2022-05-18  9:56   ` Andi Shyti [this message]
2022-05-17 12:44 ` [igt-dev] [PATCH i-g-t v5 4/9] lib/igt_kmod: don't leak who from module unload routines Mauro Carvalho Chehab
2022-05-17 15:10   ` Andi Shyti
2022-05-17 12:44 ` [igt-dev] [PATCH i-g-t v5 5/9] core_hotunplug: fix audio unbind logic Mauro Carvalho Chehab
2022-05-17 12:44 ` [igt-dev] [PATCH i-g-t v5 6/9] lib/igt_kmod: make it less pedantic with audio driver removal Mauro Carvalho Chehab
2022-05-17 12:44 ` [igt-dev] [PATCH i-g-t v5 7/9] lib/igt_core: export kill_children() function Mauro Carvalho Chehab
2022-05-17 12:44 ` [igt-dev] [PATCH i-g-t v5 8/9] lib/igt_kmod: properly handle pipewire-pulse Mauro Carvalho Chehab
2022-05-17 12:44 ` [igt-dev] [PATCH i-g-t v5 9/9] lib/igt_aux: get rid of passing pipewire-pulse pid on functions Mauro Carvalho Chehab
2022-05-17 14:08 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add support to collecr code coverage data (rev3) 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=YoTCuJXQv28HQ8r5@intel.intel \
    --to=andi.shyti@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --cc=mauro.chehab@linux.intel.com \
    --cc=petri.latvala@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