diff options
author | Haley Teng <hteng@nvidia.com> | 2014-10-05 23:45:12 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:11:41 -0400 |
commit | 3e11a4fbb23732955ea06aa025803d818c8352da (patch) | |
tree | ef5cace89c9beac814134d4ed359ab254e2ae9f8 /drivers/gpu/nvgpu/gk20a/gk20a.h | |
parent | f56d50ddac2ea70c7d50f22b9cd74408b1042da3 (diff) |
gpu: nvgpu: vgpu: disable GK20A PMU support
GK20A PMU is not supported in GPU client for virtualization. However,
to make native case and virtualization case can share same defconfig and
kernel image, we need to enable CONFIG_GK20A_PMU and
CONFIG_GK20A_DEVFREQ in defconfig. This commit changes to detect if we
should disable GK20A PMU support in run time.
Bug 200041597
Change-Id: I292c647303ed57af6faa1c5671037ca27b48e31e
Signed-off-by: Haley Teng <hteng@nvidia.com>
Reviewed-on: http://git-master/r/553653
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 38322c87..979b4cb0 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -687,14 +687,16 @@ enum { | |||
687 | KEPLER_DMA_COPY_A = 0xA0B5, /*not sure about this one*/ | 687 | KEPLER_DMA_COPY_A = 0xA0B5, /*not sure about this one*/ |
688 | }; | 688 | }; |
689 | 689 | ||
690 | #if defined(CONFIG_GK20A_PMU) | 690 | static inline int support_gk20a_pmu(struct platform_device *dev) |
691 | static inline int support_gk20a_pmu(void) | ||
692 | { | 691 | { |
693 | return 1; | 692 | if (IS_ENABLED(CONFIG_GK20A_PMU)) { |
693 | struct gk20a_platform *platform = gk20a_get_platform(dev); | ||
694 | |||
695 | /* we have not supported GPU PMU for virtualization now */ | ||
696 | return !platform->virtual_dev; | ||
697 | } else | ||
698 | return 0; | ||
694 | } | 699 | } |
695 | #else | ||
696 | static inline int support_gk20a_pmu(void){return 0;} | ||
697 | #endif | ||
698 | 700 | ||
699 | void gk20a_create_sysfs(struct platform_device *dev); | 701 | void gk20a_create_sysfs(struct platform_device *dev); |
700 | 702 | ||