summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/vgpu.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-14 16:36:05 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-24 16:24:50 -0400
commit8478f6356a94651dca1aed8c65df0ca0f0a50016 (patch)
tree882047337ffebd68dcd373a1c357406ceae82a1c /drivers/gpu/nvgpu/vgpu/vgpu.c
parentb3e1ce04b963e91b9b425b3c35cc4eff11db7543 (diff)
gpu: nvgpu: Move aggressive_sync_destroy to gk20a
Copy aggressive_sync_destroy* to struct gk20a at probe time, and access it from gk20a instead of platform_gk20a. JIRA NVGPU-16 Change-Id: I6a1c04d85580cb62ab9a52bae08a0f99fe7cfef9 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1463542 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c
index cc672b1e..480d80d7 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.c
@@ -229,7 +229,7 @@ static void vgpu_remove_support(struct gk20a *g)
229 } 229 }
230} 230}
231 231
232static void vgpu_init_vars(struct gk20a *g) 232static void vgpu_init_vars(struct gk20a *g, struct gk20a_platform *platform)
233{ 233{
234 nvgpu_mutex_init(&g->poweroff_lock); 234 nvgpu_mutex_init(&g->poweroff_lock);
235 g->regs_saved = g->regs; 235 g->regs_saved = g->regs;
@@ -237,6 +237,9 @@ static void vgpu_init_vars(struct gk20a *g)
237 237
238 nvgpu_init_list_node(&g->pending_sema_waits); 238 nvgpu_init_list_node(&g->pending_sema_waits);
239 nvgpu_raw_spinlock_init(&g->pending_sema_waits_lock); 239 nvgpu_raw_spinlock_init(&g->pending_sema_waits_lock);
240
241 g->aggressive_sync_destroy = platform->aggressive_sync_destroy;
242 g->aggressive_sync_destroy_thresh = platform->aggressive_sync_destroy_thresh;
240} 243}
241 244
242static int vgpu_init_support(struct platform_device *pdev) 245static int vgpu_init_support(struct platform_device *pdev)
@@ -595,7 +598,7 @@ int vgpu_probe(struct platform_device *pdev)
595 598
596 vgpu_init_support(pdev); 599 vgpu_init_support(pdev);
597 600
598 vgpu_init_vars(gk20a); 601 vgpu_init_vars(gk20a, platform);
599 602
600 init_rwsem(&gk20a->busy_lock); 603 init_rwsem(&gk20a->busy_lock);
601 604