gpu: nvgpu: add ops to support t19x ce changes

JIRA GPUT19X-46

Change-Id: Idd17f2f644da1bbb8d31a55ac91561b25ff68aac
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1509749
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Seema Khowala
2017-06-27 16:33:19 -07:00
committed by mobile promotions
parent 843d3784c4
commit eabf3541ea
3 changed files with 13 additions and 0 deletions

View File

@@ -155,6 +155,7 @@ struct gpu_ops {
struct {
void (*isr_stall)(struct gk20a *g, u32 inst_id, u32 pri_base);
int (*isr_nonstall)(struct gk20a *g, u32 inst_id, u32 pri_base);
u32 (*get_num_pce)(struct gk20a *g);
} ce2;
struct {
int (*init_fs_state)(struct gk20a *g);
@@ -499,6 +500,10 @@ struct gpu_ops {
unsigned int (*handle_pbdma_intr_1)(struct gk20a *g,
u32 pbdma_id, u32 pbdma_intr_1,
u32 *handled, u32 *error_notifier);
void (*init_eng_method_buffers)(struct gk20a *g,
struct tsg_gk20a *tsg);
void (*deinit_eng_method_buffers)(struct gk20a *g,
struct tsg_gk20a *tsg);
#ifdef CONFIG_TEGRA_GK20A_NVHOST
int (*alloc_syncpt_buf)(struct channel_gk20a *c,
u32 syncpt_id, struct nvgpu_mem *syncpt_buf);

View File

@@ -268,6 +268,9 @@ struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g)
tsg->runlist_id = ~0;
tsg->tgid = current->tgid;
if (g->ops.fifo.init_eng_method_buffers)
g->ops.fifo.init_eng_method_buffers(g, tsg);
if (g->ops.fifo.tsg_open) {
err = g->ops.fifo.tsg_open(tsg);
if (err) {
@@ -298,6 +301,10 @@ void gk20a_tsg_release(struct kref *ref)
gr_gk20a_free_tsg_gr_ctx(tsg);
tsg->tsg_gr_ctx = NULL;
}
if (g->ops.fifo.deinit_eng_method_buffers)
g->ops.fifo.deinit_eng_method_buffers(g, tsg);
if (tsg->vm) {
nvgpu_vm_put(tsg->vm);
tsg->vm = NULL;

View File

@@ -59,6 +59,7 @@ struct tsg_gk20a {
u32 runlist_id;
pid_t tgid;
struct nvgpu_mem *eng_method_buffers;
};
int gk20a_enable_tsg(struct tsg_gk20a *tsg);