From 2cc8fdfa81626cc5fd13a6ad24bd186501f27a57 Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Tue, 20 Oct 2020 21:29:48 -0700 Subject: [PATCH] gpu: nvgpu: skip clock queries for un-supported platforms Skip clock queries in acquire_platform_clocks for un-supported platforms. Only silicon and fpga has clocks support. Bug 3198706 Change-Id: Ie012525802ef6b66709527cac2d4186f5287818a Signed-off-by: Seshendra Gadagottu Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2470284 Reviewed-by: Alex Waterman Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c index 0cb3dfd7e..751a12b6e 100644 --- a/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c @@ -1,7 +1,7 @@ /* * GP10B Tegra Platform Interface * - * Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-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, @@ -41,6 +41,7 @@ #include #include #include +#include #include #include "os_linux.h" @@ -93,6 +94,11 @@ static int acquire_platform_clocks(struct device *dev, unsigned int i, num_clks_dt; int err = 0; + /* Get clocks only on supported platforms(silicon and fpga) */ + if (!nvgpu_platform_is_silicon(g) && !nvgpu_platform_is_fpga(g)) { + return 0; + } + #ifdef TEGRA186_POWER_DOMAIN_GPU if (!tegra_bpmp_running()) { return 0;