summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorJordan Crouse <jcrouse@codeaurora.org>2017-12-13 13:45:44 -0700
committerRob Clark <robdclark@gmail.com>2017-12-13 15:52:06 -0500
commit7ddae82e12593ff3d44e628c02fbfa765508aa48 (patch)
treebb12ffd81ae87efd397fef01838cd8e1f963aecd /drivers/gpu/drm
parent62e3a3e342af3c313ab38603811ecdb1fcc79edb (diff)
drm/msm: gpu: Only sync fences on rings that exist
The fault recovery code tries to sync fences on all possible rings instead of only the rings that actually exist which will fault the kernel when the number of rings are less than the maximum amount. Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/msm/msm_gpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index a335ad43c4eb..6fbc2fc259ce 100644
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -308,7 +308,7 @@ static void recover_worker(struct work_struct *work)
* needs to happen after msm_rd_dump_submit() to ensure that the
* bo's referenced by the offending submit are still around.
*/
- for (i = 0; i < ARRAY_SIZE(gpu->rb); i++) {
+ for (i = 0; i < gpu->nr_rings; i++) {
struct msm_ringbuffer *ring = gpu->rb[i];
uint32_t fence = ring->memptrs->fence;