From 2a80ecff2ce4cf9b2328de55571ae6f177ce142b Mon Sep 17 00:00:00 2001
From: dt
Date: Thu, 25 Jun 2020 10:10:56 +0000
Subject: [PATCH] gpu: nvgpu: Add DGPU_NEXT BIOS support
This adds bios support for DGPU_NEXT.
JIRA NVGPU-5534
Change-Id: Iab1150d3e9644906ff0a44eced4411d77d12eb1b
Signed-off-by: dt
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2366635
Reviewed-by: automaticguardword
Reviewed-by: svc-mobile-coverity
Reviewed-by: svc-mobile-misra
Reviewed-by: svc-mobile-cert
Reviewed-by: Deepak Nibade
Reviewed-by: mobile promotions
Tested-by: mobile promotions
GVS: Gerrit_Virtual_Submit
---
drivers/gpu/nvgpu/common/vbios/bios.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/gpu/nvgpu/common/vbios/bios.c b/drivers/gpu/nvgpu/common/vbios/bios.c
index 404cc6d4f..937d74722 100644
--- a/drivers/gpu/nvgpu/common/vbios/bios.c
+++ b/drivers/gpu/nvgpu/common/vbios/bios.c
@@ -31,6 +31,10 @@
#include "bios_sw_gv100.h"
#include "bios_sw_tu104.h"
+#if defined(CONFIG_NVGPU_NEXT) && defined(CONFIG_NVGPU_NON_FUSA)
+#include "nvgpu_next_gpuid.h"
+#endif
+
static void nvgpu_bios_parse_bit(struct gk20a *g, u32 offset);
int nvgpu_bios_devinit(struct gk20a *g,
@@ -69,6 +73,9 @@ bool nvgpu_bios_check_dgpu(struct gk20a *g, u32 ver)
case NVGPU_GPUID_GV100:
case NVGPU_GPUID_TU104:
+#if defined(CONFIG_NVGPU_NEXT) && defined(CONFIG_NVGPU_NON_FUSA)
+ case NVGPU_NEXT_DGPU_GPUID:
+#endif
is_supported = true;
break;
@@ -189,6 +196,17 @@ int nvgpu_bios_sw_init(struct gk20a *g)
case NVGPU_GPUID_TU104:
nvgpu_tu104_bios_sw_init(g, g->bios);
break;
+
+#if defined(CONFIG_NVGPU_NEXT) && defined(CONFIG_NVGPU_NON_FUSA)
+ case NVGPU_NEXT_DGPU_GPUID:
+ /*
+ * TODO
+ * After IFR region removal from bios image this can
+ * be replaced with nvgpu_tu104_bios_sw_init.
+ */
+ err = tu104_bios_verify_devinit(g);
+ break;
+#endif
#endif
default:
goto clean_bios;