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>
This commit is contained in:
Jordan Crouse
2017-10-20 11:07:01 -06:00
committed by Rob Clark
parent 4d87fc32df
commit b1fc2839d2
10 changed files with 599 additions and 20 deletions

View File

@@ -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) {