summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/fb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/fb')
-rw-r--r--drivers/gpu/nvgpu/common/fb/fb_gm20b.c7
-rw-r--r--drivers/gpu/nvgpu/common/fb/fb_gm20b.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gm20b.c b/drivers/gpu/nvgpu/common/fb/fb_gm20b.c
index b4756546..65b7336c 100644
--- a/drivers/gpu/nvgpu/common/fb/fb_gm20b.c
+++ b/drivers/gpu/nvgpu/common/fb/fb_gm20b.c
@@ -60,11 +60,12 @@ void gm20b_fb_init_hw(struct gk20a *g)
60 gk20a_writel(g, fb_niso_flush_sysmem_addr_r(), addr); 60 gk20a_writel(g, fb_niso_flush_sysmem_addr_r(), addr);
61} 61}
62 62
63void gm20b_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb) 63int gm20b_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb)
64{ 64{
65 struct nvgpu_timeout timeout; 65 struct nvgpu_timeout timeout;
66 u32 addr_lo; 66 u32 addr_lo;
67 u32 data; 67 u32 data;
68 int err = 0;
68 69
69 nvgpu_log_fn(g, " "); 70 nvgpu_log_fn(g, " ");
70 71
@@ -75,7 +76,7 @@ void gm20b_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb)
75 power is turned off */ 76 power is turned off */
76 77
77 if (!g->power_on) { 78 if (!g->power_on) {
78 return; 79 return err;
79 } 80 }
80 81
81 addr_lo = u64_lo32(nvgpu_mem_get_addr(g, pdb) >> 12); 82 addr_lo = u64_lo32(nvgpu_mem_get_addr(g, pdb) >> 12);
@@ -96,6 +97,7 @@ void gm20b_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb)
96 "wait mmu fifo space")); 97 "wait mmu fifo space"));
97 98
98 if (nvgpu_timeout_peek_expired(&timeout)) { 99 if (nvgpu_timeout_peek_expired(&timeout)) {
100 err = -ETIMEDOUT;
99 goto out; 101 goto out;
100 } 102 }
101 103
@@ -126,6 +128,7 @@ void gm20b_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb)
126 128
127out: 129out:
128 nvgpu_mutex_release(&g->mm.tlb_lock); 130 nvgpu_mutex_release(&g->mm.tlb_lock);
131 return err;
129} 132}
130 133
131void fb_gm20b_init_fs_state(struct gk20a *g) 134void fb_gm20b_init_fs_state(struct gk20a *g)
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gm20b.h b/drivers/gpu/nvgpu/common/fb/fb_gm20b.h
index 95991432..bc240ae3 100644
--- a/drivers/gpu/nvgpu/common/fb/fb_gm20b.h
+++ b/drivers/gpu/nvgpu/common/fb/fb_gm20b.h
@@ -33,7 +33,7 @@ struct nvgpu_mem;
33 33
34void gm20b_fb_reset(struct gk20a *g); 34void gm20b_fb_reset(struct gk20a *g);
35void gm20b_fb_init_hw(struct gk20a *g); 35void gm20b_fb_init_hw(struct gk20a *g);
36void gm20b_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb); 36int gm20b_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb);
37void fb_gm20b_init_fs_state(struct gk20a *g); 37void fb_gm20b_init_fs_state(struct gk20a *g);
38void gm20b_fb_set_mmu_page_size(struct gk20a *g); 38void gm20b_fb_set_mmu_page_size(struct gk20a *g);
39bool gm20b_fb_set_use_full_comp_tag_line(struct gk20a *g); 39bool gm20b_fb_set_use_full_comp_tag_line(struct gk20a *g);