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/gk20a.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 7b0db427..419b8675 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -1299,7 +1299,7 @@ static int gk20a_probe(struct platform_device *dev) platform_set_drvdata(dev, platform); - if (platform->virtual_dev) + if (gk20a_gpu_is_virtual(dev)) return vgpu_probe(dev); gk20a = kzalloc(sizeof(struct gk20a), GFP_KERNEL); @@ -1449,7 +1449,7 @@ static int __exit gk20a_remove(struct platform_device *dev) gk20a_dbg_fn(""); - if (platform->virtual_dev) + if (gk20a_gpu_is_virtual(dev)) return vgpu_remove(dev); if (platform->has_cde) @@ -1527,7 +1527,9 @@ int gk20a_busy(struct platform_device *pdev) { int ret = 0; struct gk20a *g = get_gk20a(pdev); +#ifdef CONFIG_PM_RUNTIME struct gk20a_platform *platform = gk20a_get_platform(pdev); +#endif down_read(&g->busy_lock); @@ -1549,7 +1551,7 @@ int gk20a_busy(struct platform_device *pdev) } #else if (!g->power_on) { - ret = platform->virtual_dev ? + ret = gk20a_gpu_is_virtual(pdev) ? vgpu_pm_finalize_poweron(&pdev->dev) : gk20a_pm_finalize_poweron(&pdev->dev); if (ret) -- cgit v1.2.2