From 8478f6356a94651dca1aed8c65df0ca0f0a50016 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 14 Apr 2017 13:36:05 -0700 Subject: 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 Reviewed-on: http://git-master/r/1463542 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/vgpu/vgpu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/vgpu.c') 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) } } -static void vgpu_init_vars(struct gk20a *g) +static void vgpu_init_vars(struct gk20a *g, struct gk20a_platform *platform) { nvgpu_mutex_init(&g->poweroff_lock); g->regs_saved = g->regs; @@ -237,6 +237,9 @@ static void vgpu_init_vars(struct gk20a *g) nvgpu_init_list_node(&g->pending_sema_waits); nvgpu_raw_spinlock_init(&g->pending_sema_waits_lock); + + g->aggressive_sync_destroy = platform->aggressive_sync_destroy; + g->aggressive_sync_destroy_thresh = platform->aggressive_sync_destroy_thresh; } static int vgpu_init_support(struct platform_device *pdev) @@ -595,7 +598,7 @@ int vgpu_probe(struct platform_device *pdev) vgpu_init_support(pdev); - vgpu_init_vars(gk20a); + vgpu_init_vars(gk20a, platform); init_rwsem(&gk20a->busy_lock); -- cgit v1.2.2