diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-10-17 04:33:05 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-10-19 13:49:04 -0400 |
commit | bf29bd942201e17f55ff0894833a84b8f6c0bf97 (patch) | |
tree | de170d44e1f677cde3b32e46f05c1ca9ffd52b09 /drivers/gpu/nvgpu/gm20b | |
parent | ba3dbc452c6d61fad8149207b007e9a75e71469d (diff) |
gpu: nvgpu: check engine ctx_status in wait_idle
We have following bug where GPU Host reports non-idle
when it should report engine idle
- if a context is preempted off the GPU, and there is
no other context to load, NV_PGRAPH_ENGINE_STATUS
will not be idle until new context is loaded
- this could cause gr_gk20a_wait_idle() to fail since
here we rely only on NV_PGRAPH_ENGINE_STATUS to
decide if engine is busy or not
To fix this, first check if context is valid or not
from NV_PFIFO_ENGINE_STATUS_CTX_STATUS
If context is invalid, return immediately
Otherwise, continue as before
Also, add accessors for invalid ctx_status
Bug 1826768
Change-Id: Id627be3f02e79f4beac59a8b5195d08eabf651f2
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1237521
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hw_fifo_gm20b.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/hw_fifo_gm20b.h b/drivers/gpu/nvgpu/gm20b/hw_fifo_gm20b.h index 01e01695..964f4bf9 100644 --- a/drivers/gpu/nvgpu/gm20b/hw_fifo_gm20b.h +++ b/drivers/gpu/nvgpu/gm20b/hw_fifo_gm20b.h | |||
@@ -430,6 +430,10 @@ static inline u32 fifo_engine_status_ctx_status_v(u32 r) | |||
430 | { | 430 | { |
431 | return (r >> 13) & 0x7; | 431 | return (r >> 13) & 0x7; |
432 | } | 432 | } |
433 | static inline u32 fifo_engine_status_ctx_status_invalid_v(void) | ||
434 | { | ||
435 | return 0x00000000; | ||
436 | } | ||
433 | static inline u32 fifo_engine_status_ctx_status_valid_v(void) | 437 | static inline u32 fifo_engine_status_ctx_status_valid_v(void) |
434 | { | 438 | { |
435 | return 0x00000001; | 439 | return 0x00000001; |