diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2018-07-02 17:30:26 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-12 23:44:13 -0400 |
commit | b97bcb3c689426a1b099e88ceef4d55584e2362b (patch) | |
tree | 4ad683912a323eca81a493314db3d74b46b6aa71 /drivers/gpu/nvgpu/common/fb/fb_gv11b.h | |
parent | b07a304ba3e747c80fe3e0a16caec88c8e1e8b28 (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.h | 82 |
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 | |||
31 | struct gk20a; | ||
32 | struct gr_gk20a; | ||
33 | |||
34 | void gv11b_fb_init_hw(struct gk20a *g); | ||
35 | |||
36 | void gv11b_fb_init_fs_state(struct gk20a *g); | ||
37 | void gv11b_fb_init_cbc(struct gk20a *g, struct gr_gk20a *gr); | ||
38 | void gv11b_fb_reset(struct gk20a *g); | ||
39 | void gv11b_fb_hub_isr(struct gk20a *g); | ||
40 | |||
41 | bool gv11b_fb_is_fault_buf_enabled(struct gk20a *g, u32 index ); | ||
42 | void gv11b_fb_fault_buf_set_state_hw(struct gk20a *g, | ||
43 | u32 index, u32 state); | ||
44 | void gv11b_fb_fault_buf_configure_hw(struct gk20a *g, u32 index); | ||
45 | void gv11b_fb_enable_hub_intr(struct gk20a *g); | ||
46 | void gv11b_fb_disable_hub_intr(struct gk20a *g); | ||
47 | bool gv11b_fb_mmu_fault_pending(struct gk20a *g); | ||
48 | void gv11b_fb_handle_dropped_mmu_fault(struct gk20a *g, u32 fault_status); | ||
49 | void gv11b_fb_handle_other_fault_notify(struct gk20a *g, | ||
50 | u32 fault_status); | ||
51 | void gv11b_fb_handle_mmu_nonreplay_replay_fault(struct gk20a *g, | ||
52 | u32 fault_status, u32 index); | ||
53 | void gv11b_fb_handle_nonreplay_fault_overflow(struct gk20a *g, | ||
54 | u32 fault_status); | ||
55 | void gv11b_fb_handle_replay_fault_overflow(struct gk20a *g, | ||
56 | u32 fault_status); | ||
57 | void gv11b_fb_handle_replayable_mmu_fault(struct gk20a *g); | ||
58 | void gv11b_handle_l2tlb_ecc_isr(struct gk20a *g, u32 ecc_status); | ||
59 | void gv11b_handle_hubtlb_ecc_isr(struct gk20a *g, u32 ecc_status); | ||
60 | void gv11b_handle_fillunit_ecc_isr(struct gk20a *g, u32 ecc_status); | ||
61 | |||
62 | void fb_gv11b_write_mmu_fault_buffer_lo_hi(struct gk20a *g, u32 index, | ||
63 | u32 addr_lo, u32 addr_hi); | ||
64 | u32 fb_gv11b_read_mmu_fault_buffer_get(struct gk20a *g, u32 index); | ||
65 | void fb_gv11b_write_mmu_fault_buffer_get(struct gk20a *g, u32 index, | ||
66 | u32 reg_val); | ||
67 | u32 fb_gv11b_read_mmu_fault_buffer_put(struct gk20a *g, u32 index); | ||
68 | u32 fb_gv11b_read_mmu_fault_buffer_size(struct gk20a *g, u32 index); | ||
69 | void fb_gv11b_write_mmu_fault_buffer_size(struct gk20a *g, u32 index, | ||
70 | u32 reg_val); | ||
71 | void fb_gv11b_read_mmu_fault_addr_lo_hi(struct gk20a *g, | ||
72 | u32 *addr_lo, u32 *addr_hi); | ||
73 | void fb_gv11b_read_mmu_fault_inst_lo_hi(struct gk20a *g, | ||
74 | u32 *inst_lo, u32 *inst_hi); | ||
75 | u32 fb_gv11b_read_mmu_fault_info(struct gk20a *g); | ||
76 | u32 fb_gv11b_read_mmu_fault_status(struct gk20a *g); | ||
77 | void fb_gv11b_write_mmu_fault_status(struct gk20a *g, u32 reg_val); | ||
78 | |||
79 | int gv11b_fb_mmu_invalidate_replay(struct gk20a *g, | ||
80 | u32 invalidate_replay_val); | ||
81 | |||
82 | #endif | ||