From e1438818b90c5b0d73aae800b12bd6b36aec5142 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Thu, 21 Jul 2016 16:51:40 -0700 Subject: 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 Reviewed-on: http://git-master/r/1185206 GVS: Gerrit_Virtual_Submit Reviewed-by: Vladislav Buzov --- drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c') diff --git a/drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c b/drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c index bd1a7451..634932b7 100644 --- a/drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/fecs_trace_vgpu.c @@ -106,7 +106,7 @@ static int vgpu_fecs_trace_enable(struct gk20a *g) { struct tegra_vgpu_cmd_msg msg = { .cmd = TEGRA_VGPU_CMD_FECS_TRACE_ENABLE, - .handle = gk20a_get_platform(g->dev)->virt_handle, + .handle = vgpu_get_handle(g), }; int err; @@ -120,7 +120,7 @@ static int vgpu_fecs_trace_disable(struct gk20a *g) { struct tegra_vgpu_cmd_msg msg = { .cmd = TEGRA_VGPU_CMD_FECS_TRACE_DISABLE, - .handle = gk20a_get_platform(g->dev)->virt_handle, + .handle = vgpu_get_handle(g), }; int err; @@ -134,7 +134,7 @@ static int vgpu_fecs_trace_poll(struct gk20a *g) { struct tegra_vgpu_cmd_msg msg = { .cmd = TEGRA_VGPU_CMD_FECS_TRACE_POLL, - .handle = gk20a_get_platform(g->dev)->virt_handle, + .handle = vgpu_get_handle(g), }; int err; @@ -190,7 +190,7 @@ static int vgpu_fecs_trace_set_filter(struct gk20a *g, { struct tegra_vgpu_cmd_msg msg = { .cmd = TEGRA_VGPU_CMD_FECS_TRACE_SET_FILTER, - .handle = gk20a_get_platform(g->dev)->virt_handle, + .handle = vgpu_get_handle(g), }; struct tegra_vgpu_fecs_trace_filter *p = &msg.params.fecs_trace_filter; int err; -- cgit v1.2.2