diff options
author | Sharat Masetty <smasetty@codeaurora.org> | 2018-09-14 14:08:55 +0530 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2018-10-03 20:24:54 -0400 |
commit | fc6510ac4900db98851cabfd44a4a510b2d22db3 (patch) | |
tree | b8c3ded0deda51c15337288d5b2ba9d3b347b18e /drivers/gpu/drm/msm/adreno/a5xx_preempt.c | |
parent | dfdb3be43ef1195c491e6c3760b922acb52e3575 (diff) | |
download | linux-fc6510ac4900db98851cabfd44a4a510b2d22db3.tar.gz |
drm/msm/a5xx: Skip hardware preemption init if no preemption
In the case where preemption is not enabled, this patch simply skips
preemption related initialization in hardware init sequence.
Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/adreno/a5xx_preempt.c')
-rw-r--r-- | drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c index 970c7963ae29..6a3c560ba5c3 100644 --- a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c +++ b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c @@ -208,6 +208,13 @@ void a5xx_preempt_hw_init(struct msm_gpu *gpu) struct a5xx_gpu *a5xx_gpu = to_a5xx_gpu(adreno_gpu); int i; + /* Always come up on rb 0 */ + a5xx_gpu->cur_ring = gpu->rb[0]; + + /* No preemption if we only have one ring */ + if (gpu->nr_rings == 1) + return; + for (i = 0; i < gpu->nr_rings; i++) { a5xx_gpu->preempt[i]->wptr = 0; a5xx_gpu->preempt[i]->rptr = 0; @@ -220,9 +227,6 @@ void a5xx_preempt_hw_init(struct msm_gpu *gpu) /* Reset the preemption state */ set_preempt_state(a5xx_gpu, PREEMPT_NONE); - - /* Always come up on rb 0 */ - a5xx_gpu->cur_ring = gpu->rb[0]; } static int preempt_init_ring(struct a5xx_gpu *a5xx_gpu, |