Skip to content
  • Takashi Iwai's avatar
    f4c482a4
    ALSA: hda - Fix yet another race of vga_switcheroo registration · f4c482a4
    Takashi Iwai authored
    
    
    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>
    f4c482a4
    ALSA: hda - Fix yet another race of vga_switcheroo registration
    Takashi Iwai authored
    
    
    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>
Loading