From 342da8158abf48734929252c44a91b11902fbeaa Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Mon, 9 Aug 2021 20:31:57 -0700 Subject: [PATCH] gpu: nvgpu: ga10b: disable frequency scaling To disable frequency scaling for gpc clocks, set both devfreq_governor and qos_notify to NULL in platform data. Jira NVGPU-7059 Change-Id: I2142195d89758d21f2c6e070196645aca9bc0a24 Signed-off-by: Seshendra Gadagottu Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2573476 Tested-by: Mark Mendez Tested-by: mobile promotions Reviewed-by: svc_kernel_abi Reviewed-by: Alex Waterman Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/os/linux/platform_ga10b_tegra.c | 4 ++-- drivers/gpu/nvgpu/os/linux/scale.c | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/nvgpu/os/linux/platform_ga10b_tegra.c b/drivers/gpu/nvgpu/os/linux/platform_ga10b_tegra.c index 499c298f5..e6fe03999 100644 --- a/drivers/gpu/nvgpu/os/linux/platform_ga10b_tegra.c +++ b/drivers/gpu/nvgpu/os/linux/platform_ga10b_tegra.c @@ -290,9 +290,9 @@ struct gk20a_platform ga10b_tegra_platform = { .prescale = gp10b_tegra_prescale, .postscale = gp10b_tegra_postscale, /* Enable ga10b frequency scaling - JIRA NVGPU-4683 */ + /* Disable frequency scaling */ .devfreq_governor = NULL, - - .qos_notify = gk20a_scale_qos_notify, + .qos_notify = NULL, .dump_platform_dependencies = gk20a_tegra_debug_dump, diff --git a/drivers/gpu/nvgpu/os/linux/scale.c b/drivers/gpu/nvgpu/os/linux/scale.c index 54a3a23da..bb812d2e4 100644 --- a/drivers/gpu/nvgpu/os/linux/scale.c +++ b/drivers/gpu/nvgpu/os/linux/scale.c @@ -1,7 +1,7 @@ /* * gk20a clock scaling profile * - * Copyright (c) 2013-2020, NVIDIA Corporation. All rights reserved. + * Copyright (c) 2013-2021, NVIDIA Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -473,6 +473,9 @@ void gk20a_scale_exit(struct device *dev) struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); int err; + if (!platform->devfreq_governor && !platform->qos_notify) + return; + #ifdef CONFIG_GK20A_PM_QOS if (platform->qos_notify) { pm_qos_remove_min_notifier(PM_QOS_GPU_FREQ_BOUNDS,