mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-22 17:30:40 +03:00
tegra: hwpm: include all ip files
The config flags defined in Kconfig file are not available/used with
OOT kernel builds. To support all kernel versions, HWPM compiles
independent of CONFIG_TEGRA_SOC_HWPM flag. This also applies to
IP config flags which are not supported as well. Hence,
include HWPM IP files irrespective of the IP config flag status.
For OOT builds, use tegra_is_hypervisor_mode() instead of using
static function defined in HWPM driver.
Bug 4061775
Change-Id: Ifab4ad5c7c652a4ad17820a82b363e92280fdd1a
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2918870
(cherry picked from commit 91d75567c0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2928930
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
c0fd0eff25
commit
6b78463b8a
@@ -52,79 +52,55 @@ CONFIG_TEGRA_HWPM_MINIMAL_IP_ENABLE=y
|
|||||||
ccflags-y += -DCONFIG_TEGRA_HWPM_MINIMAL_IP_ENABLE
|
ccflags-y += -DCONFIG_TEGRA_HWPM_MINIMAL_IP_ENABLE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_TEGRA_GRHOST_NVDLA),y)
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_NVDLA
|
ccflags-y += -DCONFIG_T234_HWPM_IP_NVDLA
|
||||||
nvhwpm-t234-objs += hal/t234/ip/nvdla/t234_nvdla.o
|
nvhwpm-t234-objs += hal/t234/ip/nvdla/t234_nvdla.o
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_TEGRA_GRHOST_PVA),y)
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_PVA
|
ccflags-y += -DCONFIG_T234_HWPM_IP_PVA
|
||||||
nvhwpm-t234-objs += hal/t234/ip/pva/t234_pva.o
|
nvhwpm-t234-objs += hal/t234/ip/pva/t234_pva.o
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_NV_TEGRA_MC),y)
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_MSS_CHANNEL
|
ccflags-y += -DCONFIG_T234_HWPM_IP_MSS_CHANNEL
|
||||||
nvhwpm-t234-objs += hal/t234/ip/mss_channel/t234_mss_channel.o
|
nvhwpm-t234-objs += hal/t234/ip/mss_channel/t234_mss_channel.o
|
||||||
endif
|
|
||||||
|
|
||||||
# Include other IPs if minimal build is not enabled.
|
# Include other IPs if minimal build is not enabled.
|
||||||
ifneq ($(CONFIG_TEGRA_HWPM_MINIMAL_IP_ENABLE),y)
|
ifneq ($(CONFIG_TEGRA_HWPM_MINIMAL_IP_ENABLE),y)
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_DISPLAY
|
ccflags-y += -DCONFIG_T234_HWPM_IP_DISPLAY
|
||||||
nvhwpm-t234-objs += hal/t234/ip/display/t234_display.o
|
nvhwpm-t234-objs += hal/t234/ip/display/t234_display.o
|
||||||
|
|
||||||
ifeq ($(CONFIG_TEGRA_GRHOST_ISP),y)
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_ISP
|
ccflags-y += -DCONFIG_T234_HWPM_IP_ISP
|
||||||
nvhwpm-t234-objs += hal/t234/ip/isp/t234_isp.o
|
nvhwpm-t234-objs += hal/t234/ip/isp/t234_isp.o
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_NVETHERNET),y)
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_MGBE
|
ccflags-y += -DCONFIG_T234_HWPM_IP_MGBE
|
||||||
nvhwpm-t234-objs += hal/t234/ip/mgbe/t234_mgbe.o
|
nvhwpm-t234-objs += hal/t234/ip/mgbe/t234_mgbe.o
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_NV_TEGRA_MC),y)
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_MSS_ISO_NISO_HUBS
|
ccflags-y += -DCONFIG_T234_HWPM_IP_MSS_ISO_NISO_HUBS
|
||||||
nvhwpm-t234-objs += hal/t234/ip/mss_iso_niso_hubs/t234_mss_iso_niso_hubs.o
|
nvhwpm-t234-objs += hal/t234/ip/mss_iso_niso_hubs/t234_mss_iso_niso_hubs.o
|
||||||
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_MSS_MCF
|
ccflags-y += -DCONFIG_T234_HWPM_IP_MSS_MCF
|
||||||
nvhwpm-t234-objs += hal/t234/ip/mss_mcf/t234_mss_mcf.o
|
nvhwpm-t234-objs += hal/t234/ip/mss_mcf/t234_mss_mcf.o
|
||||||
endif
|
|
||||||
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_MSS_GPU_HUB
|
ccflags-y += -DCONFIG_T234_HWPM_IP_MSS_GPU_HUB
|
||||||
nvhwpm-t234-objs += hal/t234/ip/mss_gpu_hub/t234_mss_gpu_hub.o
|
nvhwpm-t234-objs += hal/t234/ip/mss_gpu_hub/t234_mss_gpu_hub.o
|
||||||
|
|
||||||
ifeq ($(CONFIG_TEGRA_GRHOST_NVDEC),y)
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_NVDEC
|
ccflags-y += -DCONFIG_T234_HWPM_IP_NVDEC
|
||||||
nvhwpm-t234-objs += hal/t234/ip/nvdec/t234_nvdec.o
|
nvhwpm-t234-objs += hal/t234/ip/nvdec/t234_nvdec.o
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_TEGRA_GRHOST_NVENC),y)
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_NVENC
|
ccflags-y += -DCONFIG_T234_HWPM_IP_NVENC
|
||||||
nvhwpm-t234-objs += hal/t234/ip/nvenc/t234_nvenc.o
|
nvhwpm-t234-objs += hal/t234/ip/nvenc/t234_nvenc.o
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_TEGRA_GRHOST_OFA),y)
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_OFA
|
ccflags-y += -DCONFIG_T234_HWPM_IP_OFA
|
||||||
nvhwpm-t234-objs += hal/t234/ip/ofa/t234_ofa.o
|
nvhwpm-t234-objs += hal/t234/ip/ofa/t234_ofa.o
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_PCIE_TEGRA194),y)
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_PCIE
|
ccflags-y += -DCONFIG_T234_HWPM_IP_PCIE
|
||||||
nvhwpm-t234-objs += hal/t234/ip/pcie/t234_pcie.o
|
nvhwpm-t234-objs += hal/t234/ip/pcie/t234_pcie.o
|
||||||
endif
|
|
||||||
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_SCF
|
ccflags-y += -DCONFIG_T234_HWPM_IP_SCF
|
||||||
nvhwpm-t234-objs += hal/t234/ip/scf/t234_scf.o
|
nvhwpm-t234-objs += hal/t234/ip/scf/t234_scf.o
|
||||||
|
|
||||||
ifeq ($(CONFIG_VIDEO_TEGRA_VI),y)
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_VI
|
ccflags-y += -DCONFIG_T234_HWPM_IP_VI
|
||||||
nvhwpm-t234-objs += hal/t234/ip/vi/t234_vi.o
|
nvhwpm-t234-objs += hal/t234/ip/vi/t234_vi.o
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_TEGRA_GRHOST_VIC),y)
|
|
||||||
ccflags-y += -DCONFIG_T234_HWPM_IP_VIC
|
ccflags-y += -DCONFIG_T234_HWPM_IP_VIC
|
||||||
nvhwpm-t234-objs += hal/t234/ip/vic/t234_vic.o
|
nvhwpm-t234-objs += hal/t234/ip/vic/t234_vic.o
|
||||||
endif
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,9 @@
|
|||||||
#include <os/linux/driver.h>
|
#include <os/linux/driver.h>
|
||||||
|
|
||||||
#if defined(CONFIG_TEGRA_HWPM_OOT)
|
#if defined(CONFIG_TEGRA_HWPM_OOT)
|
||||||
|
#ifdef CONFIG_SOC_TEGRA_PLATFORM_HELPER
|
||||||
|
#include <soc/tegra/tegra-platform-helper.h>
|
||||||
|
#endif
|
||||||
#if defined(CONFIG_TEGRA_NEXT1_HWPM)
|
#if defined(CONFIG_TEGRA_NEXT1_HWPM)
|
||||||
#include <os/linux/next1_soc_utils.h>
|
#include <os/linux/next1_soc_utils.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -139,7 +142,11 @@ bool tegra_hwpm_is_platform_vsp_impl(void)
|
|||||||
|
|
||||||
bool tegra_hwpm_is_hypervisor_mode_impl(void)
|
bool tegra_hwpm_is_hypervisor_mode_impl(void)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_SOC_TEGRA_PLATFORM_HELPER
|
||||||
|
return tegra_is_hypervisor_mode();
|
||||||
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !CONFIG_TEGRA_HWPM_OOT */
|
#else /* !CONFIG_TEGRA_HWPM_OOT */
|
||||||
|
|||||||
Reference in New Issue
Block a user