diff options
author | Sunny He <suhe@nvidia.com> | 2017-06-30 18:54:03 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-24 02:35:06 -0400 |
commit | 8140c51e6cd212517fc343e6f8f8694bbad98f3b (patch) | |
tree | cf453fdf283484bbbaaf22c5690550bf546c1f22 /drivers/gpu/nvgpu/gv11b/fifo_gv11b.h | |
parent | d9f906c1e0f06f54e545727817d227a0bac46a0a (diff) |
gpu: nvgpu: gv11b: Reorg fifo HAL initialization
Reorganize HAL initialization to remove inheritance and construct
the gpu_ops struct at compile time. This patch only covers the fifo
sub-module of the gpu_ops struct.
Perform HAL function assignments in hal_gxxxx.c through the
population of a chip-specific copy of gpu_ops.
Jira NVGPU-74
Change-Id: I7c81edfa785a4ecafef41aae7b82d6b1707d294e
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1522554
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/fifo_gv11b.h')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/fifo_gv11b.h | 58 |
1 files changed, 57 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h index 8a2b32f8..3fb2f6e9 100644 --- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h | |||
@@ -40,10 +40,66 @@ | |||
40 | #define CHANNEL_INFO_VEID0 0 | 40 | #define CHANNEL_INFO_VEID0 0 |
41 | 41 | ||
42 | struct gpu_ops; | 42 | struct gpu_ops; |
43 | void gv11b_init_fifo(struct gpu_ops *gops); | 43 | |
44 | void gv11b_fifo_reset_pbdma_and_eng_faulted(struct gk20a *g, | 44 | void gv11b_fifo_reset_pbdma_and_eng_faulted(struct gk20a *g, |
45 | struct channel_gk20a *refch, | 45 | struct channel_gk20a *refch, |
46 | u32 faulted_pbdma, u32 faulted_engine); | 46 | u32 faulted_pbdma, u32 faulted_engine); |
47 | void gv11b_mmu_fault_id_to_eng_pbdma_id_and_veid(struct gk20a *g, | 47 | void gv11b_mmu_fault_id_to_eng_pbdma_id_and_veid(struct gk20a *g, |
48 | u32 mmu_fault_id, u32 *active_engine_id, u32 *veid, u32 *pbdma_id); | 48 | u32 mmu_fault_id, u32 *active_engine_id, u32 *veid, u32 *pbdma_id); |
49 | |||
50 | void gv11b_get_tsg_runlist_entry(struct tsg_gk20a *tsg, u32 *runlist); | ||
51 | void gv11b_get_ch_runlist_entry(struct channel_gk20a *c, u32 *runlist); | ||
52 | int channel_gv11b_setup_ramfc(struct channel_gk20a *c, | ||
53 | u64 gpfifo_base, u32 gpfifo_entries, | ||
54 | unsigned long acquire_timeout, u32 flags); | ||
55 | u32 gv11b_userd_gp_get(struct gk20a *g, struct channel_gk20a *c); | ||
56 | u64 gv11b_userd_pb_get(struct gk20a *g, struct channel_gk20a *c); | ||
57 | void gv11b_userd_gp_put(struct gk20a *g, struct channel_gk20a *c); | ||
58 | void channel_gv11b_unbind(struct channel_gk20a *ch); | ||
59 | u32 gv11b_fifo_get_num_fifos(struct gk20a *g); | ||
60 | bool gv11b_is_fault_engine_subid_gpc(struct gk20a *g, u32 engine_subid); | ||
61 | void gv11b_dump_channel_status_ramfc(struct gk20a *g, | ||
62 | struct gk20a_debug_output *o, | ||
63 | u32 chid, | ||
64 | struct ch_state *ch_state); | ||
65 | void gv11b_dump_eng_status(struct gk20a *g, | ||
66 | struct gk20a_debug_output *o); | ||
67 | u32 gv11b_fifo_intr_0_error_mask(struct gk20a *g); | ||
68 | int gv11b_fifo_is_preempt_pending(struct gk20a *g, u32 id, | ||
69 | unsigned int id_type, unsigned int timeout_rc_type); | ||
70 | int gv11b_fifo_preempt_channel(struct gk20a *g, u32 chid); | ||
71 | int gv11b_fifo_preempt_tsg(struct gk20a *g, u32 tsgid); | ||
72 | int gv11b_fifo_preempt_ch_tsg(struct gk20a *g, u32 id, | ||
73 | unsigned int id_type, unsigned int timeout_rc_type); | ||
74 | void gv11b_fifo_teardown_ch_tsg(struct gk20a *g, u32 act_eng_bitmask, | ||
75 | u32 id, unsigned int id_type, unsigned int rc_type, | ||
76 | struct mmu_fault_info *mmfault); | ||
77 | void gv11b_fifo_init_pbdma_intr_descs(struct fifo_gk20a *f); | ||
78 | int gv11b_init_fifo_reset_enable_hw(struct gk20a *g); | ||
79 | bool gv11b_fifo_handle_sched_error(struct gk20a *g); | ||
80 | bool gv11b_fifo_handle_ctxsw_timeout(struct gk20a *g, u32 fifo_intr); | ||
81 | unsigned int gv11b_fifo_handle_pbdma_intr_0(struct gk20a *g, | ||
82 | u32 pbdma_id, u32 pbdma_intr_0, | ||
83 | u32 *handled, u32 *error_notifier); | ||
84 | unsigned int gv11b_fifo_handle_pbdma_intr_1(struct gk20a *g, | ||
85 | u32 pbdma_id, u32 pbdma_intr_1, | ||
86 | u32 *handled, u32 *error_notifier); | ||
87 | void gv11b_fifo_init_eng_method_buffers(struct gk20a *g, | ||
88 | struct tsg_gk20a *tsg); | ||
89 | void gv11b_fifo_deinit_eng_method_buffers(struct gk20a *g, | ||
90 | struct tsg_gk20a *tsg); | ||
91 | int gv11b_fifo_alloc_syncpt_buf(struct channel_gk20a *c, | ||
92 | u32 syncpt_id, struct nvgpu_mem *syncpt_buf); | ||
93 | void gv11b_fifo_free_syncpt_buf(struct channel_gk20a *c, | ||
94 | struct nvgpu_mem *syncpt_buf); | ||
95 | void gv11b_fifo_add_syncpt_wait_cmd(struct gk20a *g, | ||
96 | struct priv_cmd_entry *cmd, u32 off, | ||
97 | u32 id, u32 thresh, u64 gpu_va_base); | ||
98 | u32 gv11b_fifo_get_syncpt_wait_cmd_size(void); | ||
99 | void gv11b_fifo_add_syncpt_incr_cmd(struct gk20a *g, | ||
100 | bool wfi_cmd, struct priv_cmd_entry *cmd, | ||
101 | u32 id, u64 gpu_va_base); | ||
102 | u32 gv11b_fifo_get_syncpt_incr_cmd_size(bool wfi_cmd); | ||
103 | int gv11b_init_fifo_setup_hw(struct gk20a *g); | ||
104 | |||
49 | #endif | 105 | #endif |