summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/fb
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2018-09-12 17:51:40 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-09-27 18:05:34 -0400
commitf89ea110417e1c83cf21f495d6da7cdc8138a29f (patch)
tree198f25d08d650e5a42470eb1823b441c07d8b71f /drivers/gpu/nvgpu/common/fb
parente3ae03e17abd452c157545234348692364b4b9f6 (diff)
gpu: nvgpu: Move FB reset to MC unit
FB reset is done by accessing MC register. Move the code to MC unit. JIRA NVGPU-954 Change-Id: I1636887af805f016da5490af65e808f9ac015cde Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1823385 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/fb')
-rw-r--r--drivers/gpu/nvgpu/common/fb/fb_gm20b.c14
-rw-r--r--drivers/gpu/nvgpu/common/fb/fb_gm20b.h1
-rw-r--r--drivers/gpu/nvgpu/common/fb/fb_gp106.c2
-rw-r--r--drivers/gpu/nvgpu/common/fb/fb_gp106.h2
-rw-r--r--drivers/gpu/nvgpu/common/fb/fb_gv11b.c7
5 files changed, 4 insertions, 22 deletions
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gm20b.c b/drivers/gpu/nvgpu/common/fb/fb_gm20b.c
index 9a13ecca..bf509caf 100644
--- a/drivers/gpu/nvgpu/common/fb/fb_gm20b.c
+++ b/drivers/gpu/nvgpu/common/fb/fb_gm20b.c
@@ -33,25 +33,11 @@
33#include <nvgpu/io.h> 33#include <nvgpu/io.h>
34#include <nvgpu/timers.h> 34#include <nvgpu/timers.h>
35 35
36#include <nvgpu/hw/gm20b/hw_mc_gm20b.h>
37#include <nvgpu/hw/gm20b/hw_fb_gm20b.h> 36#include <nvgpu/hw/gm20b/hw_fb_gm20b.h>
38 37
39#define VPR_INFO_FETCH_WAIT (5) 38#define VPR_INFO_FETCH_WAIT (5)
40#define WPR_INFO_ADDR_ALIGNMENT 0x0000000c 39#define WPR_INFO_ADDR_ALIGNMENT 0x0000000c
41 40
42void gm20b_fb_reset(struct gk20a *g)
43{
44 u32 val;
45
46 nvgpu_log_info(g, "reset gk20a fb");
47
48 val = gk20a_readl(g, mc_elpg_enable_r());
49 val |= mc_elpg_enable_xbar_enabled_f()
50 | mc_elpg_enable_pfb_enabled_f()
51 | mc_elpg_enable_hub_enabled_f();
52 gk20a_writel(g, mc_elpg_enable_r(), val);
53}
54
55void gm20b_fb_init_hw(struct gk20a *g) 41void gm20b_fb_init_hw(struct gk20a *g)
56{ 42{
57 u64 addr = nvgpu_mem_get_addr(g, &g->mm.sysmem_flush) >> 8; 43 u64 addr = nvgpu_mem_get_addr(g, &g->mm.sysmem_flush) >> 8;
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gm20b.h b/drivers/gpu/nvgpu/common/fb/fb_gm20b.h
index bc240ae3..cb5b5d9a 100644
--- a/drivers/gpu/nvgpu/common/fb/fb_gm20b.h
+++ b/drivers/gpu/nvgpu/common/fb/fb_gm20b.h
@@ -31,7 +31,6 @@ struct gk20a;
31struct wpr_carveout_info; 31struct wpr_carveout_info;
32struct nvgpu_mem; 32struct nvgpu_mem;
33 33
34void gm20b_fb_reset(struct gk20a *g);
35void gm20b_fb_init_hw(struct gk20a *g); 34void gm20b_fb_init_hw(struct gk20a *g);
36int gm20b_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb); 35int gm20b_fb_tlb_invalidate(struct gk20a *g, struct nvgpu_mem *pdb);
37void fb_gm20b_init_fs_state(struct gk20a *g); 36void fb_gm20b_init_fs_state(struct gk20a *g);
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gp106.c b/drivers/gpu/nvgpu/common/fb/fb_gp106.c
index 27fce8a7..567749c9 100644
--- a/drivers/gpu/nvgpu/common/fb/fb_gp106.c
+++ b/drivers/gpu/nvgpu/common/fb/fb_gp106.c
@@ -32,7 +32,7 @@
32#define HW_SCRUB_TIMEOUT_DEFAULT 100 /* usec */ 32#define HW_SCRUB_TIMEOUT_DEFAULT 100 /* usec */
33#define HW_SCRUB_TIMEOUT_MAX 2000000 /* usec */ 33#define HW_SCRUB_TIMEOUT_MAX 2000000 /* usec */
34 34
35void gp106_fb_reset(struct gk20a *g) 35void gp106_fb_init_fs_state(struct gk20a *g)
36{ 36{
37 u32 val; 37 u32 val;
38 38
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gp106.h b/drivers/gpu/nvgpu/common/fb/fb_gp106.h
index bb4ccd6b..25f5fce2 100644
--- a/drivers/gpu/nvgpu/common/fb/fb_gp106.h
+++ b/drivers/gpu/nvgpu/common/fb/fb_gp106.h
@@ -24,7 +24,7 @@
24#define FB_GP106_H 24#define FB_GP106_H
25struct gpu_ops; 25struct gpu_ops;
26 26
27void gp106_fb_reset(struct gk20a *g); 27void gp106_fb_init_fs_state(struct gk20a *g);
28size_t gp106_fb_get_vidmem_size(struct gk20a *g); 28size_t gp106_fb_get_vidmem_size(struct gk20a *g);
29 29
30#endif 30#endif
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gv11b.c b/drivers/gpu/nvgpu/common/fb/fb_gv11b.c
index 75968ba6..30bf17f8 100644
--- a/drivers/gpu/nvgpu/common/fb/fb_gv11b.c
+++ b/drivers/gpu/nvgpu/common/fb/fb_gv11b.c
@@ -73,6 +73,8 @@ void gv11b_fb_init_fs_state(struct gk20a *g)
73{ 73{
74 nvgpu_log(g, gpu_dbg_fn, "initialize gv11b fb"); 74 nvgpu_log(g, gpu_dbg_fn, "initialize gv11b fb");
75 75
76 gv11b_init_nvlink_soc_credits(g);
77
76 nvgpu_log(g, gpu_dbg_info, "fbhub active ltcs %x", 78 nvgpu_log(g, gpu_dbg_info, "fbhub active ltcs %x",
77 gk20a_readl(g, fb_fbhub_num_active_ltcs_r())); 79 gk20a_readl(g, fb_fbhub_num_active_ltcs_r()));
78 80
@@ -143,11 +145,6 @@ void gv11b_fb_init_cbc(struct gk20a *g, struct gr_gk20a *gr)
143 145
144} 146}
145 147
146void gv11b_fb_reset(struct gk20a *g)
147{
148 gv11b_init_nvlink_soc_credits(g);
149}
150
151static const char * const invalid_str = "invalid"; 148static const char * const invalid_str = "invalid";
152 149
153static const char *const fault_type_descs_gv11b[] = { 150static const char *const fault_type_descs_gv11b[] = {