From 57fb527a7e33384341fc18f1f918d5a8225057f5 Mon Sep 17 00:00:00 2001 From: Peter Daifuku Date: Fri, 6 Oct 2017 16:27:14 -0700 Subject: gpu: nvgpu: vgpu: flatten out vgpu hal Instead of calling the native HAL init function then adding multiple layers of modification for VGPU, flatten out the sequence so that all entry points are set statically and visible in a single file. JIRA ESRM-30 Change-Id: Ie424abb48bce5038874851d399baac5e4bb7d27c Signed-off-by: Peter Daifuku Reviewed-on: https://git-master.nvidia.com/r/1574616 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/vgpu/tsg_vgpu.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/tsg_vgpu.c') diff --git a/drivers/gpu/nvgpu/vgpu/tsg_vgpu.c b/drivers/gpu/nvgpu/vgpu/tsg_vgpu.c index 39d78983..2be102e3 100644 --- a/drivers/gpu/nvgpu/vgpu/tsg_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/tsg_vgpu.c @@ -27,10 +27,11 @@ #include "gk20a/platform_gk20a.h" #include "gk20a/tsg_gk20a.h" #include "vgpu.h" +#include "fifo_vgpu.h" #include -static int vgpu_tsg_open(struct tsg_gk20a *tsg) +int vgpu_tsg_open(struct tsg_gk20a *tsg) { struct tegra_vgpu_cmd_msg msg = {}; struct tegra_vgpu_tsg_open_params *p = @@ -52,7 +53,7 @@ static int vgpu_tsg_open(struct tsg_gk20a *tsg) return err; } -static int vgpu_tsg_bind_channel(struct tsg_gk20a *tsg, +int vgpu_tsg_bind_channel(struct tsg_gk20a *tsg, struct channel_gk20a *ch) { struct tegra_vgpu_cmd_msg msg = {}; @@ -82,7 +83,7 @@ static int vgpu_tsg_bind_channel(struct tsg_gk20a *tsg, return err; } -static int vgpu_tsg_unbind_channel(struct channel_gk20a *ch) +int vgpu_tsg_unbind_channel(struct channel_gk20a *ch) { struct tegra_vgpu_cmd_msg msg = {}; struct tegra_vgpu_tsg_bind_unbind_channel_params *p = @@ -105,7 +106,7 @@ static int vgpu_tsg_unbind_channel(struct channel_gk20a *ch) return err; } -static int vgpu_tsg_set_timeslice(struct tsg_gk20a *tsg, u32 timeslice) +int vgpu_tsg_set_timeslice(struct tsg_gk20a *tsg, u32 timeslice) { struct tegra_vgpu_cmd_msg msg = {0}; struct tegra_vgpu_tsg_timeslice_params *p = @@ -126,11 +127,3 @@ static int vgpu_tsg_set_timeslice(struct tsg_gk20a *tsg, u32 timeslice) return err; } - -void vgpu_init_tsg_ops(struct gpu_ops *gops) -{ - gops->fifo.tsg_bind_channel = vgpu_tsg_bind_channel; - gops->fifo.tsg_unbind_channel = vgpu_tsg_unbind_channel; - gops->fifo.tsg_set_timeslice = vgpu_tsg_set_timeslice; - gops->fifo.tsg_open = vgpu_tsg_open; -} -- cgit v1.2.2