summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2015-04-08 12:47:15 -0400
committerIshan Mittal <imittal@nvidia.com>2015-05-18 01:48:39 -0400
commit72b565452ee1caeac67a478e69428bfb4efa6c40 (patch)
tree7f3973a1d87c5becb91ba3b254915caaf825d124 /drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
parent3b8c8972efabf32346a90575c26e6718f0e844ea (diff)
gpu: nvgpu: Fix timeout in gm20b's LTC flush
The flush timeout should have been comparing between the current time (jiffies) not the snapshot in time when the L2 flush started. Change-Id: Idba0ccbfeeab9e3fadd0b5bed7073acefbd403e3 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/729090 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/ltc_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/ltc_gm20b.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
index 9090be23..03307c01 100644
--- a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
@@ -286,15 +286,16 @@ u32 gm20b_ltc_cbc_fix_config(struct gk20a *g, int base)
286void gm20b_flush_ltc(struct gk20a *g) 286void gm20b_flush_ltc(struct gk20a *g)
287{ 287{
288 u32 op_pending; 288 u32 op_pending;
289 unsigned long now, timeout; 289 unsigned long timeout;
290 290
291#define __timeout_init() \ 291#define __timeout_init() \
292 do { \ 292 do { \
293 now = jiffies; timeout = now + HZ; \ 293 timeout = jiffies + HZ; \
294 } while (0) 294 } while (0)
295#define __timeout_check() \ 295#define __timeout_check() \
296 do { \ 296 do { \
297 if (tegra_platform_is_silicon() && time_after(now, timeout)) { \ 297 if (tegra_platform_is_silicon() && \
298 time_after(jiffies, timeout)) { \
298 gk20a_err(dev_from_gk20a(g), "L2 flush timeout!"); \ 299 gk20a_err(dev_from_gk20a(g), "L2 flush timeout!"); \
299 break; \ 300 break; \
300 } \ 301 } \