• Lyude Paul's avatar
    drm/nouveau/kms/nv50-: Fix locking for audio callbacks · 9125e242
    Lyude Paul authored
    Noticed that I wasn't paying close enough attention the last time I looked
    at our audio callbacks, as I completely missed the fact that we were
    figuring out which audio-enabled connector goes to each encoder by checking
    it's state, but without grabbing any of the appropriate modesetting locks
    to do so.
    
    That being said however: trying to grab modesetting locks in our audio
    callbacks would be very painful due to the potential for locking inversion
    between HDA and DRM. So, let's instead just copy what i915 does again - add
    our own audio lock to protect audio related state, and store each audio
    enabled connector in each nouveau_encoder struct so that we don't need to
    check any atomic states.
    Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
    Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
    9125e242
nouveau_encoder.h 4.21 KB