gpu: nvgpu: vgpu: enable subctx for gv11b

Add vgpu_gv11b_init_gpu_characteristics() and enable
NVGPU_SUPPORT_TSG_SUBCONTEXTS

Jira VFND-3797
Jira EVLR-1751

Change-Id: I288ac062e42ec399a302d693471b50b58c9a2653
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1543015
Reviewed-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Thomas Fleury
2017-08-21 15:38:23 -07:00
committed by mobile promotions
parent 738bee0373
commit f7f325deb9
4 changed files with 64 additions and 1 deletions

View File

@@ -38,6 +38,7 @@ nvgpu-$(CONFIG_TEGRA_GK20A_NVHOST) += common/linux/nvhost_t19x.o
nvgpu-$(CONFIG_TEGRA_GR_VIRTUALIZATION) += \
vgpu/gv11b/platform_gv11b_vgpu_tegra.o \
vgpu/gv11b/vgpu_gv11b.o \
vgpu/gv11b/vgpu_hal_gv11b.o \
vgpu/gv11b/vgpu_gr_gv11b.o \
vgpu/gv11b/vgpu_fifo_gv11b.o \

View File

@@ -0,0 +1,40 @@
/*
* Copyright (c) 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 <nvgpu/enabled.h>
#include <nvgpu/enabled_t19x.h>
#include "vgpu/vgpu.h"
#include "vgpu_gv11b.h"
int vgpu_gv11b_init_gpu_characteristics(struct gk20a *g)
{
int err;
gk20a_dbg_fn("");
nvgpu_err(g, "g->gpu_characteristics.flags=%llx",
g->gpu_characteristics.flags);
err = vgpu_init_gpu_characteristics(g);
if (err) {
nvgpu_err(g, "vgpu_init_gpu_characteristics failed, err %d\n", err);
return err;
}
__nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true);
return 0;
}

View File

@@ -0,0 +1,21 @@
/*
* Copyright (c) 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.
*/
#ifndef _VGPU_GV11B_H_
#define _VGPU_GV11B_H_
struct gk20a;
int vgpu_gv11b_init_gpu_characteristics(struct gk20a *g);
#endif

View File

@@ -78,6 +78,7 @@
#include <nvgpu/enabled.h>
#include "vgpu_gv11b.h"
#include "vgpu_gr_gv11b.h"
#include "vgpu_fifo_gv11b.h"
#include "vgpu_subctx_gv11b.h"
@@ -551,7 +552,7 @@ static const struct gpu_ops vgpu_gv11b_ops = {
.priv_ring = {
.isr = gp10b_priv_ring_isr,
},
.chip_init_gpu_characteristics = vgpu_init_gpu_characteristics,
.chip_init_gpu_characteristics = vgpu_gv11b_init_gpu_characteristics,
.get_litter_value = gv11b_get_litter_value,
};