On Thu, Jun 13, 2019 at 9:15 AM Ilia Mirkin <imirkin@xxxxxxxxxxxx> wrote: > > On Thu, Jun 13, 2019 at 2:35 AM Daniel Drake <drake@xxxxxxxxxxxx> wrote: > > > > From: Lukas Wunner <lukas@xxxxxxxxx> > > > > The integrated HDA controller on Nvidia GPUs can be hidden with a bit in > > the GPU's config space. Information about this scheme was provided by > > NVIDIA on their forums. > > > > Many laptops now ship with this device hidden, meaning that Linux users > > of affected platforms (where the HDMI connector comes off the NVIDIA GPU) > > cannot use HDMI audio functionality. > > > > Avoid this issue by exposing the HDMI audio device on device enumeration > > and resume. > > > > The GPU and HDA controller are two functions of the same PCI device > > (VGA class device on function 0 and audio device on function 1). > > The multifunction flag in the GPU's Header Type register is cleared when > > the HDA controller is hidden and set if it's exposed, so reread the flag > > after exposing the HDA. > > > > According to Ilia Mirkin, the HDA controller is only present from MCP89 > > onward, so do not touch config space on older GPUs. > > Actually GF100 also has it, and has a lower PCI ID than MCP89. But I > don't think it really matters - I can't imagine anyone played HDA > hiding tricks on that power-hungry monster. I'd appreciate it if you > could reword this sentence to imply that it's on PCI IDs >= MCP89's > rather than GPUs newer than MCP89. GT215 was released before MCP89, > I'm fairly sure, but its PCI ID comes later, for example. [Wikipedia > says November 17, 2009 for GT215 vs some point in 2010 for MCP89.] > Maybe like > > "..., the HDA controller is only present on GPUs with PCI IDs values > from MCP89's and onward, so ..." > > > > > This quirk is limited to NVIDIA PCI devices with the VGA Controller > > device class. This is expected to correspond to product configurations > > where the NVIDIA GPU has connectors attached. Other products where the > > device class is 3D Controller are expected to correspond to configurations > > where the NVIDIA GPU is dedicated (dGPU) and has no connectors. > > > > It's sensible to avoid exposing the HDA controller on dGPU setups, > > especially because we've seen cases where the PCI BARs are not set > > up correctly by the platform in this case, causing Linux to log > > errors if the device is visible. This assumption of device class > > accurately corresponding to product configuration is true for 6 of 6 > > laptops recently checked at the Endless lab, and there are also signs of > > agreement checking the data from 74 previously tested products, however > > Ilia Mirkin comments that he's seen cases where it is not true. Anyway, it > > looks like this quirk should fix audio support for the majority of > > affected users. > > Yeah, this is fine. We used to have code which prevented enabling the > display portion when 3d class != VGA. We had to change it :) So I'm > definitely not making things up... However whether any of those people > *also* had HDA hiding issues -- unknown. And it wouldn't make things > any worse for them. FTR, this is where it was enabled: commit fc1620883af8cbc10bfb1a4ef2eb4e8113243012 Author: Ben Skeggs <bskeggs@xxxxxxxxxx> Date: Tue Sep 10 13:20:34 2013 +1000 drm/nouveau/kms: enable for non-vga pci classes Signed-off-by: Ben Skeggs <bskeggs@xxxxxxxxxx> Unfortunately no bug id included.