summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/msm_gpu.c
diff options
context:
space:
mode:
authorJordan Crouse <jcrouse@codeaurora.org>2017-10-20 11:07:01 -0600
committerRob Clark <robdclark@gmail.com>2017-10-28 11:01:38 -0400
commitb1fc2839d2f92d09da90d1e09156a73ddaba8a93 (patch)
tree2cbc4001472d16c4290e7a4d8be6742d57c72d3c /drivers/gpu/drm/msm/msm_gpu.c
parent4d87fc32dfd20ad0d4ffd5204f6e5d41d281e128 (diff)
drm/msm: Implement preemption for A5XX targets
Implement preemption for A5XX targets - this allows multiple ringbuffers for different priorities with automatic preemption of a lower priority ringbuffer if a higher one is ready. Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gpu.c')
-rw-r--r--drivers/gpu/drm/msm/msm_gpu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index ec28c99ee36e..a05aa119f22b 100644
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -295,8 +295,7 @@ static void recover_worker(struct work_struct *work)
* Replay all remaining submits starting with highest priority
* ring
*/
-
- for (i = gpu->nr_rings - 1; i >= 0; i--) {
+ for (i = 0; i < gpu->nr_rings; i++) {
struct msm_ringbuffer *ring = gpu->rb[i];
list_for_each_entry(submit, &ring->submits, node)
@@ -476,7 +475,7 @@ static void retire_submits(struct msm_gpu *gpu)
WARN_ON(!mutex_is_locked(&dev->struct_mutex));
/* Retire the commits starting with highest priority */
- for (i = gpu->nr_rings - 1; i >= 0; i--) {
+ for (i = 0; i < gpu->nr_rings; i++) {
struct msm_ringbuffer *ring = gpu->rb[i];
list_for_each_entry_safe(submit, tmp, &ring->submits, node) {