ALSA: hda: Avoid non-operational GPU warning at regular device removal
PATCH 1/1 ALSA: hda: Avoid non-operational GPU warning at regular device removal
When a hda-intel driver is removed manually and it has a GPU with switcheroo, it always gives a warning like "GPU sound probed, but not operational:..." no matter whether GPU has been actually operational or not. This warning was originally put for machines that really suffer from the non-operational GPU HDMI audio, but it's seen at the common path a normal device removal also goes over.
For avoiding a confusing warning, move the check and the warning at the error path of azx_probe_continue() that is the point where the non-functional GPU gets detected and given up.
Fixes 2b360ba9a493 ("ALSA: hda: intel: Fix Optimus when GPU has no sound")
Signed-off-by Takashi Iwai <[email protected]>
--- sound/hda/controllers/intel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/hda/controllers/intel.c +2 -1
@@ -1380,7 +1380,6 @@ static void azx_free(struct azx *chip)* actually stop the chip) to allow GPU to suspend via * vga_switcheroo, and print a warning. */ -dev_warn (&pci->dev,"GPU sound probed, but not operational: please add a quirk to driver_denylist\n" );pm_runtime_disable (&pci->dev);pm_runtime_set_suspended (&pci->dev);pm_runtime_enable (&pci->dev);
@@ -2448,6 +2447,8 @@ static int azx_probe_continue(struct azx *chip) out_free:if (err <0 ) {pci_set_drvdata (pci,NULL ); +if (hda->vga_switcheroo_registered) +dev_warn (&pci->dev,"GPU sound probed, but not operational: please add a quirk to driver_denylist\n" );snd_card_free (chip->card);return err; }
Signature · 1 line
2.55.0