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 <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2470284
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Seshendra Gadagottu
2020-10-20 21:29:48 -07:00
committed by mobile promotions
parent ddf8f12197
commit 2cc8fdfa81

View File

@@ -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 <nvgpu/enabled.h>
#include <nvgpu/gk20a.h>
#include <nvgpu/nvhost.h>
#include <nvgpu/soc.h>
#include <nvgpu/pmu/pmu_perfmon.h>
#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;