From 38cad2c8ac6c528324bd94eae3b8272a11a52e9c Mon Sep 17 00:00:00 2001 From: Pankaj Gupta Date: Wed, 24 Jun 2020 17:52:30 +0530 Subject: [PATCH] msm: kgsl: Use regulator_is_enabled api when gpu-quirk-cx-gdsc is defined When gpu-quirk-cx-gdsc is defined, cx_gdsc will not be disabled from HLOS, so use regulator_is_enabled api to get the dummy status of cx_gdsc. Change-Id: Ied2a54687d9438610116bf4a96a4843fdbc05c56 Signed-off-by: Pankaj Gupta --- drivers/gpu/msm/adreno_a6xx_gmu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/msm/adreno_a6xx_gmu.c b/drivers/gpu/msm/adreno_a6xx_gmu.c index ed7465a02cd1..eb414b1689a0 100644 --- a/drivers/gpu/msm/adreno_a6xx_gmu.c +++ b/drivers/gpu/msm/adreno_a6xx_gmu.c @@ -837,6 +837,9 @@ static bool a6xx_gmu_cx_is_on(struct kgsl_device *device) { unsigned int val; + if (ADRENO_QUIRK(ADRENO_DEVICE(device), ADRENO_QUIRK_CX_GDSC)) + return regulator_is_enabled(KGSL_GMU_DEVICE(device)->cx_gdsc); + gmu_core_regread(device, A6XX_GPU_CC_CX_GDSCR, &val); return (val & BIT(31)); }