]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda: Fix discovery of i915 graphics PCI device
authorTakashi Iwai <tiwai@suse.de>
Tue, 21 Jun 2022 12:00:44 +0000 (14:00 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 21 Jun 2022 12:05:12 +0000 (14:05 +0200)
commitba8e1e5325c140cb554e171a3dfe6cf336741046
treeace3cacd064894b79d46c600e9eae0176aa502c5
parenta188ef37cca2c74d728f8066cea442eb8e283f8d
ALSA: hda: Fix discovery of i915 graphics PCI device

It's been reported that the recent fix for skipping the
component-binding with D-GPU caused a regression on some systems; it
resulted in the completely missing component binding with i915 GPU.

The problem was the use of pci_get_class() function.  It matches with
the full PCI class bits, while we want to match only partially the PCI
base class bits.  So, when a system has an i915 graphics device with
the PCI class 0380, it won't hit because we're looking for only the
PCI class 0300.

This patch fixes i915_gfx_present() to look up each PCI device and
match with PCI base class explicitly instead of pci_get_class().

Fixes: 900727559055 ("ALSA: hda/i915 - skip acomp init if no matching display")
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Tested-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: <stable@vger.kernel.org>
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1200611
Link: https://lore.kernel.org/r/87bkunztec.wl-tiwai@suse.de
Link: https://lore.kernel.org/r/20220621120044.11573-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/hdac_i915.c