]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
gpu: nvgpu: Do not return timedout in emulation
authorTerje Bergstrom <tbergstrom@nvidia.com>
Thu, 19 Feb 2015 17:41:14 +0000 (09:41 -0800)
committerTerje Bergstrom <tbergstrom@nvidia.com>
Mon, 23 Feb 2015 15:57:00 +0000 (07:57 -0800)
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

drivers/gpu/nvgpu/gk20a/ltc_gk20a.c
drivers/gpu/nvgpu/gk20a/mm_gk20a.c

index 4c6543bb172a90974287f98a6d3098932a9b88d5..4359f28271c6b9d035e22b3c7961bf5a7dfae793 100644 (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");
 
index 14665bbc9bd267df1ba43c3012b9b98be603551a..ec058754fff45ad3d882371f1f53e2e67cdc8304 100644 (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");