diff options
author | Richard Zhao <rizhao@nvidia.com> | 2016-01-04 13:28:04 -0500 |
---|---|---|
committer | Vladislav Buzov <vbuzov@nvidia.com> | 2016-01-10 23:07:53 -0500 |
commit | a9c6f595399074e88c16f3557e5acb29db1d52d5 (patch) | |
tree | 2d2665668bac915b5598d83881a1efec892be435 /drivers/gpu/nvgpu/gk20a/hw_pbdma_gk20a.h | |
parent | 3484fd0d1365c6f97723d97cb45664aa75c45f32 (diff) |
gpu: nvgpu: enable semaphore acquire timeout
It'll detect dead semaphore acquire. The worst case is when
ACQUIRE_SWITCH is disabled, semaphore acquire will poll and
consume full gpu timeslicees.
The timeout value is set to half of channel WDT.
Bug 1636800
Change-Id: Ida6ccc534006a191513edf47e7b82d4b5b758684
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: http://git-master/r/928827
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vladislav Buzov <vbuzov@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/hw_pbdma_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/hw_pbdma_gk20a.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/hw_pbdma_gk20a.h b/drivers/gpu/nvgpu/gk20a/hw_pbdma_gk20a.h index e83dbb5c..79a4ef96 100644 --- a/drivers/gpu/nvgpu/gk20a/hw_pbdma_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/hw_pbdma_gk20a.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2012-2015, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2012-2016, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -274,14 +274,34 @@ static inline u32 pbdma_acquire_retry_exp_2_f(void) | |||
274 | { | 274 | { |
275 | return 0x100; | 275 | return 0x100; |
276 | } | 276 | } |
277 | static inline u32 pbdma_acquire_timeout_exp_f(u32 v) | ||
278 | { | ||
279 | return (v & 0xf) << 11; | ||
280 | } | ||
281 | static inline u32 pbdma_acquire_timeout_exp_max_v(void) | ||
282 | { | ||
283 | return 0x0000000f; | ||
284 | } | ||
277 | static inline u32 pbdma_acquire_timeout_exp_max_f(void) | 285 | static inline u32 pbdma_acquire_timeout_exp_max_f(void) |
278 | { | 286 | { |
279 | return 0x7800; | 287 | return 0x7800; |
280 | } | 288 | } |
289 | static inline u32 pbdma_acquire_timeout_man_f(u32 v) | ||
290 | { | ||
291 | return (v & 0xffff) << 15; | ||
292 | } | ||
293 | static inline u32 pbdma_acquire_timeout_man_max_v(void) | ||
294 | { | ||
295 | return 0x0000ffff; | ||
296 | } | ||
281 | static inline u32 pbdma_acquire_timeout_man_max_f(void) | 297 | static inline u32 pbdma_acquire_timeout_man_max_f(void) |
282 | { | 298 | { |
283 | return 0x7fff8000; | 299 | return 0x7fff8000; |
284 | } | 300 | } |
301 | static inline u32 pbdma_acquire_timeout_en_enable_f(void) | ||
302 | { | ||
303 | return 0x80000000; | ||
304 | } | ||
285 | static inline u32 pbdma_acquire_timeout_en_disable_f(void) | 305 | static inline u32 pbdma_acquire_timeout_en_disable_f(void) |
286 | { | 306 | { |
287 | return 0x0; | 307 | return 0x0; |