From 5bac50c04406dd88bd4aad285601067620c540d4 Mon Sep 17 00:00:00 2001 From: Aingara Paramakuru Date: Mon, 3 Nov 2014 11:55:48 -0500 Subject: gpu: nvgpu: vgpu: debugger interface fixes To run CUDA apps, the following minimal changes have been made: - power-gating is disabled for vgpu - regop rd/wr returns -ENOSYS Tools (debugger/profiler) support is known to not work and not needed at this time. Bug 200043227 Change-Id: I923caad78450e72d310fb9290cf2849ed5460ad5 Signed-off-by: Aingara Paramakuru Reviewed-on: http://git-master/r/592878 Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c index bd24e269..72998280 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c @@ -90,6 +90,11 @@ static int gk20a_dbg_gpu_do_dev_open(struct inode *inode, dbg_session->g = g; dbg_session->is_profiler = is_profiler; dbg_session->is_pg_disabled = false; + /* For vgpu, all power-gating features are currently disabled + * in the server. Set is_pg_disable to true to reflect this + * on the client side. */ + if (gk20a_gpu_is_virtual(pdev)) + dbg_session->is_pg_disabled = true; INIT_LIST_HEAD(&dbg_session->dbg_s_list_node); init_waitqueue_head(&dbg_session->dbg_events.wait_queue); @@ -492,7 +497,8 @@ static int nvgpu_ioctl_channel_reg_ops(struct dbg_session_gk20a *dbg_s, } /* be sure that ctx info is in place */ - if (!gr_context_info_available(dbg_s, &g->gr)) { + if (!gk20a_gpu_is_virtual(dbg_s->pdev) && + !gr_context_info_available(dbg_s, &g->gr)) { gk20a_err(dev, "gr context data not available\n"); return -ENODEV; } -- cgit v1.2.2