diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2018-01-30 07:05:36 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-02-07 18:35:43 -0500 |
commit | 0c8deb74aff6d0781cdf3278f56d7bce42b16a67 (patch) | |
tree | 5520e862370a59dc5f92106af0138d5de75af6f0 /drivers/gpu/nvgpu | |
parent | 2a9431bbe008d9d6bcd10113341e4106cb3e564a (diff) |
gpu: nvgpu: add characteristic flag for syncpoint address support
Add characteristic flag NVGPU_GPU_FLAGS_SUPPORT_SYNCPOINT_ADDRESS to indicate if
platform supports semaphore GPU_VA address for a syncpoint
Define NVGPU_SUPPORT_SYNCPOINT_ADDRESS for core driver book keeping
Set this flag for both GV100 and GV11B since Xavier SoC supports a semaphore
GPU_VA address for a syncpoint through syncpoint SHIM
Bug 200327559
Change-Id: I1f31673c9fd59f493d0b35a80d23151fc063ae06
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1649364
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/hal_gv100.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gv11b.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/enabled.h | 6 |
4 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c index 398823f3..f5f467b3 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | |||
@@ -156,6 +156,8 @@ static struct nvgpu_flags_mapping flags_mapping[] = { | |||
156 | NVGPU_SUPPORT_DETERMINISTIC_SUBMIT_FULL}, | 156 | NVGPU_SUPPORT_DETERMINISTIC_SUBMIT_FULL}, |
157 | {NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_OPTS, | 157 | {NVGPU_GPU_FLAGS_SUPPORT_DETERMINISTIC_OPTS, |
158 | NVGPU_SUPPORT_DETERMINISTIC_OPTS}, | 158 | NVGPU_SUPPORT_DETERMINISTIC_OPTS}, |
159 | {NVGPU_GPU_FLAGS_SUPPORT_SYNCPOINT_ADDRESS, | ||
160 | NVGPU_SUPPORT_SYNCPOINT_ADDRESS}, | ||
159 | {NVGPU_GPU_FLAGS_SUPPORT_IO_COHERENCE, | 161 | {NVGPU_GPU_FLAGS_SUPPORT_IO_COHERENCE, |
160 | NVGPU_SUPPORT_IO_COHERENCE}, | 162 | NVGPU_SUPPORT_IO_COHERENCE}, |
161 | {NVGPU_GPU_FLAGS_SUPPORT_RESCHEDULE_RUNLIST, | 163 | {NVGPU_GPU_FLAGS_SUPPORT_RESCHEDULE_RUNLIST, |
diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index 0f966adb..f75e6ff9 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c | |||
@@ -248,6 +248,7 @@ int gv100_init_gpu_characteristics(struct gk20a *g) | |||
248 | return err; | 248 | return err; |
249 | 249 | ||
250 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); | 250 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); |
251 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_SYNCPOINT_ADDRESS, true); | ||
251 | 252 | ||
252 | return 0; | 253 | return 0; |
253 | } | 254 | } |
diff --git a/drivers/gpu/nvgpu/gv11b/gv11b.c b/drivers/gpu/nvgpu/gv11b/gv11b.c index ab4b7fcd..2670c986 100644 --- a/drivers/gpu/nvgpu/gv11b/gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gv11b.c | |||
@@ -154,5 +154,6 @@ int gv11b_init_gpu_characteristics(struct gk20a *g) | |||
154 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); | 154 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); |
155 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_IO_COHERENCE, true); | 155 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_IO_COHERENCE, true); |
156 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_SCG, true); | 156 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_SCG, true); |
157 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_SYNCPOINT_ADDRESS, true); | ||
157 | return 0; | 158 | return 0; |
158 | } | 159 | } |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h index edf38a6a..cdfd0c55 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h +++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h | |||
@@ -152,10 +152,14 @@ struct gk20a; | |||
152 | #define NVGPU_SUPPORT_TSG_SUBCONTEXTS 63 | 152 | #define NVGPU_SUPPORT_TSG_SUBCONTEXTS 63 |
153 | /* Simultaneous Compute and Graphics (SCG) is available */ | 153 | /* Simultaneous Compute and Graphics (SCG) is available */ |
154 | #define NVGPU_SUPPORT_SCG 64 | 154 | #define NVGPU_SUPPORT_SCG 64 |
155 | |||
156 | /* GPU_VA address of a syncpoint is supported */ | ||
157 | #define NVGPU_SUPPORT_SYNCPOINT_ADDRESS 65 | ||
158 | |||
155 | /* | 159 | /* |
156 | * Must be greater than the largest bit offset in the above list. | 160 | * Must be greater than the largest bit offset in the above list. |
157 | */ | 161 | */ |
158 | #define NVGPU_MAX_ENABLED_BITS 65 | 162 | #define NVGPU_MAX_ENABLED_BITS 66 |
159 | 163 | ||
160 | /** | 164 | /** |
161 | * nvgpu_is_enabled - Check if the passed flag is enabled. | 165 | * nvgpu_is_enabled - Check if the passed flag is enabled. |