From 7acc993cdbcc202854f188e7f53646f387573a09 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 14 Apr 2017 15:12:57 -0700 Subject: gpu: nvgpu: Move can_railgate & railgate_delay to gk20a Copy can_railgate and railgate_delay to struct gk20a at probe time, and access them from gk20a instead of platform_gk20a. JIRA NVGPU-16 Change-Id: I63d4f4aff7eb17a167775fd7982a1b548bbca3a5 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1463543 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 7f110821..ea03ba98 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -397,15 +397,13 @@ void gk20a_driver_start_unload(struct gk20a *g) int gk20a_wait_for_idle(struct device *dev) { struct gk20a *g = get_gk20a(dev); - struct gk20a_platform *platform; int wait_length = 150; /* 3 second overall max wait. */ int target_usage_count = 0; if (!g) return -ENODEV; - platform = dev_get_drvdata(dev); - if (platform->user_railgate_disabled) + if (g->user_railgate_disabled) target_usage_count = 1; while ((atomic_read(&g->usage_count) != target_usage_count) @@ -467,7 +465,7 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) * that depends on job tracking. (Here, fast means strictly no * metadata, just the gpfifo contents are copied and gp_put updated). */ - if (!platform->can_railgate) + if (!g->can_railgate) gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_NO_JOBTRACKING; /* @@ -476,7 +474,7 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) * provided that the user doesn't request anything that depends on * deferred cleanup. */ - if (!platform->can_railgate + if (!g->can_railgate && !gk20a_channel_sync_needs_sync_framework(g)) gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_FULL; -- cgit v1.2.2