summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c
diff options
context:
space:
mode:
authorRichard Zhao <rizhao@nvidia.com>2016-07-21 19:51:40 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-08-15 14:41:16 -0400
commite1438818b90c5b0d73aae800b12bd6b36aec5142 (patch)
treef0582cda23552526c3067e90f4cb74b461d50d73 /drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c
parent33ff34887f560449828e79170a2a36a97496eeec (diff)
gpu: nvgpu: vgpu: add vgpu private data and helper functions
Move vgpu private data to a dedicated structure and allocate it at probe time. Also add virt_handle helper function which is used everywhere. JIRA VFND-2103 Change-Id: I125911420be72ca9be948125d8357fa85d1d3afd Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: http://git-master/r/1185206 GVS: Gerrit_Virtual_Submit Reviewed-by: Vladislav Buzov <vbuzov@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c b/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c
index fb1f31d8..aaddd218 100644
--- a/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c
+++ b/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c
@@ -20,12 +20,11 @@
20 20
21static void vgpu_gm20b_detect_sm_arch(struct gk20a *g) 21static void vgpu_gm20b_detect_sm_arch(struct gk20a *g)
22{ 22{
23 struct gk20a_platform *platform = gk20a_get_platform(g->dev);
24 u32 v = 0; 23 u32 v = 0;
25 24
26 gk20a_dbg_fn(""); 25 gk20a_dbg_fn("");
27 26
28 if (vgpu_get_attribute(platform->virt_handle, 27 if (vgpu_get_attribute(vgpu_get_handle(g),
29 TEGRA_VGPU_ATTRIB_GPC0_TPC0_SM_ARCH, &v)) 28 TEGRA_VGPU_ATTRIB_GPC0_TPC0_SM_ARCH, &v))
30 gk20a_err(dev_from_gk20a(g), "failed to retrieve SM arch"); 29 gk20a_err(dev_from_gk20a(g), "failed to retrieve SM arch");
31 30