From 769ec3f88b39c929fa4762a9321e3d3c582ea13d Mon Sep 17 00:00:00 2001 From: mpoojary Date: Mon, 25 Apr 2022 07:44:37 +0000 Subject: [PATCH] gpu: nvgpu: pmu: Add support to set nvgpu_next pmu init Select nvgpu_next_pmu_init when config_next flag is set. This will let pmu load nvgpu_next binaries. Bug 3579665 Change-Id: Ifc15ba1ff5eacfba22de9676d5fe93beda608153 Signed-off-by: mpoojary Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2702292 Reviewed-by: Antony Clince Alex Reviewed-by: Mahantesh Kumbar Reviewed-by: Vijayakumar Subbu GVS: Gerrit_Virtual_Submit Tested-by: Seema Khowala --- drivers/gpu/nvgpu/common/pmu/fw/fw.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/nvgpu/common/pmu/fw/fw.c b/drivers/gpu/nvgpu/common/pmu/fw/fw.c index 12e3da736..3ea8f2814 100644 --- a/drivers/gpu/nvgpu/common/pmu/fw/fw.c +++ b/drivers/gpu/nvgpu/common/pmu/fw/fw.c @@ -33,6 +33,10 @@ #include #include +#if defined(CONFIG_NVGPU_NON_FUSA) && defined(CONFIG_NVGPU_NEXT) +#include +#endif + /* PMU UCODE IMG */ #define NVGPU_PMU_UCODE_IMAGE "gpmu_ucode_image.bin" #define NVGPU_PMU_UCODE_DESC "gpmu_ucode_desc.bin" @@ -325,10 +329,14 @@ int nvgpu_pmu_init_pmu_fw(struct gk20a *g, struct nvgpu_pmu *pmu, NVGPU_PMU_UCODE_NEXT_SIG); } else { nvgpu_pmu_dbg(g, "FW read for PROD RISCV/PKC"); +#if defined(CONFIG_NVGPU_NON_FUSA) && defined(CONFIG_NVGPU_NEXT) + err = nvgpu_next_pmu_load_fw(g); +#else err = pmu_fw_read(g, NVGPU_PMU_UCODE_NEXT_PROD_IMAGE, NVGPU_PMU_UCODE_NEXT_PROD_DESC, NVGPU_PMU_UCODE_NEXT_PROD_SIG); +#endif } } else { nvgpu_pmu_dbg(g, "FW read for Falcon/AES\n");