diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/fb/fb_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/fb/fb_gk20a.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gk20a.c b/drivers/gpu/nvgpu/common/fb/fb_gk20a.c index 903bb983..d7e1a8a7 100644 --- a/drivers/gpu/nvgpu/common/fb/fb_gk20a.c +++ b/drivers/gpu/nvgpu/common/fb/fb_gk20a.c | |||
@@ -74,8 +74,9 @@ void gk20a_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb) | |||
74 | hw. Use the power_on flag to skip tlb invalidation when gpu | 74 | hw. Use the power_on flag to skip tlb invalidation when gpu |
75 | power is turned off */ | 75 | power is turned off */ |
76 | 76 | ||
77 | if (!g->power_on) | 77 | if (!g->power_on) { |
78 | return; | 78 | return; |
79 | } | ||
79 | 80 | ||
80 | addr_lo = u64_lo32(nvgpu_mem_get_addr(g, pdb) >> 12); | 81 | addr_lo = u64_lo32(nvgpu_mem_get_addr(g, pdb) >> 12); |
81 | 82 | ||
@@ -87,14 +88,16 @@ void gk20a_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb) | |||
87 | 88 | ||
88 | do { | 89 | do { |
89 | data = gk20a_readl(g, fb_mmu_ctrl_r()); | 90 | data = gk20a_readl(g, fb_mmu_ctrl_r()); |
90 | if (fb_mmu_ctrl_pri_fifo_space_v(data) != 0) | 91 | if (fb_mmu_ctrl_pri_fifo_space_v(data) != 0) { |
91 | break; | 92 | break; |
93 | } | ||
92 | nvgpu_udelay(2); | 94 | nvgpu_udelay(2); |
93 | } while (!nvgpu_timeout_expired_msg(&timeout, | 95 | } while (!nvgpu_timeout_expired_msg(&timeout, |
94 | "wait mmu fifo space")); | 96 | "wait mmu fifo space")); |
95 | 97 | ||
96 | if (nvgpu_timeout_peek_expired(&timeout)) | 98 | if (nvgpu_timeout_peek_expired(&timeout)) { |
97 | goto out; | 99 | goto out; |
100 | } | ||
98 | 101 | ||
99 | nvgpu_timeout_init(g, &timeout, 1000, NVGPU_TIMER_RETRY_TIMER); | 102 | nvgpu_timeout_init(g, &timeout, 1000, NVGPU_TIMER_RETRY_TIMER); |
100 | 103 | ||
@@ -112,8 +115,9 @@ void gk20a_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb) | |||
112 | do { | 115 | do { |
113 | data = gk20a_readl(g, fb_mmu_ctrl_r()); | 116 | data = gk20a_readl(g, fb_mmu_ctrl_r()); |
114 | if (fb_mmu_ctrl_pri_fifo_empty_v(data) != | 117 | if (fb_mmu_ctrl_pri_fifo_empty_v(data) != |
115 | fb_mmu_ctrl_pri_fifo_empty_false_f()) | 118 | fb_mmu_ctrl_pri_fifo_empty_false_f()) { |
116 | break; | 119 | break; |
120 | } | ||
117 | nvgpu_udelay(2); | 121 | nvgpu_udelay(2); |
118 | } while (!nvgpu_timeout_expired_msg(&timeout, | 122 | } while (!nvgpu_timeout_expired_msg(&timeout, |
119 | "wait mmu invalidate")); | 123 | "wait mmu invalidate")); |