diff --git a/common/tegra_hwpm_ip_utils.c b/common/tegra_hwpm_ip_utils.c index e2003c2..0a04c72 100644 --- a/common/tegra_hwpm_ip_utils.c +++ b/common/tegra_hwpm_ip_utils.c @@ -20,6 +20,33 @@ #include #include +int tegra_hwpm_get_floorsweep_info(struct tegra_soc_hwpm *hwpm, + struct tegra_soc_hwpm_ip_floorsweep_info *fs_info) +{ + int ret = 0; + u32 i = 0U; + + tegra_hwpm_fn(hwpm, " "); + + for (i = 0U; i < fs_info->num_queries; i++) { + ret = hwpm->active_chip->get_fs_info( + hwpm, (u32)fs_info->ip_fsinfo[i].ip, + &fs_info->ip_fsinfo[i].ip_inst_mask, + &fs_info->ip_fsinfo[i].status); + if (ret < 0) { + /* Print error for debug purpose. */ + tegra_hwpm_err(hwpm, "Failed to get fs_info"); + } + + tegra_hwpm_dbg(hwpm, hwpm_verbose, + "Query %d: ip %d: ip_status: %d inst_mask 0x%llx", + i, fs_info->ip_fsinfo[i].ip, + fs_info->ip_fsinfo[i].status, + fs_info->ip_fsinfo[i].ip_inst_mask); + } + return ret; +} + int tegra_hwpm_get_resource_info(struct tegra_soc_hwpm *hwpm, struct tegra_soc_hwpm_resource_info *rsrc_info) { diff --git a/hal/t234/ip/display/t234_hwpm_ip_display.c b/hal/t234/ip/display/t234_hwpm_ip_display.c index ad3be2f..4800cb9 100644 --- a/hal/t234/ip/display/t234_hwpm_ip_display.c +++ b/hal/t234/ip/display/t234_hwpm_ip_display.c @@ -60,6 +60,8 @@ struct hwpm_ip_inst t234_display_inst_static_array[ T234_HWPM_IP_DISPLAY_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_DISPLAY_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/display/t234_hwpm_ip_display.h b/hal/t234/ip/display/t234_hwpm_ip_display.h index 11aecf6..3b199ea 100644 --- a/hal/t234/ip/display/t234_hwpm_ip_display.h +++ b/hal/t234/ip/display/t234_hwpm_ip_display.h @@ -19,6 +19,7 @@ /* This data should ideally be available in HW headers */ #define T234_HWPM_IP_DISPLAY_NUM_INSTANCES 1U +#define T234_HWPM_IP_DISPLAY_NUM_CORE_ELEMENT_PER_INST 1U #define T234_HWPM_IP_DISPLAY_NUM_PERFMON_PER_INST 1U #define T234_HWPM_IP_DISPLAY_NUM_PERFMUX_PER_INST 1U #define T234_HWPM_IP_DISPLAY_NUM_BROADCAST_PER_INST 0U diff --git a/hal/t234/ip/isp/t234_hwpm_ip_isp.c b/hal/t234/ip/isp/t234_hwpm_ip_isp.c index 52fa51b..a71cf91 100644 --- a/hal/t234/ip/isp/t234_hwpm_ip_isp.c +++ b/hal/t234/ip/isp/t234_hwpm_ip_isp.c @@ -60,6 +60,8 @@ struct hwpm_ip_inst t234_isp_inst_static_array[ T234_HWPM_IP_ISP_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_ISP_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/isp/t234_hwpm_ip_isp.h b/hal/t234/ip/isp/t234_hwpm_ip_isp.h index 75a2116..7ff835a 100644 --- a/hal/t234/ip/isp/t234_hwpm_ip_isp.h +++ b/hal/t234/ip/isp/t234_hwpm_ip_isp.h @@ -15,13 +15,14 @@ #define T234_HWPM_IP_ISP_H #if defined(CONFIG_SOC_HWPM_IP_ISP) -#define T234_HWPM_ACTIVE_IP_ISP T234_HWPM_IP_ISP +#define T234_HWPM_ACTIVE_IP_ISP T234_HWPM_IP_ISP /* This data should ideally be available in HW headers */ -#define T234_HWPM_IP_ISP_NUM_INSTANCES 1U -#define T234_HWPM_IP_ISP_NUM_PERFMON_PER_INST 1U -#define T234_HWPM_IP_ISP_NUM_PERFMUX_PER_INST 1U -#define T234_HWPM_IP_ISP_NUM_BROADCAST_PER_INST 0U +#define T234_HWPM_IP_ISP_NUM_INSTANCES 1U +#define T234_HWPM_IP_ISP_NUM_CORE_ELEMENT_PER_INST 1U +#define T234_HWPM_IP_ISP_NUM_PERFMON_PER_INST 1U +#define T234_HWPM_IP_ISP_NUM_PERFMUX_PER_INST 1U +#define T234_HWPM_IP_ISP_NUM_BROADCAST_PER_INST 0U extern struct hwpm_ip t234_hwpm_ip_isp; diff --git a/hal/t234/ip/mgbe/t234_hwpm_ip_mgbe.c b/hal/t234/ip/mgbe/t234_hwpm_ip_mgbe.c index 395a22d..042c1bd 100644 --- a/hal/t234/ip/mgbe/t234_hwpm_ip_mgbe.c +++ b/hal/t234/ip/mgbe/t234_hwpm_ip_mgbe.c @@ -174,6 +174,8 @@ struct hwpm_ip_inst t234_mgbe_inst_static_array[ T234_HWPM_IP_MGBE_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_MGBE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -233,6 +235,8 @@ struct hwpm_ip_inst t234_mgbe_inst_static_array[ }, { .hw_inst_mask = BIT(1), + .num_core_elements_per_inst = + T234_HWPM_IP_MGBE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -292,6 +296,8 @@ struct hwpm_ip_inst t234_mgbe_inst_static_array[ }, { .hw_inst_mask = BIT(2), + .num_core_elements_per_inst = + T234_HWPM_IP_MGBE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -351,6 +357,8 @@ struct hwpm_ip_inst t234_mgbe_inst_static_array[ }, { .hw_inst_mask = BIT(3), + .num_core_elements_per_inst = + T234_HWPM_IP_MGBE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/mgbe/t234_hwpm_ip_mgbe.h b/hal/t234/ip/mgbe/t234_hwpm_ip_mgbe.h index 57e7710..0e182e1 100644 --- a/hal/t234/ip/mgbe/t234_hwpm_ip_mgbe.h +++ b/hal/t234/ip/mgbe/t234_hwpm_ip_mgbe.h @@ -19,6 +19,7 @@ /* This data should ideally be available in HW headers */ #define T234_HWPM_IP_MGBE_NUM_INSTANCES 4U +#define T234_HWPM_IP_MGBE_NUM_CORE_ELEMENT_PER_INST 1U #define T234_HWPM_IP_MGBE_NUM_PERFMON_PER_INST 1U #define T234_HWPM_IP_MGBE_NUM_PERFMUX_PER_INST 1U #define T234_HWPM_IP_MGBE_NUM_BROADCAST_PER_INST 0U diff --git a/hal/t234/ip/mss_channel/t234_hwpm_ip_mss_channel.c b/hal/t234/ip/mss_channel/t234_hwpm_ip_mss_channel.c index eeadaf1..63fae2f 100644 --- a/hal/t234/ip/mss_channel/t234_hwpm_ip_mss_channel.c +++ b/hal/t234/ip/mss_channel/t234_hwpm_ip_mss_channel.c @@ -528,6 +528,8 @@ struct hwpm_ip_inst t234_mss_channel_inst_static_array[ T234_HWPM_IP_MSS_CHANNEL_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_MSS_CHANNEL_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/mss_channel/t234_hwpm_ip_mss_channel.h b/hal/t234/ip/mss_channel/t234_hwpm_ip_mss_channel.h index 28b04d2..0821ee7 100644 --- a/hal/t234/ip/mss_channel/t234_hwpm_ip_mss_channel.h +++ b/hal/t234/ip/mss_channel/t234_hwpm_ip_mss_channel.h @@ -18,10 +18,11 @@ #define T234_HWPM_ACTIVE_IP_MSS_CHANNEL T234_HWPM_IP_MSS_CHANNEL /* This data should ideally be available in HW headers */ -#define T234_HWPM_IP_MSS_CHANNEL_NUM_INSTANCES 1U -#define T234_HWPM_IP_MSS_CHANNEL_NUM_PERFMON_PER_INST 16U -#define T234_HWPM_IP_MSS_CHANNEL_NUM_PERFMUX_PER_INST 16U -#define T234_HWPM_IP_MSS_CHANNEL_NUM_BROADCAST_PER_INST 1U +#define T234_HWPM_IP_MSS_CHANNEL_NUM_INSTANCES 1U +#define T234_HWPM_IP_MSS_CHANNEL_NUM_CORE_ELEMENT_PER_INST 16U +#define T234_HWPM_IP_MSS_CHANNEL_NUM_PERFMON_PER_INST 16U +#define T234_HWPM_IP_MSS_CHANNEL_NUM_PERFMUX_PER_INST 16U +#define T234_HWPM_IP_MSS_CHANNEL_NUM_BROADCAST_PER_INST 1U extern struct hwpm_ip t234_hwpm_ip_mss_channel; diff --git a/hal/t234/ip/mss_gpu_hub/t234_hwpm_ip_mss_gpu_hub.c b/hal/t234/ip/mss_gpu_hub/t234_hwpm_ip_mss_gpu_hub.c index ed1ab96..b1d47fd 100644 --- a/hal/t234/ip/mss_gpu_hub/t234_hwpm_ip_mss_gpu_hub.c +++ b/hal/t234/ip/mss_gpu_hub/t234_hwpm_ip_mss_gpu_hub.c @@ -165,6 +165,8 @@ struct hwpm_ip_inst t234_mss_gpu_hub_inst_static_array[ T234_HWPM_IP_MSS_GPU_HUB_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_MSS_GPU_HUB_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/mss_gpu_hub/t234_hwpm_ip_mss_gpu_hub.h b/hal/t234/ip/mss_gpu_hub/t234_hwpm_ip_mss_gpu_hub.h index 29c5d69..5cc4abf 100644 --- a/hal/t234/ip/mss_gpu_hub/t234_hwpm_ip_mss_gpu_hub.h +++ b/hal/t234/ip/mss_gpu_hub/t234_hwpm_ip_mss_gpu_hub.h @@ -18,10 +18,11 @@ #define T234_HWPM_ACTIVE_IP_MSS_GPU_HUB T234_HWPM_IP_MSS_GPU_HUB /* This data should ideally be available in HW headers */ -#define T234_HWPM_IP_MSS_GPU_HUB_NUM_INSTANCES 1U -#define T234_HWPM_IP_MSS_GPU_HUB_NUM_PERFMON_PER_INST 1U -#define T234_HWPM_IP_MSS_GPU_HUB_NUM_PERFMUX_PER_INST 8U -#define T234_HWPM_IP_MSS_GPU_HUB_NUM_BROADCAST_PER_INST 0U +#define T234_HWPM_IP_MSS_GPU_HUB_NUM_INSTANCES 1U +#define T234_HWPM_IP_MSS_GPU_HUB_NUM_CORE_ELEMENT_PER_INST 8U +#define T234_HWPM_IP_MSS_GPU_HUB_NUM_PERFMON_PER_INST 1U +#define T234_HWPM_IP_MSS_GPU_HUB_NUM_PERFMUX_PER_INST 8U +#define T234_HWPM_IP_MSS_GPU_HUB_NUM_BROADCAST_PER_INST 0U extern struct hwpm_ip t234_hwpm_ip_mss_gpu_hub; diff --git a/hal/t234/ip/mss_iso_niso_hubs/t234_hwpm_ip_mss_iso_niso_hubs.c b/hal/t234/ip/mss_iso_niso_hubs/t234_hwpm_ip_mss_iso_niso_hubs.c index 7299713..2ac5ab9 100644 --- a/hal/t234/ip/mss_iso_niso_hubs/t234_hwpm_ip_mss_iso_niso_hubs.c +++ b/hal/t234/ip/mss_iso_niso_hubs/t234_hwpm_ip_mss_iso_niso_hubs.c @@ -222,6 +222,8 @@ struct hwpm_ip_inst t234_mss_iso_niso_hub_inst_static_array[ T234_HWPM_IP_MSS_ISO_NISO_HUBS_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_MSS_ISO_NISO_HUBS_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/mss_iso_niso_hubs/t234_hwpm_ip_mss_iso_niso_hubs.h b/hal/t234/ip/mss_iso_niso_hubs/t234_hwpm_ip_mss_iso_niso_hubs.h index 20a3bdf..6ee61ee 100644 --- a/hal/t234/ip/mss_iso_niso_hubs/t234_hwpm_ip_mss_iso_niso_hubs.h +++ b/hal/t234/ip/mss_iso_niso_hubs/t234_hwpm_ip_mss_iso_niso_hubs.h @@ -18,10 +18,11 @@ #define T234_HWPM_ACTIVE_IP_MSS_ISO_NISO_HUBS T234_HWPM_IP_MSS_ISO_NISO_HUBS /* This data should ideally be available in HW headers */ -#define T234_HWPM_IP_MSS_ISO_NISO_HUBS_NUM_INSTANCES 1U -#define T234_HWPM_IP_MSS_ISO_NISO_HUBS_NUM_PERFMON_PER_INST 2U -#define T234_HWPM_IP_MSS_ISO_NISO_HUBS_NUM_PERFMUX_PER_INST 9U -#define T234_HWPM_IP_MSS_ISO_NISO_HUBS_NUM_BROADCAST_PER_INST 1U +#define T234_HWPM_IP_MSS_ISO_NISO_HUBS_NUM_INSTANCES 1U +#define T234_HWPM_IP_MSS_ISO_NISO_HUBS_NUM_CORE_ELEMENT_PER_INST 9U +#define T234_HWPM_IP_MSS_ISO_NISO_HUBS_NUM_PERFMON_PER_INST 2U +#define T234_HWPM_IP_MSS_ISO_NISO_HUBS_NUM_PERFMUX_PER_INST 9U +#define T234_HWPM_IP_MSS_ISO_NISO_HUBS_NUM_BROADCAST_PER_INST 1U extern struct hwpm_ip t234_hwpm_ip_mss_iso_niso_hubs; diff --git a/hal/t234/ip/mss_mcf/t234_hwpm_ip_mss_mcf.c b/hal/t234/ip/mss_mcf/t234_hwpm_ip_mss_mcf.c index 42e0634..016207c 100644 --- a/hal/t234/ip/mss_mcf/t234_hwpm_ip_mss_mcf.c +++ b/hal/t234/ip/mss_mcf/t234_hwpm_ip_mss_mcf.c @@ -214,6 +214,8 @@ struct hwpm_ip_inst t234_mss_mcf_inst_static_array[ T234_HWPM_IP_MSS_MCF_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_MSS_MCF_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/mss_mcf/t234_hwpm_ip_mss_mcf.h b/hal/t234/ip/mss_mcf/t234_hwpm_ip_mss_mcf.h index cca7ca5..681b308 100644 --- a/hal/t234/ip/mss_mcf/t234_hwpm_ip_mss_mcf.h +++ b/hal/t234/ip/mss_mcf/t234_hwpm_ip_mss_mcf.h @@ -19,6 +19,7 @@ /* This data should ideally be available in HW headers */ #define T234_HWPM_IP_MSS_MCF_NUM_INSTANCES 1U +#define T234_HWPM_IP_MSS_MCF_NUM_CORE_ELEMENT_PER_INST 8U #define T234_HWPM_IP_MSS_MCF_NUM_PERFMON_PER_INST 3U #define T234_HWPM_IP_MSS_MCF_NUM_PERFMUX_PER_INST 8U #define T234_HWPM_IP_MSS_MCF_NUM_BROADCAST_PER_INST 1U diff --git a/hal/t234/ip/nvdec/t234_hwpm_ip_nvdec.c b/hal/t234/ip/nvdec/t234_hwpm_ip_nvdec.c index eb9115c..8c0e07a 100644 --- a/hal/t234/ip/nvdec/t234_hwpm_ip_nvdec.c +++ b/hal/t234/ip/nvdec/t234_hwpm_ip_nvdec.c @@ -60,6 +60,8 @@ struct hwpm_ip_inst t234_nvdec_inst_static_array[ T234_HWPM_IP_NVDEC_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_NVDEC_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/nvdec/t234_hwpm_ip_nvdec.h b/hal/t234/ip/nvdec/t234_hwpm_ip_nvdec.h index ebe4c33..e7d3023 100644 --- a/hal/t234/ip/nvdec/t234_hwpm_ip_nvdec.h +++ b/hal/t234/ip/nvdec/t234_hwpm_ip_nvdec.h @@ -19,6 +19,7 @@ /* This data should ideally be available in HW headers */ #define T234_HWPM_IP_NVDEC_NUM_INSTANCES 1U +#define T234_HWPM_IP_NVDEC_NUM_CORE_ELEMENT_PER_INST 1U #define T234_HWPM_IP_NVDEC_NUM_PERFMON_PER_INST 1U #define T234_HWPM_IP_NVDEC_NUM_PERFMUX_PER_INST 1U #define T234_HWPM_IP_NVDEC_NUM_BROADCAST_PER_INST 0U diff --git a/hal/t234/ip/nvdla/t234_hwpm_ip_nvdla.c b/hal/t234/ip/nvdla/t234_hwpm_ip_nvdla.c index 3864b7b..6b7a001 100644 --- a/hal/t234/ip/nvdla/t234_hwpm_ip_nvdla.c +++ b/hal/t234/ip/nvdla/t234_hwpm_ip_nvdla.c @@ -98,6 +98,8 @@ struct hwpm_ip_inst t234_nvdla_inst_static_array[ T234_HWPM_IP_NVDLA_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_NVDLA_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -157,6 +159,8 @@ struct hwpm_ip_inst t234_nvdla_inst_static_array[ }, { .hw_inst_mask = BIT(1), + .num_core_elements_per_inst = + T234_HWPM_IP_NVDLA_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/nvdla/t234_hwpm_ip_nvdla.h b/hal/t234/ip/nvdla/t234_hwpm_ip_nvdla.h index 0157ee8..59f071b 100644 --- a/hal/t234/ip/nvdla/t234_hwpm_ip_nvdla.h +++ b/hal/t234/ip/nvdla/t234_hwpm_ip_nvdla.h @@ -19,6 +19,7 @@ /* This data should ideally be available in HW headers */ #define T234_HWPM_IP_NVDLA_NUM_INSTANCES 2U +#define T234_HWPM_IP_NVDLA_NUM_CORE_ELEMENT_PER_INST 1U #define T234_HWPM_IP_NVDLA_NUM_PERFMON_PER_INST 1U #define T234_HWPM_IP_NVDLA_NUM_PERFMUX_PER_INST 1U #define T234_HWPM_IP_NVDLA_NUM_BROADCAST_PER_INST 0U diff --git a/hal/t234/ip/nvenc/t234_hwpm_ip_nvenc.c b/hal/t234/ip/nvenc/t234_hwpm_ip_nvenc.c index c67ebd9..40edb64 100644 --- a/hal/t234/ip/nvenc/t234_hwpm_ip_nvenc.c +++ b/hal/t234/ip/nvenc/t234_hwpm_ip_nvenc.c @@ -60,6 +60,8 @@ struct hwpm_ip_inst t234_nvenc_inst_static_array[ T234_HWPM_IP_NVENC_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_NVENC_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/nvenc/t234_hwpm_ip_nvenc.h b/hal/t234/ip/nvenc/t234_hwpm_ip_nvenc.h index b00a14a..1469122 100644 --- a/hal/t234/ip/nvenc/t234_hwpm_ip_nvenc.h +++ b/hal/t234/ip/nvenc/t234_hwpm_ip_nvenc.h @@ -19,6 +19,7 @@ /* This data should ideally be available in HW headers */ #define T234_HWPM_IP_NVENC_NUM_INSTANCES 1U +#define T234_HWPM_IP_NVENC_NUM_CORE_ELEMENT_PER_INST 1U #define T234_HWPM_IP_NVENC_NUM_PERFMON_PER_INST 1U #define T234_HWPM_IP_NVENC_NUM_PERFMUX_PER_INST 1U #define T234_HWPM_IP_NVENC_NUM_BROADCAST_PER_INST 0U diff --git a/hal/t234/ip/ofa/t234_hwpm_ip_ofa.c b/hal/t234/ip/ofa/t234_hwpm_ip_ofa.c index e4a30c5..e5a9158 100644 --- a/hal/t234/ip/ofa/t234_hwpm_ip_ofa.c +++ b/hal/t234/ip/ofa/t234_hwpm_ip_ofa.c @@ -60,6 +60,8 @@ struct hwpm_ip_inst t234_ofa_inst_static_array[ T234_HWPM_IP_OFA_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_OFA_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/ofa/t234_hwpm_ip_ofa.h b/hal/t234/ip/ofa/t234_hwpm_ip_ofa.h index 6f7d34c..7adde8c 100644 --- a/hal/t234/ip/ofa/t234_hwpm_ip_ofa.h +++ b/hal/t234/ip/ofa/t234_hwpm_ip_ofa.h @@ -18,10 +18,11 @@ #define T234_HWPM_ACTIVE_IP_OFA T234_HWPM_IP_OFA /* This data should ideally be available in HW headers */ -#define T234_HWPM_IP_OFA_NUM_INSTANCES 1U -#define T234_HWPM_IP_OFA_NUM_PERFMON_PER_INST 1U -#define T234_HWPM_IP_OFA_NUM_PERFMUX_PER_INST 1U -#define T234_HWPM_IP_OFA_NUM_BROADCAST_PER_INST 0U +#define T234_HWPM_IP_OFA_NUM_INSTANCES 1U +#define T234_HWPM_IP_OFA_NUM_CORE_ELEMENT_PER_INST 1U +#define T234_HWPM_IP_OFA_NUM_PERFMON_PER_INST 1U +#define T234_HWPM_IP_OFA_NUM_PERFMUX_PER_INST 1U +#define T234_HWPM_IP_OFA_NUM_BROADCAST_PER_INST 0U extern struct hwpm_ip t234_hwpm_ip_ofa; diff --git a/hal/t234/ip/pcie/t234_hwpm_ip_pcie.c b/hal/t234/ip/pcie/t234_hwpm_ip_pcie.c index f2c62b2..24e4b4e 100644 --- a/hal/t234/ip/pcie/t234_hwpm_ip_pcie.c +++ b/hal/t234/ip/pcie/t234_hwpm_ip_pcie.c @@ -440,6 +440,8 @@ struct hwpm_ip_inst t234_pcie_inst_static_array[ T234_HWPM_IP_PCIE_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_PCIE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -499,6 +501,8 @@ struct hwpm_ip_inst t234_pcie_inst_static_array[ }, { .hw_inst_mask = BIT(1), + .num_core_elements_per_inst = + T234_HWPM_IP_PCIE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -558,6 +562,8 @@ struct hwpm_ip_inst t234_pcie_inst_static_array[ }, { .hw_inst_mask = BIT(2), + .num_core_elements_per_inst = + T234_HWPM_IP_PCIE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -617,6 +623,8 @@ struct hwpm_ip_inst t234_pcie_inst_static_array[ }, { .hw_inst_mask = BIT(3), + .num_core_elements_per_inst = + T234_HWPM_IP_PCIE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -676,6 +684,8 @@ struct hwpm_ip_inst t234_pcie_inst_static_array[ }, { .hw_inst_mask = BIT(4), + .num_core_elements_per_inst = + T234_HWPM_IP_PCIE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -735,6 +745,8 @@ struct hwpm_ip_inst t234_pcie_inst_static_array[ }, { .hw_inst_mask = BIT(5), + .num_core_elements_per_inst = + T234_HWPM_IP_PCIE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -794,6 +806,8 @@ struct hwpm_ip_inst t234_pcie_inst_static_array[ }, { .hw_inst_mask = BIT(6), + .num_core_elements_per_inst = + T234_HWPM_IP_PCIE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -853,6 +867,8 @@ struct hwpm_ip_inst t234_pcie_inst_static_array[ }, { .hw_inst_mask = BIT(7), + .num_core_elements_per_inst = + T234_HWPM_IP_PCIE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -912,6 +928,8 @@ struct hwpm_ip_inst t234_pcie_inst_static_array[ }, { .hw_inst_mask = BIT(8), + .num_core_elements_per_inst = + T234_HWPM_IP_PCIE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -971,6 +989,8 @@ struct hwpm_ip_inst t234_pcie_inst_static_array[ }, { .hw_inst_mask = BIT(9), + .num_core_elements_per_inst = + T234_HWPM_IP_PCIE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -1030,6 +1050,8 @@ struct hwpm_ip_inst t234_pcie_inst_static_array[ }, { .hw_inst_mask = BIT(10), + .num_core_elements_per_inst = + T234_HWPM_IP_PCIE_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/pcie/t234_hwpm_ip_pcie.h b/hal/t234/ip/pcie/t234_hwpm_ip_pcie.h index 9ccbacf..e3f461c 100644 --- a/hal/t234/ip/pcie/t234_hwpm_ip_pcie.h +++ b/hal/t234/ip/pcie/t234_hwpm_ip_pcie.h @@ -19,6 +19,7 @@ /* This data should ideally be available in HW headers */ #define T234_HWPM_IP_PCIE_NUM_INSTANCES 11U +#define T234_HWPM_IP_PCIE_NUM_CORE_ELEMENT_PER_INST 1U #define T234_HWPM_IP_PCIE_NUM_PERFMON_PER_INST 1U #define T234_HWPM_IP_PCIE_NUM_PERFMUX_PER_INST 1U #define T234_HWPM_IP_PCIE_NUM_BROADCAST_PER_INST 0U diff --git a/hal/t234/ip/pma/t234_hwpm_ip_pma.c b/hal/t234/ip/pma/t234_hwpm_ip_pma.c index 389233a..5c8e55f 100644 --- a/hal/t234/ip/pma/t234_hwpm_ip_pma.c +++ b/hal/t234/ip/pma/t234_hwpm_ip_pma.c @@ -60,6 +60,8 @@ struct hwpm_ip_inst t234_pma_inst_static_array[ T234_HWPM_IP_PMA_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_PMA_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/pma/t234_hwpm_ip_pma.h b/hal/t234/ip/pma/t234_hwpm_ip_pma.h index adb4964..9484ee1 100644 --- a/hal/t234/ip/pma/t234_hwpm_ip_pma.h +++ b/hal/t234/ip/pma/t234_hwpm_ip_pma.h @@ -17,10 +17,11 @@ #define T234_HWPM_ACTIVE_IP_PMA T234_HWPM_IP_PMA /* This data should ideally be available in HW headers */ -#define T234_HWPM_IP_PMA_NUM_INSTANCES 1U -#define T234_HWPM_IP_PMA_NUM_PERFMON_PER_INST 1U -#define T234_HWPM_IP_PMA_NUM_PERFMUX_PER_INST 1U -#define T234_HWPM_IP_PMA_NUM_BROADCAST_PER_INST 0U +#define T234_HWPM_IP_PMA_NUM_INSTANCES 1U +#define T234_HWPM_IP_PMA_NUM_CORE_ELEMENT_PER_INST 1U +#define T234_HWPM_IP_PMA_NUM_PERFMON_PER_INST 1U +#define T234_HWPM_IP_PMA_NUM_PERFMUX_PER_INST 1U +#define T234_HWPM_IP_PMA_NUM_BROADCAST_PER_INST 0U extern struct hwpm_ip t234_hwpm_ip_pma; diff --git a/hal/t234/ip/pva/t234_hwpm_ip_pva.c b/hal/t234/ip/pva/t234_hwpm_ip_pva.c index 6709dc2..d9c0566 100644 --- a/hal/t234/ip/pva/t234_hwpm_ip_pva.c +++ b/hal/t234/ip/pva/t234_hwpm_ip_pva.c @@ -90,6 +90,8 @@ struct hwpm_ip_inst t234_pva_inst_static_array[ T234_HWPM_IP_PVA_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_PVA_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/pva/t234_hwpm_ip_pva.h b/hal/t234/ip/pva/t234_hwpm_ip_pva.h index 0de8997..b2db845 100644 --- a/hal/t234/ip/pva/t234_hwpm_ip_pva.h +++ b/hal/t234/ip/pva/t234_hwpm_ip_pva.h @@ -18,10 +18,11 @@ #define T234_HWPM_ACTIVE_IP_PVA T234_HWPM_IP_PVA /* This data should ideally be available in HW headers */ -#define T234_HWPM_IP_PVA_NUM_INSTANCES 1U -#define T234_HWPM_IP_PVA_NUM_PERFMON_PER_INST 3U -#define T234_HWPM_IP_PVA_NUM_PERFMUX_PER_INST 1U -#define T234_HWPM_IP_PVA_NUM_BROADCAST_PER_INST 0U +#define T234_HWPM_IP_PVA_NUM_INSTANCES 1U +#define T234_HWPM_IP_PVA_NUM_CORE_ELEMENT_PER_INST 1U +#define T234_HWPM_IP_PVA_NUM_PERFMON_PER_INST 3U +#define T234_HWPM_IP_PVA_NUM_PERFMUX_PER_INST 1U +#define T234_HWPM_IP_PVA_NUM_BROADCAST_PER_INST 0U extern struct hwpm_ip t234_hwpm_ip_pva; diff --git a/hal/t234/ip/rtr/t234_hwpm_ip_rtr.c b/hal/t234/ip/rtr/t234_hwpm_ip_rtr.c index fb89631..6cd53d8 100644 --- a/hal/t234/ip/rtr/t234_hwpm_ip_rtr.c +++ b/hal/t234/ip/rtr/t234_hwpm_ip_rtr.c @@ -63,6 +63,8 @@ struct hwpm_ip_inst t234_rtr_inst_static_array[ T234_HWPM_IP_RTR_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_RTR_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -120,6 +122,8 @@ struct hwpm_ip_inst t234_rtr_inst_static_array[ }, { .hw_inst_mask = BIT(1), + .num_core_elements_per_inst = + T234_HWPM_IP_RTR_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/rtr/t234_hwpm_ip_rtr.h b/hal/t234/ip/rtr/t234_hwpm_ip_rtr.h index cd35f8d..3654b2f 100644 --- a/hal/t234/ip/rtr/t234_hwpm_ip_rtr.h +++ b/hal/t234/ip/rtr/t234_hwpm_ip_rtr.h @@ -17,14 +17,15 @@ #define T234_HWPM_ACTIVE_IP_RTR T234_HWPM_IP_RTR /* This data should ideally be available in HW headers */ -#define T234_HWPM_IP_RTR_NUM_INSTANCES 2U -#define T234_HWPM_IP_RTR_NUM_PERFMON_PER_INST 0U -#define T234_HWPM_IP_RTR_NUM_PERFMUX_PER_INST 1U -#define T234_HWPM_IP_RTR_NUM_BROADCAST_PER_INST 0U +#define T234_HWPM_IP_RTR_NUM_INSTANCES 2U +#define T234_HWPM_IP_RTR_NUM_CORE_ELEMENT_PER_INST 1U +#define T234_HWPM_IP_RTR_NUM_PERFMON_PER_INST 0U +#define T234_HWPM_IP_RTR_NUM_PERFMUX_PER_INST 1U +#define T234_HWPM_IP_RTR_NUM_BROADCAST_PER_INST 0U -#define T234_HWPM_IP_RTR_STATIC_RTR_INST 0U -#define T234_HWPM_IP_RTR_STATIC_PMA_INST 1U -#define T234_HWPM_IP_RTR_PERMUX_INDEX 0U +#define T234_HWPM_IP_RTR_STATIC_RTR_INST 0U +#define T234_HWPM_IP_RTR_STATIC_PMA_INST 1U +#define T234_HWPM_IP_RTR_PERMUX_INDEX 0U extern struct hwpm_ip t234_hwpm_ip_rtr; diff --git a/hal/t234/ip/scf/t234_hwpm_ip_scf.c b/hal/t234/ip/scf/t234_hwpm_ip_scf.c index a48f55f..0d601cd 100644 --- a/hal/t234/ip/scf/t234_hwpm_ip_scf.c +++ b/hal/t234/ip/scf/t234_hwpm_ip_scf.c @@ -41,6 +41,8 @@ struct hwpm_ip_inst t234_scf_inst_static_array[ T234_HWPM_IP_SCF_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_SCF_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/scf/t234_hwpm_ip_scf.h b/hal/t234/ip/scf/t234_hwpm_ip_scf.h index 9d1c6d9..41b39d5 100644 --- a/hal/t234/ip/scf/t234_hwpm_ip_scf.h +++ b/hal/t234/ip/scf/t234_hwpm_ip_scf.h @@ -18,10 +18,11 @@ #define T234_HWPM_ACTIVE_IP_SCF T234_HWPM_IP_SCF /* This data should ideally be available in HW headers */ -#define T234_HWPM_IP_SCF_NUM_INSTANCES 1U -#define T234_HWPM_IP_SCF_NUM_PERFMON_PER_INST 1U -#define T234_HWPM_IP_SCF_NUM_PERFMUX_PER_INST 0U -#define T234_HWPM_IP_SCF_NUM_BROADCAST_PER_INST 0U +#define T234_HWPM_IP_SCF_NUM_INSTANCES 1U +#define T234_HWPM_IP_SCF_NUM_CORE_ELEMENT_PER_INST 1U +#define T234_HWPM_IP_SCF_NUM_PERFMON_PER_INST 1U +#define T234_HWPM_IP_SCF_NUM_PERFMUX_PER_INST 0U +#define T234_HWPM_IP_SCF_NUM_BROADCAST_PER_INST 0U extern struct hwpm_ip t234_hwpm_ip_scf; diff --git a/hal/t234/ip/vi/t234_hwpm_ip_vi.c b/hal/t234/ip/vi/t234_hwpm_ip_vi.c index 9c105c0..f734546 100644 --- a/hal/t234/ip/vi/t234_hwpm_ip_vi.c +++ b/hal/t234/ip/vi/t234_hwpm_ip_vi.c @@ -98,6 +98,8 @@ struct hwpm_ip_inst t234_vi_inst_static_array[ T234_HWPM_IP_VI_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_VI_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to @@ -158,6 +160,8 @@ struct hwpm_ip_inst t234_vi_inst_static_array[ }, { .hw_inst_mask = BIT(1), + .num_core_elements_per_inst = + T234_HWPM_IP_VI_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/vi/t234_hwpm_ip_vi.h b/hal/t234/ip/vi/t234_hwpm_ip_vi.h index b630d7c..9a5730e 100644 --- a/hal/t234/ip/vi/t234_hwpm_ip_vi.h +++ b/hal/t234/ip/vi/t234_hwpm_ip_vi.h @@ -18,10 +18,11 @@ #define T234_HWPM_ACTIVE_IP_VI T234_HWPM_IP_VI /* This data should ideally be available in HW headers */ -#define T234_HWPM_IP_VI_NUM_INSTANCES 2U -#define T234_HWPM_IP_VI_NUM_PERFMON_PER_INST 1U -#define T234_HWPM_IP_VI_NUM_PERFMUX_PER_INST 1U -#define T234_HWPM_IP_VI_NUM_BROADCAST_PER_INST 0U +#define T234_HWPM_IP_VI_NUM_INSTANCES 2U +#define T234_HWPM_IP_VI_NUM_CORE_ELEMENT_PER_INST 1U +#define T234_HWPM_IP_VI_NUM_PERFMON_PER_INST 1U +#define T234_HWPM_IP_VI_NUM_PERFMUX_PER_INST 1U +#define T234_HWPM_IP_VI_NUM_BROADCAST_PER_INST 0U extern struct hwpm_ip t234_hwpm_ip_vi; diff --git a/hal/t234/ip/vic/t234_hwpm_ip_vic.c b/hal/t234/ip/vic/t234_hwpm_ip_vic.c index 3ab44e7..154fcd6 100644 --- a/hal/t234/ip/vic/t234_hwpm_ip_vic.c +++ b/hal/t234/ip/vic/t234_hwpm_ip_vic.c @@ -60,6 +60,8 @@ struct hwpm_ip_inst t234_vic_inst_static_array[ T234_HWPM_IP_VIC_NUM_INSTANCES] = { { .hw_inst_mask = BIT(0), + .num_core_elements_per_inst = + T234_HWPM_IP_VIC_NUM_CORE_ELEMENT_PER_INST, .element_info = { /* * Instance info corresponding to diff --git a/hal/t234/ip/vic/t234_hwpm_ip_vic.h b/hal/t234/ip/vic/t234_hwpm_ip_vic.h index 5f0c728..28f3f07 100644 --- a/hal/t234/ip/vic/t234_hwpm_ip_vic.h +++ b/hal/t234/ip/vic/t234_hwpm_ip_vic.h @@ -18,10 +18,11 @@ #define T234_HWPM_ACTIVE_IP_VIC T234_HWPM_IP_VIC /* This data should ideally be available in HW headers */ -#define T234_HWPM_IP_VIC_NUM_INSTANCES 1U -#define T234_HWPM_IP_VIC_NUM_PERFMON_PER_INST 1U -#define T234_HWPM_IP_VIC_NUM_PERFMUX_PER_INST 1U -#define T234_HWPM_IP_VIC_NUM_BROADCAST_PER_INST 0U +#define T234_HWPM_IP_VIC_NUM_INSTANCES 1U +#define T234_HWPM_IP_VIC_NUM_CORE_ELEMENT_PER_INST 1U +#define T234_HWPM_IP_VIC_NUM_PERFMON_PER_INST 1U +#define T234_HWPM_IP_VIC_NUM_PERFMUX_PER_INST 1U +#define T234_HWPM_IP_VIC_NUM_BROADCAST_PER_INST 0U extern struct hwpm_ip t234_hwpm_ip_vic; diff --git a/hal/t234/t234_hwpm_interface_utils.c b/hal/t234/t234_hwpm_interface_utils.c index e89f783..d505625 100644 --- a/hal/t234/t234_hwpm_interface_utils.c +++ b/hal/t234/t234_hwpm_interface_utils.c @@ -221,11 +221,11 @@ static bool t234_hwpm_validate_hals(struct tegra_soc_hwpm *hwpm) } bool t234_hwpm_is_ip_active(struct tegra_soc_hwpm *hwpm, - u32 ip_index, u32 *config_ip_index) + u32 ip_enum, u32 *config_ip_index) { u32 config_ip = TEGRA_SOC_HWPM_IP_INACTIVE; - switch (ip_index) { + switch (ip_enum) { case TEGRA_SOC_HWPM_IP_VI: #if defined(CONFIG_SOC_HWPM_IP_VI) config_ip = T234_HWPM_IP_VI; @@ -307,8 +307,8 @@ bool t234_hwpm_is_ip_active(struct tegra_soc_hwpm *hwpm, #endif break; default: - tegra_hwpm_err(hwpm, "Queried enum tegra_soc_hwpm_ip %d invalid", - ip_index); + tegra_hwpm_err(hwpm, + "Queried enum tegra_soc_hwpm_ip %d invalid", ip_enum); break; } diff --git a/hal/t234/t234_hwpm_ip_utils.c b/hal/t234/t234_hwpm_ip_utils.c index ba618ff..4e48e1d 100644 --- a/hal/t234/t234_hwpm_ip_utils.c +++ b/hal/t234/t234_hwpm_ip_utils.c @@ -152,10 +152,7 @@ fail: int t234_hwpm_force_enable_ips(struct tegra_soc_hwpm *hwpm) { - u32 i = 0U; int ret = 0; - struct tegra_soc_hwpm_chip *active_chip = hwpm->active_chip; - struct hwpm_ip *chip_ip = NULL; tegra_hwpm_fn(hwpm, " "); @@ -300,13 +297,6 @@ int t234_hwpm_force_enable_ips(struct tegra_soc_hwpm *hwpm) } } - tegra_hwpm_dbg(hwpm, hwpm_verbose, "IP floorsweep info:"); - for (i = 0U; i < active_chip->get_ip_max_idx(hwpm); i++) { - chip_ip = active_chip->chip_ips[i]; - tegra_hwpm_dbg(hwpm, hwpm_verbose, "IP:%d fs_mask:0x%x", - i, chip_ip->inst_fs_mask); - } - fail: return ret; } @@ -314,41 +304,40 @@ fail: int t234_hwpm_get_fs_info(struct tegra_soc_hwpm *hwpm, u32 ip_enum, u64 *fs_mask, u8 *ip_status) { - u32 ip_idx = 0U; + u32 ip_idx = 0U, inst_idx = 0U, element_mask_shift = 0U; + u64 floorsweep = 0ULL; struct tegra_soc_hwpm_chip *active_chip = NULL; struct hwpm_ip *chip_ip = NULL; struct hwpm_ip_inst *ip_inst = NULL; tegra_hwpm_fn(hwpm, " "); - /* Convert tegra_soc_hwpm_ip to internal enum */ + /* Convert tegra_soc_hwpm_ip enum to internal ip index */ if (!(t234_hwpm_is_ip_active(hwpm, ip_enum, &ip_idx))) { tegra_hwpm_dbg(hwpm, hwpm_info, - "SOC hwpm IP %d is not configured", ip_enum); + "SOC hwpm IP %d is unavailable", ip_enum); *ip_status = TEGRA_SOC_HWPM_IP_STATUS_INVALID; *fs_mask = 0ULL; - /* Remove after uapi update */ - if (ip_enum == TEGRA_SOC_HWPM_IP_MSS_NVLINK) { - tegra_hwpm_dbg(hwpm, hwpm_verbose, - "For hwpm IP %d setting status as valid", - ip_enum); - *ip_status = TEGRA_SOC_HWPM_IP_STATUS_VALID; - } return 0; } active_chip = hwpm->active_chip; chip_ip = active_chip->chip_ips[ip_idx]; - ip_inst = &chip_ip->ip_inst_static_array[0U]; - /* TODO: Update after fS IOCTL discussion */ - if (ip_idx == T234_HWPM_IP_MSS_CHANNEL) { - *fs_mask = ip_inst->element_fs_mask; - } else { - *fs_mask = chip_ip->inst_fs_mask; - } - *ip_status = TEGRA_SOC_HWPM_IP_STATUS_VALID; + for (inst_idx = 0U; inst_idx < chip_ip->num_instances; inst_idx++) { + ip_inst = &chip_ip->ip_inst_static_array[inst_idx]; + element_mask_shift = (inst_idx == 0U ? + 0U : ip_inst->num_core_elements_per_inst); + + if (ip_inst->hw_inst_mask & chip_ip->inst_fs_mask) { + floorsweep = (floorsweep << element_mask_shift); + floorsweep |= ((u64)ip_inst->element_fs_mask); + } + } + + *fs_mask = floorsweep; + *ip_status = TEGRA_SOC_HWPM_IP_STATUS_VALID; return 0; } diff --git a/include/tegra_hwpm.h b/include/tegra_hwpm.h index ef4a1be..5b4f23a 100644 --- a/include/tegra_hwpm.h +++ b/include/tegra_hwpm.h @@ -223,6 +223,15 @@ struct hwpm_ip_inst { */ u32 hw_inst_mask; + /* + * An IP instance is a group of core elements of the IP + * Eg., channels in MSS, controllers in PCIe + * Performance tracking is counted by 0, 1 or more HWPM components + * (perfmux/perfmon) connected to each IP core element. + * + */ + u32 num_core_elements_per_inst; + /* Element details specific to this instance */ struct hwpm_ip_element_info element_info[TEGRA_HWPM_APERTURE_TYPE_MAX]; diff --git a/os/linux/tegra_hwpm_ip.c b/os/linux/tegra_hwpm_ip.c index 8b0554c..a8ad1ab 100644 --- a/os/linux/tegra_hwpm_ip.c +++ b/os/linux/tegra_hwpm_ip.c @@ -145,30 +145,3 @@ void tegra_soc_hwpm_ip_unregister(struct tegra_soc_hwpm_ip_ops *hwpm_ip_ops) } } } - -int tegra_hwpm_get_floorsweep_info(struct tegra_soc_hwpm *hwpm, - struct tegra_soc_hwpm_ip_floorsweep_info *fs_info) -{ - int ret = 0; - u32 i = 0U; - - tegra_hwpm_fn(hwpm, " "); - - for (i = 0U; i < fs_info->num_queries; i++) { - ret = hwpm->active_chip->get_fs_info( - hwpm, (u32)fs_info->ip_fsinfo[i].ip_type, - &fs_info->ip_fsinfo[i].ip_inst_mask, - &fs_info->ip_fsinfo[i].status); - if (ret < 0) { - /* Print error for debug purpose. */ - tegra_hwpm_err(hwpm, "Failed to get fs_info"); - } - - tegra_hwpm_dbg(hwpm, hwpm_verbose, - "Query %d: ip_type %d: ip_status: %d inst_mask 0x%llx", - i, fs_info->ip_fsinfo[i].ip_type, - fs_info->ip_fsinfo[i].status, - fs_info->ip_fsinfo[i].ip_inst_mask); - } - return ret; -}