Files
linux-nvgpu/drivers/gpu/nvgpu/hal/pramin/pramin_init.c
Sagar Kamble 08add88e1d gpu: nvgpu: remove dgpu hal and sw from the safety build
Since dGPU support is not required for initial safety release, compile
out dGPU sw and hal implementations except below files that are used
by gv11b currently: acr_sw_gv100.c, engine_status_gv100.c, gr_gv100.c
gr_config_gv100.c and hwpm_map_gv100.c.

JIRA NVGPU-3062

Change-Id: I8a6bc8b235e7e5eac5b0e76147b8bd12f9abbd2d
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2119586
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-05-23 10:07:31 -07:00

53 lines
1.7 KiB
C

/*
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include <nvgpu/gk20a.h>
#include "pramin_init.h"
#include "pramin_gp10b.h"
#ifdef NVGPU_DGPU_SUPPORT
#include "pramin_gv100.h"
#include "pramin_tu104.h"
#endif
void nvgpu_pramin_ops_init(struct gk20a *g)
{
u32 ver = g->params.gpu_arch + g->params.gpu_impl;
switch (ver) {
case NVGPU_GPUID_GP10B:
g->ops.pramin.data032_r = gp10b_pramin_data032_r;
break;
#ifdef NVGPU_DGPU_SUPPORT
case NVGPU_GPUID_GV100:
g->ops.pramin.data032_r = gv100_pramin_data032_r;
break;
case NVGPU_GPUID_TU104:
g->ops.pramin.data032_r = tu104_pramin_data032_r;
break;
#endif
default:
g->ops.pramin.data032_r = NULL;
break;
}
}