summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/vgpu/fifo_vgpu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
index ac506a34..fe231003 100644
--- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
@@ -233,6 +233,7 @@ clean_up:
233static int vgpu_init_fifo_setup_sw(struct gk20a *g) 233static int vgpu_init_fifo_setup_sw(struct gk20a *g)
234{ 234{
235 struct gk20a_platform *platform = gk20a_get_platform(g->dev); 235 struct gk20a_platform *platform = gk20a_get_platform(g->dev);
236 struct resource *r = platform_get_resource(g->dev, IORESOURCE_MEM, 0);
236 struct fifo_gk20a *f = &g->fifo; 237 struct fifo_gk20a *f = &g->fifo;
237 struct device *d = dev_from_gk20a(g); 238 struct device *d = dev_from_gk20a(g);
238 int chid, err = 0; 239 int chid, err = 0;
@@ -270,6 +271,11 @@ static int vgpu_init_fifo_setup_sw(struct gk20a *g)
270 goto clean_up; 271 goto clean_up;
271 } 272 }
272 273
274 /* if reduced BAR1 range is specified, use offset of 0
275 (server returns offset assuming full BAR1 range) */
276 if (resource_size(r) == (resource_size_t)f->userd.size)
277 f->userd.gpu_va = 0;
278
273 gk20a_dbg(gpu_dbg_map, "userd bar1 va = 0x%llx", f->userd.gpu_va); 279 gk20a_dbg(gpu_dbg_map, "userd bar1 va = 0x%llx", f->userd.gpu_va);
274 280
275 f->channel = kzalloc(f->num_channels * sizeof(*f->channel), 281 f->channel = kzalloc(f->num_channels * sizeof(*f->channel),