Skip to content
Commit f4c482a4 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda - Fix yet another race of vga_switcheroo registration



The recent fix for vga switcheroo race in commit 128960a9 opened yet
another race.  At the time the audio driver starts probing, user may
turn off D-GPU off.  But at this moment, the audio driver still
doesn't register the vga switcheroo client, thus the switching isn't
notified.  Then the hardware gets off out of sudden, resulting in
invalid reads and lots of "spurious response" error messages.

For solving this situation, the following changes have been done in
this patch:
- Move again vga switcheroo registration to the very early stage of
  the probing; this also requires to set pci drvdata properly before
  registration
- Introduce the completion to synchronize the driver probe at vga
  switcheroo callbacks; this assures that the whole probing finished
  before executing the callbacks

Reported-by: default avatarDaniel J Blueman <daniel@quora.org>
Tested-by: default avatarDaniel J Blueman <daniel@quora.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 0d9741c0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment