]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/kms/nv50-: Fix locking for audio callbacks
authorLyude Paul <lyude@redhat.com>
Sat, 14 Nov 2020 00:14:17 +0000 (19:14 -0500)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 29 Jan 2021 06:49:14 +0000 (16:49 +1000)
commit594fa04932dfabecdd07a58b3606ed24d91b6041
treef31978e655f0e795e35f35e34b4ba2438bf1e81c
parent7fff591ca870ba1193b82707098d3a7bbf969693
drm/nouveau/kms/nv50-: Fix locking for audio callbacks

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: Lyude Paul <lyude@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/dispnv50/disp.c
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_encoder.h