diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2022-06-01 12:46:31 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2022-07-27 01:05:48 +0200 |
commit | a6fd8f936402c3bcc5ac6aed9cca8e73b5ca08f7 (patch) | |
tree | a672ce34eb30bf18dd356350bc75f54dda6d25e0 /drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | |
parent | drm/nouveau/disp: add conn method to query HPD pin status (diff) | |
download | linux-a6fd8f936402c3bcc5ac6aed9cca8e73b5ca08f7.tar.xz linux-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 'drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c index 3af527d2328c..39822f1b5b95 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c @@ -995,6 +995,8 @@ gf119_disp_super(struct work_struct *work) u32 mask[4]; nvkm_debug(subdev, "supervisor %d\n", ffs(disp->super.pending)); + mutex_lock(&disp->super.mutex); + list_for_each_entry(head, &disp->heads, head) { mask[head->id] = nvkm_rd32(device, 0x6101d4 + (head->id * 0x800)); HEAD_DBG(head, "%08x", mask[head->id]); @@ -1037,7 +1039,9 @@ gf119_disp_super(struct work_struct *work) list_for_each_entry(head, &disp->heads, head) nvkm_wr32(device, 0x6101d4 + (head->id * 0x800), 0x00000000); + nvkm_wr32(device, 0x6101d0, 0x80000000); + mutex_unlock(&disp->super.mutex); } void |