gpu: nvgpu: Do not return timedout in emulation

We have infinite timeouts for loops in emulation. Some functions with
the loops still return error if we exceed the original retry count.

Change-Id: I1f9ddbfc0acd9f30f6bd49d9e748d8d8fbefa154
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/709491
This commit is contained in:
Terje Bergstrom
2015-02-19 09:41:14 -08:00
committed by Dan Willemsen
parent f9fd5bbabe
commit ecaa5c1b1f
2 changed files with 6 additions and 6 deletions

View File

@@ -217,7 +217,7 @@ static void gk20a_mm_g_elpg_flush_locked(struct gk20a *g)
break;
} while (retry >= 0 || !tegra_platform_is_silicon());
if (retry < 0)
if (tegra_platform_is_silicon() && retry < 0)
gk20a_warn(dev_from_gk20a(g),
"g_elpg_flush too many retries");

View File

@@ -2787,7 +2787,7 @@ int gk20a_mm_fb_flush(struct gk20a *g)
break;
} while (retry >= 0 || !tegra_platform_is_silicon());
if (retry < 0) {
if (tegra_platform_is_silicon() && retry < 0) {
gk20a_warn(dev_from_gk20a(g),
"fb_flush too many retries");
ret = -EBUSY;
@@ -2827,7 +2827,7 @@ static void gk20a_mm_l2_invalidate_locked(struct gk20a *g)
break;
} while (retry >= 0 || !tegra_platform_is_silicon());
if (retry < 0)
if (tegra_platform_is_silicon() && retry < 0)
gk20a_warn(dev_from_gk20a(g),
"l2_system_invalidate too many retries");
@@ -2881,7 +2881,7 @@ void gk20a_mm_l2_flush(struct gk20a *g, bool invalidate)
break;
} while (retry >= 0 || !tegra_platform_is_silicon());
if (retry < 0)
if (tegra_platform_is_silicon() && retry < 0)
gk20a_warn(dev_from_gk20a(g),
"l2_flush_dirty too many retries");
@@ -2954,7 +2954,7 @@ void gk20a_mm_tlb_invalidate(struct vm_gk20a *vm)
retry--;
} while (retry >= 0 || !tegra_platform_is_silicon());
if (retry < 0) {
if (tegra_platform_is_silicon() && retry < 0) {
gk20a_warn(dev_from_gk20a(g),
"wait mmu fifo space too many retries");
goto out;
@@ -2977,7 +2977,7 @@ void gk20a_mm_tlb_invalidate(struct vm_gk20a *vm)
udelay(2);
} while (retry >= 0 || !tegra_platform_is_silicon());
if (retry < 0)
if (tegra_platform_is_silicon() && retry < 0)
gk20a_warn(dev_from_gk20a(g),
"mmu invalidate too many retries");