From: Takashi Iwai <tiwai@suse.de>
To: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: alsa-devel@alsa-project.org, Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: Intel HDMI probe regression on IVB (and older?)
Date: Mon, 20 Jun 2022 17:49:44 +0200 [thread overview]
Message-ID: <87h74fpc6f.wl-tiwai@suse.de> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2206201821290.1532214@eliteleevi.tm.intel.com>
On Mon, 20 Jun 2022 17:31:09 +0200,
Kai Vehmanen wrote:
>
> Hi,
>
> On Mon, 20 Jun 2022, Takashi Iwai wrote:
>
> > So this looks like a bug due to the use of pci_get_class().
> > Since there is no pci_get_base_class(), we likely need to open-code
> > the search, e.g. something like below.
>
> yes, this indeed seems to be the case.
>
> > diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
> > index 3f35972e1cf7..161a9711cd63 100644
> > --- a/sound/hda/hdac_i915.c
> > +++ b/sound/hda/hdac_i915.c
> > @@ -119,21 +119,18 @@ static int i915_component_master_match(struct device *dev, int subcomponent,
> [...]
> > - do {
> > - display_dev = pci_get_class(class, display_dev);
> > -
> > - if (display_dev && display_dev->vendor == PCI_VENDOR_ID_INTEL &&
> > + for_each_pci_dev(display_dev) {
> > + if (display_dev->vendor == PCI_VENDOR_ID_INTEL &&
> > + (display_dev->class >> 16) == PCI_BASE_CLASS_DISPLAY &&
> > connectivity_check(display_dev, hdac_pci)) {
> > pci_dev_put(display_dev);
> > - match = true;
> > + return true;
> > }
> > - } while (!match && display_dev);
> > + }
>
> To open code a bit less, I was first thinking:
>
> --cut--
> --- a/sound/hda/hdac_i915.c
> +++ b/sound/hda/hdac_i915.c
> @@ -124,9 +124,9 @@ static int i915_gfx_present(struct pci_dev *hdac_pci)
> bool match = false;
>
> do {
> - display_dev = pci_get_class(class, display_dev);
> + display_dev = pci_get_device(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, display_dev);
>
> - if (display_dev && display_dev->vendor == PCI_VENDOR_ID_INTEL &&
> + if (display_dev && (display_dev->class >> 16) == PCI_BASE_CLASS_DISPLAY &&
> connectivity_check(display_dev, hdac_pci)) {
> --cut--
>
> But it's a marginal difference, so for your version:
>
> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
OK, could you throw the patch to CI for verification?
I can merge it for the next pull request (probably in this week) once
after confirmation.
thanks,
Takashi
next prev parent reply other threads:[~2022-06-20 15:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 7:27 Intel HDMI probe regression on IVB (and older?) Takashi Iwai
2022-06-20 9:26 ` Kai Vehmanen
2022-06-20 15:03 ` Takashi Iwai
2022-06-20 15:31 ` Kai Vehmanen
2022-06-20 15:49 ` Takashi Iwai [this message]
2022-06-20 16:18 ` Kai Vehmanen
2022-06-21 11:36 ` Kai Vehmanen
2022-06-21 12:01 ` Takashi Iwai
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=87h74fpc6f.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=kai.vehmanen@linux.intel.com \
--cc=lucas.demarchi@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 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.