From c56b6599e3a7b2bace74f8845b954fd8657e1650 Mon Sep 17 00:00:00 2001 From: Harshdeep Dhatt Date: Tue, 11 Aug 2020 18:24:19 -0600 Subject: [PATCH] msm: kgsl: Kick dcvs in idle thread for gmu targets This ensures that dcvs runs while the gpu is still actively working on the same submission for longer than the idle timer. Change-Id: I85f2ff21dc19a9e589d6ed918bebea4c42b2a39d Signed-off-by: Harshdeep Dhatt --- drivers/gpu/msm/adreno_a6xx_gmu.c | 1 + drivers/gpu/msm/adreno_a6xx_rgmu.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/msm/adreno_a6xx_gmu.c b/drivers/gpu/msm/adreno_a6xx_gmu.c index db703d1a32fb..92bda0fbac27 100644 --- a/drivers/gpu/msm/adreno_a6xx_gmu.c +++ b/drivers/gpu/msm/adreno_a6xx_gmu.c @@ -3115,6 +3115,7 @@ static void gmu_idle_check(struct work_struct *work) if (test_bit(GMU_PRIV_GPU_STARTED, &gmu->flags)) a6xx_power_off(adreno_dev); } else { + kgsl_pwrscale_update(device); mod_timer(&device->idle_timer, jiffies + device->pwrctrl.interval_timeout); } diff --git a/drivers/gpu/msm/adreno_a6xx_rgmu.c b/drivers/gpu/msm/adreno_a6xx_rgmu.c index 22e496d2bfa8..55f1ac8d9c3e 100644 --- a/drivers/gpu/msm/adreno_a6xx_rgmu.c +++ b/drivers/gpu/msm/adreno_a6xx_rgmu.c @@ -852,11 +852,13 @@ static void rgmu_idle_check(struct work_struct *work) if (test_bit(GMU_DISABLE_SLUMBER, &device->gmu_core.flags)) goto done; - if (!atomic_read(&device->active_cnt)) + if (!atomic_read(&device->active_cnt)) { a6xx_power_off(adreno_dev); - else + } else { + kgsl_pwrscale_update(device); mod_timer(&device->idle_timer, jiffies + device->pwrctrl.interval_timeout); + } done: mutex_unlock(&device->mutex);