Files
linux-nvgpu/drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c
Sunny He 6431ec360b gpu: nvgpu: Reorg gr_ctx HAL initialization
Reorganize HAL initialization to remove inheritance and construct
the gpu_ops struct at compile time. This patch only covers the
gr_ctx sub-module of the gpu_ops struct.

Perform HAL function assignments in hal_gxxxx.c through the
population of a chip-specific copy of gpu_ops.

Jira NVGPU-74

Change-Id: I783d8e8919d8694ad2aa0d285e4c5a2b62580f48
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1527417
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2017-07-27 16:34:43 -07:00

43 lines
1.1 KiB
C

/*
* GP106 Graphics Context
*
* Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#include "gk20a/gk20a.h"
#include "gr_ctx_gp106.h"
int gr_gp106_get_netlist_name(struct gk20a *g, int index, char *name)
{
u32 ver = g->gpu_characteristics.arch + g->gpu_characteristics.impl;
switch (ver) {
case NVGPU_GPUID_GP104:
sprintf(name, "%s/%s", "gp104",
GP104_NETLIST_IMAGE_FW_NAME);
break;
case NVGPU_GPUID_GP106:
sprintf(name, "%s/%s", "gp106",
GP106_NETLIST_IMAGE_FW_NAME);
break;
default:
nvgpu_err(g, "no support for GPUID %x", ver);
}
return 0;
}
bool gr_gp106_is_firmware_defined(void)
{
return true;
}