summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/fb/fb_gv11b.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2018-07-02 17:30:26 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-07-12 23:44:13 -0400
commitb97bcb3c689426a1b099e88ceef4d55584e2362b (patch)
tree4ad683912a323eca81a493314db3d74b46b6aa71 /drivers/gpu/nvgpu/common/fb/fb_gv11b.h
parentb07a304ba3e747c80fe3e0a16caec88c8e1e8b28 (diff)
gpu: nvgpu: Move FB to common
Move all FB HAL implementations to common/fb. JIRA NVGPU-596 Change-Id: Id4ea09d608f5d6d1b245bddac09ecf1444b8ab30 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1769724 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/fb/fb_gv11b.h')
-rw-r--r--drivers/gpu/nvgpu/common/fb/fb_gv11b.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/fb/fb_gv11b.h b/drivers/gpu/nvgpu/common/fb/fb_gv11b.h
new file mode 100644
index 00000000..71fb3a41
--- /dev/null
+++ b/drivers/gpu/nvgpu/common/fb/fb_gv11b.h
@@ -0,0 +1,82 @@
1/*
2 * GV11B FB
3 *
4 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25#ifndef _NVGPU_GV11B_FB
26#define _NVGPU_GV11B_FB
27
28#define NONREPLAY_REG_INDEX 0
29#define REPLAY_REG_INDEX 1
30
31struct gk20a;
32struct gr_gk20a;
33
34void gv11b_fb_init_hw(struct gk20a *g);
35
36void gv11b_fb_init_fs_state(struct gk20a *g);
37void gv11b_fb_init_cbc(struct gk20a *g, struct gr_gk20a *gr);
38void gv11b_fb_reset(struct gk20a *g);
39void gv11b_fb_hub_isr(struct gk20a *g);
40
41bool gv11b_fb_is_fault_buf_enabled(struct gk20a *g, u32 index );
42void gv11b_fb_fault_buf_set_state_hw(struct gk20a *g,
43 u32 index, u32 state);
44void gv11b_fb_fault_buf_configure_hw(struct gk20a *g, u32 index);
45void gv11b_fb_enable_hub_intr(struct gk20a *g);
46void gv11b_fb_disable_hub_intr(struct gk20a *g);
47bool gv11b_fb_mmu_fault_pending(struct gk20a *g);
48void gv11b_fb_handle_dropped_mmu_fault(struct gk20a *g, u32 fault_status);
49void gv11b_fb_handle_other_fault_notify(struct gk20a *g,
50 u32 fault_status);
51void gv11b_fb_handle_mmu_nonreplay_replay_fault(struct gk20a *g,
52 u32 fault_status, u32 index);
53void gv11b_fb_handle_nonreplay_fault_overflow(struct gk20a *g,
54 u32 fault_status);
55void gv11b_fb_handle_replay_fault_overflow(struct gk20a *g,
56 u32 fault_status);
57void gv11b_fb_handle_replayable_mmu_fault(struct gk20a *g);
58void gv11b_handle_l2tlb_ecc_isr(struct gk20a *g, u32 ecc_status);
59void gv11b_handle_hubtlb_ecc_isr(struct gk20a *g, u32 ecc_status);
60void gv11b_handle_fillunit_ecc_isr(struct gk20a *g, u32 ecc_status);
61
62void fb_gv11b_write_mmu_fault_buffer_lo_hi(struct gk20a *g, u32 index,
63 u32 addr_lo, u32 addr_hi);
64u32 fb_gv11b_read_mmu_fault_buffer_get(struct gk20a *g, u32 index);
65void fb_gv11b_write_mmu_fault_buffer_get(struct gk20a *g, u32 index,
66 u32 reg_val);
67u32 fb_gv11b_read_mmu_fault_buffer_put(struct gk20a *g, u32 index);
68u32 fb_gv11b_read_mmu_fault_buffer_size(struct gk20a *g, u32 index);
69void fb_gv11b_write_mmu_fault_buffer_size(struct gk20a *g, u32 index,
70 u32 reg_val);
71void fb_gv11b_read_mmu_fault_addr_lo_hi(struct gk20a *g,
72 u32 *addr_lo, u32 *addr_hi);
73void fb_gv11b_read_mmu_fault_inst_lo_hi(struct gk20a *g,
74 u32 *inst_lo, u32 *inst_hi);
75u32 fb_gv11b_read_mmu_fault_info(struct gk20a *g);
76u32 fb_gv11b_read_mmu_fault_status(struct gk20a *g);
77void fb_gv11b_write_mmu_fault_status(struct gk20a *g, u32 reg_val);
78
79int gv11b_fb_mmu_invalidate_replay(struct gk20a *g,
80 u32 invalidate_replay_val);
81
82#endif