summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2016-12-13 09:29:55 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-09 08:32:19 +0100
commita5b4c77c92da629bf10926fe05cdf972e0e08f86 (patch)
tree752afc5543dd2f720142514c50c09dc2fc462fa9 /drivers/gpu/drm
parentd95ef8af5425f7ac99427b7d4fad5b4c8e54c879 (diff)
downloadblackbird-op-linux-a5b4c77c92da629bf10926fe05cdf972e0e08f86.tar.gz
blackbird-op-linux-a5b4c77c92da629bf10926fe05cdf972e0e08f86.zip
drm/nouveau/ltc: protect clearing of comptags with mutex
commit f4e65efc88b64c1dbca275d42a188edccedb56c6 upstream. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c
index 39c2a38e54f7..0c7ef250dcaf 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c
@@ -47,8 +47,10 @@ nvkm_ltc_tags_clear(struct nvkm_ltc *ltc, u32 first, u32 count)
BUG_ON((first > limit) || (limit >= ltc->num_tags));
+ mutex_lock(&ltc->subdev.mutex);
ltc->func->cbc_clear(ltc, first, limit);
ltc->func->cbc_wait(ltc);
+ mutex_unlock(&ltc->subdev.mutex);
}
int
OpenPOWER on IntegriCloud