diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2022-06-01 12:46:34 +0200 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2022-11-09 01:43:09 +0100 |
commit | d62f8e982cb857f451a9055d8cc446b1212a6500 (patch) | |
tree | 7fa0057101f29a0fca872db10eb60545976bd380 /drivers/gpu/drm/nouveau/nouveau_connector.c | |
parent | drm/nouveau/disp: add method to control DPAUX pad power (diff) | |
download | linux-d62f8e982cb857f451a9055d8cc446b1212a6500.tar.xz linux-d62f8e982cb857f451a9055d8cc446b1212a6500.zip |
drm/nouveau/kms: switch hpd_lock from mutex to spinlock
There's no good reason for this to be a mutex, and once the layers of
workqueues have been untangled, nouveau_connector_hpd() can be called
from IRQ context and won't be able to take a mutex.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_connector.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_connector.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 1991bbb1d05c..c2ff8e91d90d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -1166,13 +1166,14 @@ nouveau_connector_hpd(struct drm_connector *connector) { struct nouveau_drm *drm = nouveau_drm(connector->dev); u32 mask = drm_connector_mask(connector); + unsigned long flags; - mutex_lock(&drm->hpd_lock); + spin_lock_irqsave(&drm->hpd_lock, flags); if (!(drm->hpd_pending & mask)) { drm->hpd_pending |= mask; schedule_work(&drm->hpd_work); } - mutex_unlock(&drm->hpd_lock); + spin_unlock_irqrestore(&drm->hpd_lock, flags); } static int |