diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-10-11 17:58:57 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-26 17:35:38 -0400 |
commit | e49d93a960f8995affeb4541941eb7f16d04eafd (patch) | |
tree | 7b5eb1365bfee8a237ddf7d8e0b02959e50f5704 /drivers/gpu/nvgpu/gk20a/gk20a.c | |
parent | 9eebb7831facaa16b2975f50a716d2986c67b699 (diff) |
gpu: nvgpu: Linux specific GPU characteristics flags
Make GPU characteristics flags specific to Linux code only. The
rest of driver is moved to using nvgpu_is_enabled() API.
JIRA NVGPU-259
Change-Id: I2faf46ef64c964361c267887b28c9d19806d6d51
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1583876
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.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index e3c2397c..2b99b52c 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -417,24 +417,26 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) | |||
417 | gpu->available_big_page_sizes |= g->ops.mm.get_big_page_sizes(); | 417 | gpu->available_big_page_sizes |= g->ops.mm.get_big_page_sizes(); |
418 | } | 418 | } |
419 | 419 | ||
420 | gpu->flags = NVGPU_GPU_FLAGS_SUPPORT_PARTIAL_MAPPINGS | | 420 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_PARTIAL_MAPPINGS, true); |
421 | NVGPU_GPU_FLAGS_SUPPORT_MAP_DIRECT_KIND_CTRL; | 421 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_MAP_DIRECT_KIND_CTRL, true); |
422 | 422 | ||
423 | if (IS_ENABLED(CONFIG_SYNC)) | 423 | if (IS_ENABLED(CONFIG_SYNC)) |
424 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_SYNC_FENCE_FDS; | 424 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_SYNC_FENCE_FDS, true); |
425 | 425 | ||
426 | if (g->ops.mm.support_sparse && g->ops.mm.support_sparse(g)) | 426 | if (g->ops.mm.support_sparse && g->ops.mm.support_sparse(g)) |
427 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_SPARSE_ALLOCS; | 427 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_SPARSE_ALLOCS, true); |
428 | 428 | ||
429 | if (gk20a_platform_has_syncpoints(g)) | 429 | if (gk20a_platform_has_syncpoints(g)) |
430 | gpu->flags |= NVGPU_GPU_FLAGS_HAS_SYNCPOINTS; | 430 | __nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, true); |
431 | 431 | ||
432 | /* | 432 | /* |
433 | * Fast submits are supported as long as the user doesn't request | 433 | * Fast submits are supported as long as the user doesn't request |
434 | * anything that depends on job tracking. (Here, fast means strictly no | 434 | * anything that depends on job tracking. (Here, fast means strictly no |
435 | * metadata, just the gpfifo contents are copied and gp_put updated). | 435 | * metadata, just the gpfifo contents are copied and gp_put updated). |
436 | */ | 436 | */ |
437 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_NO_JOBTRACKING; | 437 | __nvgpu_set_enabled(g, |
438 | NVGPU_SUPPORT_DETERMINISTIC_SUBMIT_NO_JOBTRACKING, | ||
439 | true); | ||
438 | 440 | ||
439 | /* | 441 | /* |
440 | * Sync framework requires deferred job cleanup, wrapping syncs in FDs, | 442 | * Sync framework requires deferred job cleanup, wrapping syncs in FDs, |
@@ -443,13 +445,15 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) | |||
443 | * that depends on deferred cleanup. | 445 | * that depends on deferred cleanup. |
444 | */ | 446 | */ |
445 | if (!gk20a_channel_sync_needs_sync_framework(g)) | 447 | if (!gk20a_channel_sync_needs_sync_framework(g)) |
446 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_SUBMIT_FULL; | 448 | __nvgpu_set_enabled(g, |
449 | NVGPU_SUPPORT_DETERMINISTIC_SUBMIT_FULL, | ||
450 | true); | ||
447 | 451 | ||
448 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_USERSPACE_MANAGED_AS; | 452 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_USERSPACE_MANAGED_AS, true); |
449 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_TSG; | 453 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG, true); |
450 | 454 | ||
451 | if (g->ops.clk_arb.get_arbiter_clk_domains) | 455 | if (g->ops.clk_arb.get_arbiter_clk_domains) |
452 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_CLOCK_CONTROLS; | 456 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_CLOCK_CONTROLS, true); |
453 | 457 | ||
454 | gpu->gpc_mask = (1 << g->gr.gpc_count)-1; | 458 | gpu->gpc_mask = (1 << g->gr.gpc_count)-1; |
455 | 459 | ||