gpu: nvgpu: vgpu: add vgpu-next support for hal init

vgpu-next is enabled only for internal build.

Jira GVSCI-15646

Change-Id: I5a829a91da2ca0f4f4d445f5337be8983baab36d
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2840221
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Austin Tajiri <atajiri@nvidia.com>
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Aparna Das <aparnad@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Richard Zhao
2023-01-06 16:21:10 -08:00
committed by mobile promotions
parent 315813beac
commit 4ed84db8a5

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"), * copy of this software and associated documentation files (the "Software"),
@@ -32,11 +32,22 @@
#include "vgpu_hal_ga10b.h" #include "vgpu_hal_ga10b.h"
#endif #endif
#if defined(CONFIG_NVGPU_NON_FUSA) && defined(CONFIG_NVGPU_NEXT)
#include <nvgpu_next_hal_init.h>
#endif
int vgpu_init_hal(struct gk20a *g) int vgpu_init_hal(struct gk20a *g)
{ {
u32 ver = g->params.gpu_arch + g->params.gpu_impl; u32 ver = g->params.gpu_arch + g->params.gpu_impl;
int err; int err;
#if defined(CONFIG_NVGPU_HAL_NON_FUSA) && defined(CONFIG_NVGPU_NEXT)
err = vgpu_next_init_hal(g);
if (err != -ENODEV) {
return err;
}
#endif
switch (ver) { switch (ver) {
#ifdef CONFIG_NVGPU_HAL_NON_FUSA #ifdef CONFIG_NVGPU_HAL_NON_FUSA
case NVGPU_GPUID_GV11B: case NVGPU_GPUID_GV11B: