diff options
author | Dave Airlie <airlied@redhat.com> | 2017-03-30 21:50:04 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-03-30 21:50:04 -0400 |
commit | 7502add2210f8cd9f761c9f25c46f566d1b7305e (patch) | |
tree | 87d1c0ef64361ad7de1835de5fa7a7895ef049bc | |
parent | c02ed2e75ef4c74e41e421acb4ef1494671585e8 (diff) | |
parent | f3cd1b064f1179d9e6188c6d67297a2360880e10 (diff) |
Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes
a single fix to keep fence seqnos of completed jobs monotonically
increasing, as expected in various locations of the driver code. Also
tagged for stable.
* 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux:
drm/etnaviv: (re-)protect fence allocation with GPU mutex
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index 130d7d517a19..da48819ff2e6 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c | |||
@@ -1311,6 +1311,8 @@ int etnaviv_gpu_submit(struct etnaviv_gpu *gpu, | |||
1311 | goto out_pm_put; | 1311 | goto out_pm_put; |
1312 | } | 1312 | } |
1313 | 1313 | ||
1314 | mutex_lock(&gpu->lock); | ||
1315 | |||
1314 | fence = etnaviv_gpu_fence_alloc(gpu); | 1316 | fence = etnaviv_gpu_fence_alloc(gpu); |
1315 | if (!fence) { | 1317 | if (!fence) { |
1316 | event_free(gpu, event); | 1318 | event_free(gpu, event); |
@@ -1318,8 +1320,6 @@ int etnaviv_gpu_submit(struct etnaviv_gpu *gpu, | |||
1318 | goto out_pm_put; | 1320 | goto out_pm_put; |
1319 | } | 1321 | } |
1320 | 1322 | ||
1321 | mutex_lock(&gpu->lock); | ||
1322 | |||
1323 | gpu->event[event].fence = fence; | 1323 | gpu->event[event].fence = fence; |
1324 | submit->fence = fence->seqno; | 1324 | submit->fence = fence->seqno; |
1325 | gpu->active_fence = submit->fence; | 1325 | gpu->active_fence = submit->fence; |