gpu: nvgpu: vgpu: cleanup vgpu.h

- delete vgpu_is_reduced_bar1(). Current implementation maps only
that portion of BAR1 that is reserved for guest in case of
reduced BAR1. However this code is obsolete and reduced BAR1
check is always false. Delete related function vgpu_is_reduced_bar1()
and conditional mapping.

- move vgpu_mm_bar1_map_userd() delcaration from vgpu.h
to mm_vgpu.h

- move vgpu_gp10b_init_hal() and vgpu_gv11b_init_hal()
declarations from vgpu.h to new header files
vgpu/gp10b/vgpu_hal_gp10b.h and vgpu/gv11b/vgpu_hal_gv11b.h
respectively.

Jira GVSCI-334

Change-Id: I11a297a0aba1afd8b0ad022169ba7f734bcd952c
Signed-off-by: Aparna Das <aparnad@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2081152
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Aparna Das
2019-03-20 17:15:53 -07:00
committed by mobile promotions
parent 862bddc3eb
commit bd8b866758
9 changed files with 66 additions and 44 deletions

View File

@@ -35,6 +35,8 @@
#include <nvgpu/regops.h>
#include <nvgpu/clk_arb.h>
#include <nvgpu/vgpu/os_init_hal_vgpu.h>
#include "vgpu_linux.h"
#include "common/vgpu/gr/fecs_trace_vgpu.h"
#include "common/vgpu/clk_vgpu.h"
@@ -467,15 +469,6 @@ int vgpu_remove(struct platform_device *pdev)
return 0;
}
bool vgpu_is_reduced_bar1(struct gk20a *g)
{
struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
struct fifo_gk20a *f = &g->fifo;
u32 size = f->num_channels * f->userd_entry_size;
return resource_size(l->bar1_mem) == size;
}
int vgpu_tegra_suspend(struct device *dev)
{
struct tegra_vgpu_cmd_msg msg = {};