From 9afb084055e77622d1e3faa6099c340d00f94968 Mon Sep 17 00:00:00 2001 From: seshendra Gadagottu Date: Tue, 23 Jan 2018 13:12:04 -0800 Subject: gpu: nvgpu: enable devfreq after finalize poweron Enabling gpu scaling driver after finalize poweron, will make gpu booting happen at initially set frequency(1GHz). Also doing platform specific init scale after enabling scaling driver. Bug 2049965 Bug 2039013 Bug 200377508 Change-Id: I633f8f5a25d9de18cbb3a022913b8b725ccd87e5 Signed-off-by: seshendra Gadagottu Reviewed-on: https://git-master.nvidia.com/r/1644703 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c') diff --git a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c index c40eafe4..db30fff2 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c @@ -1,7 +1,7 @@ /* * GK20A Tegra Platform Interface * - * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2018, 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, @@ -592,6 +592,9 @@ static void gk20a_tegra_scale_init(struct device *dev) if (!profile) return; + if (profile->private_data) + return; + emc_params = nvgpu_kzalloc(platform->g, sizeof(*emc_params)); if (!emc_params) return; @@ -850,9 +853,6 @@ static int gk20a_tegra_late_probe(struct device *dev) /* Cause early VPR resize */ gk20a_tegra_secure_page_alloc(dev); - /* Initialise tegra specific scaling quirks */ - gk20a_tegra_scale_init(dev); - return 0; } @@ -958,6 +958,7 @@ struct gk20a_platform gm20b_tegra_platform = { #endif /* frequency scaling configuration */ + .initscale = gk20a_tegra_scale_init, .prescale = gk20a_tegra_prescale, #ifdef CONFIG_TEGRA_BWMGR .postscale = gm20b_tegra_postscale, -- cgit v1.2.2