From e175580d52759c4faa0e05eb728340b31fa7c4d6 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 23 Jun 2016 09:22:33 -0700 Subject: gpu: nvgpu: vgpu: Add CE engine to engine list Initialize CE engine also for gp10b. Change-Id: Ibce2f80b523a09fb1345995c03c5430f3b20844f Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1170453 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Aingara Paramakuru Tested-by: Aingara Paramakuru GVS: Gerrit_Virtual_Submit Reviewed-by: Lakshmanan M --- drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fifo_gp10b.c | 30 +++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/vgpu') diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fifo_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fifo_gp10b.c index 34d942c1..23d945fb 100644 --- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fifo_gp10b.c +++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fifo_gp10b.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2015-2016, 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, @@ -13,8 +13,36 @@ #include "vgpu_fifo_gp10b.h" +static int vgpu_gp10b_fifo_init_engine_info(struct fifo_gk20a *f) +{ + struct fifo_engine_info_gk20a *gr_info; + struct fifo_engine_info_gk20a *ce_info; + const u32 gr_sw_id = ENGINE_GR_GK20A; + const u32 ce_sw_id = ENGINE_GRCE_GK20A; + + gk20a_dbg_fn(""); + + f->num_engines = 2; + + gr_info = &f->engine_info[0]; + + /* FIXME: retrieve this from server */ + gr_info->runlist_id = 0; + gr_info->engine_enum = gr_sw_id; + f->active_engines_list[0] = 0; + + ce_info = &f->engine_info[1]; + ce_info->runlist_id = 0; + ce_info->inst_id = 0; + ce_info->engine_enum = ce_sw_id; + f->active_engines_list[1] = 1; + + return 0; +} + void vgpu_gp10b_init_fifo_ops(struct gpu_ops *gops) { /* syncpoint protection not supported yet */ + gops->fifo.init_engine_info = vgpu_gp10b_fifo_init_engine_info; gops->fifo.resetup_ramfc = NULL; } -- cgit v1.2.2