From d60a45b9fdd935c5e0c29c2cc3c056e0ce8c9873 Mon Sep 17 00:00:00 2001 From: Vijayakumar Date: Thu, 29 Jan 2015 16:43:13 +0530 Subject: 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 Reviewed-on: http://git-master/r/799983 (cherry picked from commit d1d837fd09ff0f035feff1757c67488404c23cc6) Reviewed-on: http://git-master/r/808250 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c') 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) u32 mask; u32 timeout; int i; + struct gk20a_platform *platform = platform_get_drvdata(g->dev); gk20a_dbg_fn(""); /* enable pmc pfifo */ @@ -408,8 +409,9 @@ int gk20a_init_fifo_reset_enable_hw(struct gk20a *g) if (g->ops.fifo.apply_pb_timeout) g->ops.fifo.apply_pb_timeout(g); - timeout = GRFIFO_TIMEOUT_CHECK_PERIOD_US | - fifo_eng_timeout_detection_enabled_f(); + timeout = GRFIFO_TIMEOUT_CHECK_PERIOD_US; + timeout = scale_ptimer(timeout, platform->ptimerscaling10x); + timeout |= fifo_eng_timeout_detection_enabled_f(); gk20a_writel(g, fifo_eng_timeout_r(), timeout); gk20a_dbg_fn("done"); -- cgit v1.2.2