All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"David Airlie" <airlied@linux.ie>,
	"Greg KH" <gregkh@linuxfoundation.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Kai Vehmanen" <kai.vehmanen@intel.com>,
	"Lucas De Marchi" <lucas.demarchi@intel.com>,
	"Pierre-Louis Bossart" <pierre-louis.bossart@intel.com>,
	"Takashi Iwai" <tiwai@suse.com>,
	alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-modules@vger.kernel.org, mauro.chehab@linux.intel.com,
	Takashi Iwai <tiwai@suse.de>
Subject: [PATCH v6 4/4] ALSA: hda - identify when audio is provided by a video driver
Date: Mon,  9 May 2022 18:23:39 +0200	[thread overview]
Message-ID: <f53f8a9d04b39a6843f19fe3069d1be7a9713aae.1652113087.git.mchehab@kernel.org> (raw)
In-Reply-To: <cover.1652113087.git.mchehab@kernel.org>

On some devices, the hda driver needs to hook into a video driver,
in order to be able to properly access the audio hardware and/or
the power management function.

That's the case of several snd_hda_intel devices that depends on
i915 driver.

Ensure that a proper reference between the snd-hda driver needing
such binding is shown at /proc/modules, in order to allow userspace
to know about such binding.

Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---

See [PATCH v6 0/4] at: https://lore.kernel.org/all/cover.1652113087.git.mchehab@kernel.org/

 sound/hda/hdac_component.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/hda/hdac_component.c b/sound/hda/hdac_component.c
index bb37e7e0bd79..7789873ddf47 100644
--- a/sound/hda/hdac_component.c
+++ b/sound/hda/hdac_component.c
@@ -199,7 +199,7 @@ static int hdac_component_master_bind(struct device *dev)
 	}
 
 	/* pin the module to avoid dynamic unbinding, but only if given */
-	if (!try_module_get(acomp->ops->owner)) {
+	if (!try_module_get_owner(acomp->ops->owner, dev->driver->owner)) {
 		ret = -ENODEV;
 		goto out_unbind;
 	}
-- 
2.35.3


WARNING: multiple messages have this Message-ID (diff)
From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: alsa-devel@alsa-project.org, mauro.chehab@linux.intel.com,
	David Airlie <airlied@linux.ie>,
	Greg KH <gregkh@linuxfoundation.org>,
	intel-gfx@lists.freedesktop.org,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Takashi Iwai <tiwai@suse.com>,
	dri-devel@lists.freedesktop.org, Jaroslav Kysela <perex@perex.cz>,
	Kai Vehmanen <kai.vehmanen@intel.com>,
	linux-modules@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-kernel@vger.kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Subject: [PATCH v6 4/4] ALSA: hda - identify when audio is provided by a video driver
Date: Mon,  9 May 2022 18:23:39 +0200	[thread overview]
Message-ID: <f53f8a9d04b39a6843f19fe3069d1be7a9713aae.1652113087.git.mchehab@kernel.org> (raw)
In-Reply-To: <cover.1652113087.git.mchehab@kernel.org>

On some devices, the hda driver needs to hook into a video driver,
in order to be able to properly access the audio hardware and/or
the power management function.

That's the case of several snd_hda_intel devices that depends on
i915 driver.

Ensure that a proper reference between the snd-hda driver needing
such binding is shown at /proc/modules, in order to allow userspace
to know about such binding.

Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---

See [PATCH v6 0/4] at: https://lore.kernel.org/all/cover.1652113087.git.mchehab@kernel.org/

 sound/hda/hdac_component.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/hda/hdac_component.c b/sound/hda/hdac_component.c
index bb37e7e0bd79..7789873ddf47 100644
--- a/sound/hda/hdac_component.c
+++ b/sound/hda/hdac_component.c
@@ -199,7 +199,7 @@ static int hdac_component_master_bind(struct device *dev)
 	}
 
 	/* pin the module to avoid dynamic unbinding, but only if given */
-	if (!try_module_get(acomp->ops->owner)) {
+	if (!try_module_get_owner(acomp->ops->owner, dev->driver->owner)) {
 		ret = -ENODEV;
 		goto out_unbind;
 	}
-- 
2.35.3


WARNING: multiple messages have this Message-ID (diff)
From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: alsa-devel@alsa-project.org, mauro.chehab@linux.intel.com,
	David Airlie <airlied@linux.ie>,
	Greg KH <gregkh@linuxfoundation.org>,
	intel-gfx@lists.freedesktop.org, Takashi Iwai <tiwai@suse.de>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Takashi Iwai <tiwai@suse.com>,
	dri-devel@lists.freedesktop.org, Jaroslav Kysela <perex@perex.cz>,
	Kai Vehmanen <kai.vehmanen@intel.com>,
	linux-modules@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-kernel@vger.kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Subject: [Intel-gfx] [PATCH v6 4/4] ALSA: hda - identify when audio is provided by a video driver
Date: Mon,  9 May 2022 18:23:39 +0200	[thread overview]
Message-ID: <f53f8a9d04b39a6843f19fe3069d1be7a9713aae.1652113087.git.mchehab@kernel.org> (raw)
In-Reply-To: <cover.1652113087.git.mchehab@kernel.org>

On some devices, the hda driver needs to hook into a video driver,
in order to be able to properly access the audio hardware and/or
the power management function.

That's the case of several snd_hda_intel devices that depends on
i915 driver.

Ensure that a proper reference between the snd-hda driver needing
such binding is shown at /proc/modules, in order to allow userspace
to know about such binding.

Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---

See [PATCH v6 0/4] at: https://lore.kernel.org/all/cover.1652113087.git.mchehab@kernel.org/

 sound/hda/hdac_component.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/hda/hdac_component.c b/sound/hda/hdac_component.c
index bb37e7e0bd79..7789873ddf47 100644
--- a/sound/hda/hdac_component.c
+++ b/sound/hda/hdac_component.c
@@ -199,7 +199,7 @@ static int hdac_component_master_bind(struct device *dev)
 	}
 
 	/* pin the module to avoid dynamic unbinding, but only if given */
-	if (!try_module_get(acomp->ops->owner)) {
+	if (!try_module_get_owner(acomp->ops->owner, dev->driver->owner)) {
 		ret = -ENODEV;
 		goto out_unbind;
 	}
-- 
2.35.3


WARNING: multiple messages have this Message-ID (diff)
From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Luis Chamberlain <mcgrof@kernel.org>
Cc: alsa-devel@alsa-project.org, mauro.chehab@linux.intel.com,
	David Airlie <airlied@linux.ie>,
	Greg KH <gregkh@linuxfoundation.org>,
	intel-gfx@lists.freedesktop.org, Takashi Iwai <tiwai@suse.de>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Takashi Iwai <tiwai@suse.com>,
	dri-devel@lists.freedesktop.org,
	Kai Vehmanen <kai.vehmanen@intel.com>,
	linux-modules@vger.kernel.org, Daniel Vetter <daniel@ffwll.ch>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-kernel@vger.kernel.org,
	Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Subject: [PATCH v6 4/4] ALSA: hda - identify when audio is provided by a video driver
Date: Mon,  9 May 2022 18:23:39 +0200	[thread overview]
Message-ID: <f53f8a9d04b39a6843f19fe3069d1be7a9713aae.1652113087.git.mchehab@kernel.org> (raw)
In-Reply-To: <cover.1652113087.git.mchehab@kernel.org>

On some devices, the hda driver needs to hook into a video driver,
in order to be able to properly access the audio hardware and/or
the power management function.

That's the case of several snd_hda_intel devices that depends on
i915 driver.

Ensure that a proper reference between the snd-hda driver needing
such binding is shown at /proc/modules, in order to allow userspace
to know about such binding.

Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---

See [PATCH v6 0/4] at: https://lore.kernel.org/all/cover.1652113087.git.mchehab@kernel.org/

 sound/hda/hdac_component.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/hda/hdac_component.c b/sound/hda/hdac_component.c
index bb37e7e0bd79..7789873ddf47 100644
--- a/sound/hda/hdac_component.c
+++ b/sound/hda/hdac_component.c
@@ -199,7 +199,7 @@ static int hdac_component_master_bind(struct device *dev)
 	}
 
 	/* pin the module to avoid dynamic unbinding, but only if given */
-	if (!try_module_get(acomp->ops->owner)) {
+	if (!try_module_get_owner(acomp->ops->owner, dev->driver->owner)) {
 		ret = -ENODEV;
 		goto out_unbind;
 	}
-- 
2.35.3


  parent reply	other threads:[~2022-05-09 16:23 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 16:23 [PATCH v6 0/4] Let userspace know when snd-hda-intel needs i915 Mauro Carvalho Chehab
2022-05-09 16:23 ` Mauro Carvalho Chehab
2022-05-09 16:23 ` [Intel-gfx] " Mauro Carvalho Chehab
2022-05-09 16:23 ` Mauro Carvalho Chehab
2022-05-09 16:23 ` Mauro Carvalho Chehab
2022-05-09 16:23 ` [PATCH v6 1/4] module: drop prototype for non-existing __symbol_get_gpl() Mauro Carvalho Chehab
2022-05-09 16:23   ` Mauro Carvalho Chehab
2022-05-09 16:23   ` [Intel-gfx] " Mauro Carvalho Chehab
2022-05-09 16:23   ` Mauro Carvalho Chehab
2022-05-09 16:23 ` [PATCH v6 2/4] module: update dependencies at try_module_get() Mauro Carvalho Chehab
2022-05-09 16:23   ` Mauro Carvalho Chehab
2022-05-09 16:23   ` [Intel-gfx] " Mauro Carvalho Chehab
2022-05-09 16:23   ` Mauro Carvalho Chehab
2022-05-15  8:22   ` [module] a1f1245bef: BUG:sleeping_function_called_from_invalid_context_at_kernel/locking/mutex.c kernel test robot
2022-05-15  8:22     ` kernel test robot
2022-05-15  8:22     ` kernel test robot
2022-05-15  8:22     ` [Intel-gfx] " kernel test robot
2022-05-15  8:22     ` kernel test robot
2022-05-09 16:23 ` [PATCH v6 3/4] module: set holders when symbol_get() is used Mauro Carvalho Chehab
2022-05-09 16:23   ` Mauro Carvalho Chehab
2022-05-09 16:23   ` [Intel-gfx] " Mauro Carvalho Chehab
2022-05-09 16:23   ` Mauro Carvalho Chehab
2022-05-09 16:23   ` Mauro Carvalho Chehab
2022-05-09 16:23 ` Mauro Carvalho Chehab [this message]
2022-05-09 16:23   ` [PATCH v6 4/4] ALSA: hda - identify when audio is provided by a video driver Mauro Carvalho Chehab
2022-05-09 16:23   ` [Intel-gfx] " Mauro Carvalho Chehab
2022-05-09 16:23   ` Mauro Carvalho Chehab
2022-05-11 19:51   ` Daniel Vetter
2022-05-11 19:51     ` Daniel Vetter
2022-05-11 19:51     ` [Intel-gfx] " Daniel Vetter
2022-05-11 19:51     ` Daniel Vetter
2022-05-09 20:07 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Let userspace know when snd-hda-intel needs i915 Patchwork
2022-05-09 20:38 ` [PATCH v6 0/4] " Luis Chamberlain
2022-05-09 20:38   ` Luis Chamberlain
2022-05-09 20:38   ` Luis Chamberlain
2022-05-09 20:38   ` [Intel-gfx] " Luis Chamberlain
2022-05-09 20:38   ` Luis Chamberlain
2022-09-20  5:24   ` Mauro Carvalho Chehab
2022-09-20  5:24     ` Mauro Carvalho Chehab
2022-09-20  5:24     ` Mauro Carvalho Chehab
2022-09-20  5:24     ` Mauro Carvalho Chehab
2022-09-20  5:24     ` [Intel-gfx] " Mauro Carvalho Chehab
2022-09-27 23:31     ` Luis Chamberlain
2022-09-27 23:31       ` Luis Chamberlain
2022-09-27 23:31       ` [Intel-gfx] " Luis Chamberlain
2022-09-27 23:31       ` Luis Chamberlain
2022-09-27 23:31       ` Luis Chamberlain

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=f53f8a9d04b39a6843f19fe3069d1be7a9713aae.1652113087.git.mchehab@kernel.org \
    --to=mchehab@kernel.org \
    --cc=airlied@linux.ie \
    --cc=alsa-devel@alsa-project.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kai.vehmanen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=mauro.chehab@linux.intel.com \
    --cc=mcgrof@kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@intel.com \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.