From 82cce300b19785a5f2d2f1e54255187779f96735 Mon Sep 17 00:00:00 2001 From: Urvashi Agrawal Date: Thu, 5 Nov 2020 12:19:18 -0800 Subject: [PATCH] msm: kgsl: Add a Kconfig setting for GPU idle timeout Add a Kconfig option so that we can configure the timeout for GPU to go into slumber per-environment basis. Change-Id: I36a2d78a4c987e635160db3056aab7b0d6af68a6 Signed-off-by: Urvashi Agrawal --- drivers/gpu/msm/Kconfig | 10 ++++++++++ drivers/gpu/msm/adreno.c | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/msm/Kconfig b/drivers/gpu/msm/Kconfig index e573fd8a0ba2..f6664a9a55ce 100644 --- a/drivers/gpu/msm/Kconfig +++ b/drivers/gpu/msm/Kconfig @@ -51,3 +51,13 @@ config QCOM_KGSL_IOCOHERENCY_DEFAULT support hardware I/O coherency. If enabled all cached GPU memory will use I/O coherency regardless of the user flags. If not enabled the user can still selectively enable I/O coherency with a flag. + +config QCOM_KGSL_IDLE_TIMEOUT + int + default 100000 if !QGKI + default 80 + help + GPU idle timeout for Adreno GPU. This value decides after how + long the GPU will go into slumber. A higher value will mean that + the GPU is powered ON for a longer duration which will have + power costs. diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c index d2e5dc10bc48..ee0e89c25e3a 100644 --- a/drivers/gpu/msm/adreno.c +++ b/drivers/gpu/msm/adreno.c @@ -1074,8 +1074,7 @@ static int adreno_of_get_power(struct adreno_device *adreno_dev, l3_pwrlevel_probe(device, pdev->dev.of_node); - /* Default timeout is 80 ms across all targets */ - device->pwrctrl.interval_timeout = 80; + device->pwrctrl.interval_timeout = CONFIG_QCOM_KGSL_IDLE_TIMEOUT; device->pwrctrl.minbw_timeout = 10;