tegra: hwpm: Add HWPM-NVDEC registration mechanism

- Add support to extend NVDEC IP for HWPM profiling.

DOS-SHR-7601

Change-Id: I93efd02b348829c33d9ba90cfc39b8b824f64347
Signed-off-by: vasukis <vasukis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2983398
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
vasukis
2023-09-21 19:48:28 +00:00
committed by mobile promotions
parent 35ac3d9d5e
commit 610533a15d

View File

@@ -340,6 +340,8 @@ static u32 virt_engine_get_ip_index(const char *name)
return (u32)TEGRA_SOC_HWPM_RESOURCE_NVENC; return (u32)TEGRA_SOC_HWPM_RESOURCE_NVENC;
} else if (strstr(name, "ofa")) { } else if (strstr(name, "ofa")) {
return (u32)TEGRA_SOC_HWPM_RESOURCE_OFA; return (u32)TEGRA_SOC_HWPM_RESOURCE_OFA;
} else if (strstr(name, "nvdec")) {
return (u32)TEGRA_SOC_HWPM_RESOURCE_NVDEC;
} }
return (u32)TERGA_SOC_HWPM_NUM_IPS; return (u32)TERGA_SOC_HWPM_NUM_IPS;
} }
@@ -356,6 +358,8 @@ static u32 virt_engine_extract_base_addr(struct platform_device *pdev)
base_address = 0x154c0000; base_address = 0x154c0000;
} else if (hwpm_ip_index == TEGRA_SOC_HWPM_RESOURCE_OFA) { } else if (hwpm_ip_index == TEGRA_SOC_HWPM_RESOURCE_OFA) {
base_address = 0x15a50000; base_address = 0x15a50000;
} else if (hwpm_ip_index == TEGRA_SOC_HWPM_RESOURCE_NVDEC) {
base_address = 0x15480000;
} else { } else {
dev_err(&pdev->dev, "IP Base address not found"); dev_err(&pdev->dev, "IP Base address not found");
return -ENOMEM; return -ENOMEM;