diff options
author | Vijayakumar <vsubbu@nvidia.com> | 2015-01-29 06:13:13 -0500 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-10-06 16:30:54 -0400 |
commit | d60a45b9fdd935c5e0c29c2cc3c056e0ce8c9873 (patch) | |
tree | 7ae5d2acc30e9d2fb9dfb55674985cf16b847192 /drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |
parent | f4b6d4d176e9c83b226d8564595b6b9168cef793 (diff) |
gpu: nvgpu: scale ptimer based timeouts
bug 1603226
host based timeouts use ptimer for detecting
timeouts. on gk20a and gm20b ptimer runs 2.6x
slower. scale the fifo_eng_timeout to account
for this
Change-Id: Ie44718382953e36436ea47d6e89b9a225d5c2070
Signed-off-by: Vijayakumar <vsubbu@nvidia.com>
Reviewed-on: http://git-master/r/799983
(cherry picked from commit d1d837fd09ff0f035feff1757c67488404c23cc6)
Reviewed-on: http://git-master/r/808250
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index f736fe8c..ae36478e 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -344,6 +344,7 @@ int gk20a_init_fifo_reset_enable_hw(struct gk20a *g) | |||
344 | u32 mask; | 344 | u32 mask; |
345 | u32 timeout; | 345 | u32 timeout; |
346 | int i; | 346 | int i; |
347 | struct gk20a_platform *platform = platform_get_drvdata(g->dev); | ||
347 | 348 | ||
348 | gk20a_dbg_fn(""); | 349 | gk20a_dbg_fn(""); |
349 | /* enable pmc pfifo */ | 350 | /* enable pmc pfifo */ |
@@ -408,8 +409,9 @@ int gk20a_init_fifo_reset_enable_hw(struct gk20a *g) | |||
408 | if (g->ops.fifo.apply_pb_timeout) | 409 | if (g->ops.fifo.apply_pb_timeout) |
409 | g->ops.fifo.apply_pb_timeout(g); | 410 | g->ops.fifo.apply_pb_timeout(g); |
410 | 411 | ||
411 | timeout = GRFIFO_TIMEOUT_CHECK_PERIOD_US | | 412 | timeout = GRFIFO_TIMEOUT_CHECK_PERIOD_US; |
412 | fifo_eng_timeout_detection_enabled_f(); | 413 | timeout = scale_ptimer(timeout, platform->ptimerscaling10x); |
414 | timeout |= fifo_eng_timeout_detection_enabled_f(); | ||
413 | gk20a_writel(g, fifo_eng_timeout_r(), timeout); | 415 | gk20a_writel(g, fifo_eng_timeout_r(), timeout); |
414 | 416 | ||
415 | gk20a_dbg_fn("done"); | 417 | gk20a_dbg_fn("done"); |