summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/fb_gv11b.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2018-02-21 18:56:40 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-03-16 10:34:56 -0400
commit22a95f15e0567a8f17b15fdad8864e3c4242a2fd (patch)
treeeb677953667e4d8db1d464c03cc975ceed981291 /drivers/gpu/nvgpu/gv11b/fb_gv11b.c
parenteb54945f1804e1aefa1e1e4f1fa9c5f12aa6bc92 (diff)
gpu: nvgpu: Don't ioremap() regs when using POSIX
When __NVGPU_POSIX__ is defined do no use ioremap(). This operation probably doesn't make much sense. Currently we have no plans to run the driver in userspace against a real GPU, hence programming the nvlink credits registers is simply not necessary. Also fix an unused variable by returing it as an error. JIRA NVGPU-525 Change-Id: Ic94d332551f6e25c1836331bf92188e7651546cb Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1673815 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/fb_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/fb_gv11b.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c
index e9093224..4ad350d1 100644
--- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c
@@ -56,6 +56,7 @@ static void gv11b_init_nvlink_soc_credits(struct gk20a *g)
56 if (nvgpu_is_bpmp_running(g) && (!nvgpu_platform_is_simulation(g))) { 56 if (nvgpu_is_bpmp_running(g) && (!nvgpu_platform_is_simulation(g))) {
57 nvgpu_log(g, gpu_dbg_info, "nvlink soc credits init done by bpmp"); 57 nvgpu_log(g, gpu_dbg_info, "nvlink soc credits init done by bpmp");
58 } else { 58 } else {
59#ifndef __NVGPU_POSIX__
59 /* MSS_NVLINK_1_BASE */ 60 /* MSS_NVLINK_1_BASE */
60 void __iomem *soc1 = ioremap(0x01f20010, 4096); 61 void __iomem *soc1 = ioremap(0x01f20010, 4096);
61 /* MSS_NVLINK_2_BASE */ 62 /* MSS_NVLINK_2_BASE */
@@ -87,6 +88,7 @@ static void gv11b_init_nvlink_soc_credits(struct gk20a *g)
87 writel_relaxed(val, soc4); 88 writel_relaxed(val, soc4);
88 val = readl_relaxed(soc4 + 4); 89 val = readl_relaxed(soc4 + 4);
89 writel_relaxed(val, soc4 + 4); 90 writel_relaxed(val, soc4 + 4);
91#endif
90 } 92 }
91} 93}
92 94
@@ -996,7 +998,7 @@ static void gv11b_fb_handle_mmu_fault_common(struct gk20a *g,
996 } 998 }
997} 999}
998 1000
999static void gv11b_fb_replay_or_cancel_faults(struct gk20a *g, 1001static int gv11b_fb_replay_or_cancel_faults(struct gk20a *g,
1000 u32 invalidate_replay_val) 1002 u32 invalidate_replay_val)
1001{ 1003{
1002 int err = 0; 1004 int err = 0;
@@ -1017,6 +1019,8 @@ static void gv11b_fb_replay_or_cancel_faults(struct gk20a *g,
1017 err = gv11b_fb_mmu_invalidate_replay(g, 1019 err = gv11b_fb_mmu_invalidate_replay(g,
1018 fb_mmu_invalidate_replay_start_ack_all_f()); 1020 fb_mmu_invalidate_replay_start_ack_all_f());
1019 } 1021 }
1022
1023 return err;
1020} 1024}
1021 1025
1022static void gv11b_fb_handle_mmu_nonreplay_replay_fault(struct gk20a *g, 1026static void gv11b_fb_handle_mmu_nonreplay_replay_fault(struct gk20a *g,