summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2017-05-02 09:01:51 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-05-05 10:54:18 -0400
commitee9733e587d977610975435a84e5af7cabba8870 (patch)
tree6515a93b3fd6267d1e9626469816747359b197e8 /drivers/gpu/nvgpu/gk20a/gk20a.c
parent744e2d202e2d38b0d8ff8b55e1e84daf75e39b48 (diff)
gpu: nvgpu: expose deterministic submit support
Add these bits in the gpu characteristics flags: NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_NO_JOBTRACKING - fast submits with no in-kernel job tracking are supported. NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_FULL - deterministic submits also with job tracking and num_inflight_jobs set are supported. Either of these may get disabled if the particular channel or submit still requires features that block these. Make gk20a_channel_sync_needs_sync_framework() take a gk20a pointer instead of a channel pointer so that it can be called without a channel. It does not need any per-channel data. Bug 200291300 Change-Id: I5f82510b6d39b53bcf6f1006dd83bdd9053963a0 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1456845 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 8ea2929f..7f110821 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -461,6 +461,25 @@ int gk20a_init_gpu_characteristics(struct gk20a *g)
461 if (gk20a_platform_has_syncpoints(g)) 461 if (gk20a_platform_has_syncpoints(g))
462 gpu->flags |= NVGPU_GPU_FLAGS_HAS_SYNCPOINTS; 462 gpu->flags |= NVGPU_GPU_FLAGS_HAS_SYNCPOINTS;
463 463
464 /*
465 * Railgating needs job tracking which prevents fast submits. They're
466 * supported otherwise, provided that the user doesn't request anything
467 * that depends on job tracking. (Here, fast means strictly no
468 * metadata, just the gpfifo contents are copied and gp_put updated).
469 */
470 if (!platform->can_railgate)
471 gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_NO_JOBTRACKING;
472
473 /*
474 * Railgating and sync framework require deferred job cleanup which
475 * prevents deterministic submits. They're supported otherwise,
476 * provided that the user doesn't request anything that depends on
477 * deferred cleanup.
478 */
479 if (!platform->can_railgate
480 && !gk20a_channel_sync_needs_sync_framework(g))
481 gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_FULL;
482
464 gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_USERSPACE_MANAGED_AS; 483 gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_USERSPACE_MANAGED_AS;
465 gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_TSG; 484 gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_TSG;
466 gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_MAP_COMPBITS; 485 gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_MAP_COMPBITS;