aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2022-06-01 20:46:31 +1000
committerDave Airlie <airlied@redhat.com>2022-07-27 09:05:48 +1000
commita6fd8f936402c3bcc5ac6aed9cca8e73b5ca08f7 (patch)
treea672ce34eb30bf18dd356350bc75f54dda6d25e0 /drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
parentdrm/nouveau/disp: add conn method to query HPD pin status (diff)
downloadlinux-dev-a6fd8f936402c3bcc5ac6aed9cca8e73b5ca08f7.tar.xz
linux-dev-a6fd8f936402c3bcc5ac6aed9cca8e73b5ca08f7.zip
drm/nouveau/disp: add supervisor mutex
Will be used to protect NVIF_CLASS_OUTP method calls from racing with in-progress supervisor handling. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
index 237f5aa06850..a46e13cc9ff1 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c
@@ -1345,7 +1345,10 @@ nv50_disp_super(struct work_struct *work)
struct nvkm_subdev *subdev = &disp->engine.subdev;
struct nvkm_device *device = subdev->device;
struct nvkm_head *head;
- u32 super = nvkm_rd32(device, 0x610030);
+ u32 super;
+
+ mutex_lock(&disp->super.mutex);
+ super = nvkm_rd32(device, 0x610030);
nvkm_debug(subdev, "supervisor %08x %08x\n", disp->super.pending, super);
@@ -1387,6 +1390,7 @@ nv50_disp_super(struct work_struct *work)
}
nvkm_wr32(device, 0x610030, 0x80000000);
+ mutex_unlock(&disp->super.mutex);
}
const struct nvkm_enum