summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-09-27 16:21:44 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-13 18:19:55 -0400
commitbe3750bc9eb60f8696c20b7298cc282eea17ac1b (patch)
treeb36fb818ce58a96fc7f2822480433057bd28faf4 /drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
parentff9c3fc20a27444cd1ff7d9402965023e425f404 (diff)
gpu: nvgpu: Abstract IO aperture accessors
Add abstraction of IO aperture accessors. Add new functions gk20a_io_exists() and gk20a_io_valid_reg() to remove dependencies to aperture fields from common code. Implement Linux version of the abstraction by moving gk20a_readl() and gk20a_writel() to new Linux specific io.c. Move the fields defining IO aperture to nvgpu_os_linux. Add t19x specific IO aperture initialization functions and add t19x specific section to nvgpu_os_linux. JIRA NVGPU-259 Change-Id: I09e79cda60d11a20d1099a9aaa6d2375236e94ce Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1569698 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/fifo_vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/fifo_vgpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
index 9010c4a3..73a67d91 100644
--- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
@@ -268,6 +268,7 @@ clean_up_runlist:
268 268
269static int vgpu_init_fifo_setup_sw(struct gk20a *g) 269static int vgpu_init_fifo_setup_sw(struct gk20a *g)
270{ 270{
271 struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
271 struct fifo_gk20a *f = &g->fifo; 272 struct fifo_gk20a *f = &g->fifo;
272 struct device *d = dev_from_gk20a(g); 273 struct device *d = dev_from_gk20a(g);
273 struct vgpu_priv_data *priv = vgpu_get_priv_data(g); 274 struct vgpu_priv_data *priv = vgpu_get_priv_data(g);
@@ -305,7 +306,7 @@ static int vgpu_init_fifo_setup_sw(struct gk20a *g)
305 /* if reduced BAR1 range is specified, use offset of 0 306 /* if reduced BAR1 range is specified, use offset of 0
306 * (server returns offset assuming full BAR1 range) 307 * (server returns offset assuming full BAR1 range)
307 */ 308 */
308 if (resource_size(g->bar1_mem) == 309 if (resource_size(l->bar1_mem) ==
309 (resource_size_t)f->userd.size) 310 (resource_size_t)f->userd.size)
310 f->userd.gpu_va = 0; 311 f->userd.gpu_va = 0;
311 } 312 }