Merge branch 'for-next' into for-linus
authorTakashi Iwai <tiwai@suse.de>
Sun, 12 Aug 2018 06:55:01 +0000 (08:55 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sun, 12 Aug 2018 06:55:10 +0000 (08:55 +0200)
Preparation for 4.19 merge material.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
1  2 
sound/pci/hda/hda_intel.c

@@@ -1319,15 -1319,16 +1319,16 @@@ static const struct vga_switcheroo_clie
  static int register_vga_switcheroo(struct azx *chip)
  {
        struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
+       struct pci_dev *p;
        int err;
  
        if (!hda->use_vga_switcheroo)
                return 0;
-       /* FIXME: currently only handling DIS controller
-        * is there any machine with two switchable HDMI audio controllers?
-        */
-       err = vga_switcheroo_register_audio_client(chip->pci, &azx_vs_ops,
-                                                  VGA_SWITCHEROO_DIS);
+       p = get_bound_vga(chip->pci);
+       err = vga_switcheroo_register_audio_client(chip->pci, &azx_vs_ops, p);
+       pci_dev_put(p);
        if (err < 0)
                return err;
        hda->vga_switcheroo_registered = 1;
@@@ -1429,7 -1430,7 +1430,7 @@@ static struct pci_dev *get_bound_vga(st
                        p = pci_get_domain_bus_and_slot(pci_domain_nr(pci->bus),
                                                        pci->bus->number, 0);
                        if (p) {
-                               if ((p->class >> 8) == PCI_CLASS_DISPLAY_VGA)
+                               if ((p->class >> 16) == PCI_BASE_CLASS_DISPLAY)
                                        return p;
                                pci_dev_put(p);
                        }
@@@ -2207,7 -2208,7 +2208,7 @@@ out_free
   */
  static struct snd_pci_quirk power_save_blacklist[] = {
        /* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */
 -      SND_PCI_QUIRK(0x1849, 0x0c0c, "Asrock B85M-ITX", 0),
 +      SND_PCI_QUIRK(0x1849, 0xc892, "Asrock B85M-ITX", 0),
        /* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */
        SND_PCI_QUIRK(0x1849, 0x7662, "Asrock H81M-HDS", 0),
        /* https://bugzilla.redhat.com/show_bug.cgi?id=1525104 */
@@@ -2535,7 -2536,8 +2536,8 @@@ static const struct pci_device_id azx_i
          .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB },
        /* AMD Raven */
        { PCI_DEVICE(0x1022, 0x15e3),
-         .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB },
+         .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB |
+                        AZX_DCAPS_PM_RUNTIME },
        /* ATI HDMI */
        { PCI_DEVICE(0x1002, 0x0002),
          .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },