summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-03-14 16:39:59 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-28 18:55:48 -0400
commitf04031e5e8837abb2be3feb0ee30e1af54de7845 (patch)
tree02a61de9f9a283a2c0fb02d7a204d2dd2176f5ff /drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
parent3e39798997f0726472e18a17462216094c084074 (diff)
gpu: nvgpu: Move programming of host registers to fifo
Move code that touches host registers and instance block to fifo HAL. This involves adding HAL ops for the fifo HAL functions that get called from outside fifo. This clears responsibility of channel by leaving it only managing channels in software and push buffers. channel had member ramfc defined, but it was not used, to remove it. pbdma_acquire_val consisted both of channel logic and hardware programming. The channel logic was moved to the caller and only hardware programming was moved. Change-Id: Id005787f6cc91276b767e8e86325caf966913de9 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1322423 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
index a9703385..06269fa5 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
@@ -331,8 +331,8 @@ void gk20a_get_ch_runlist_entry(struct channel_gk20a *ch, u32 *runlist);
331void gk20a_fifo_set_runlist_state(struct gk20a *g, u32 runlists_mask, 331void gk20a_fifo_set_runlist_state(struct gk20a *g, u32 runlists_mask,
332 u32 runlist_state, int runlist_mutex_state); 332 u32 runlist_state, int runlist_mutex_state);
333 333
334u32 gk20a_userd_gp_get(struct gk20a *g, struct channel_gk20a *c); 334u32 gk20a_fifo_userd_gp_get(struct gk20a *g, struct channel_gk20a *c);
335void gk20a_userd_gp_put(struct gk20a *g, struct channel_gk20a *c); 335void gk20a_fifo_userd_gp_put(struct gk20a *g, struct channel_gk20a *c);
336 336
337bool gk20a_is_fault_engine_subid_gpc(struct gk20a *g, u32 engine_subid); 337bool gk20a_is_fault_engine_subid_gpc(struct gk20a *g, u32 engine_subid);
338#ifdef CONFIG_DEBUG_FS 338#ifdef CONFIG_DEBUG_FS
@@ -351,8 +351,11 @@ void gk20a_dump_eng_status(struct gk20a *g,
351 struct gk20a_debug_output *o); 351 struct gk20a_debug_output *o);
352const char *gk20a_decode_ccsr_chan_status(u32 index); 352const char *gk20a_decode_ccsr_chan_status(u32 index);
353const char *gk20a_decode_pbdma_chan_eng_ctx_status(u32 index); 353const char *gk20a_decode_pbdma_chan_eng_ctx_status(u32 index);
354void gk20a_fifo_enable_channel(struct channel_gk20a *ch);
355void gk20a_fifo_disable_channel(struct channel_gk20a *ch);
354 356
355struct channel_gk20a *gk20a_refch_from_inst_ptr(struct gk20a *g, u64 inst_ptr); 357struct channel_gk20a *gk20a_refch_from_inst_ptr(struct gk20a *g, u64 inst_ptr);
358void gk20a_fifo_channel_unbind(struct channel_gk20a *ch_gk20a);
356 359
357u32 gk20a_fifo_intr_0_error_mask(struct gk20a *g); 360u32 gk20a_fifo_intr_0_error_mask(struct gk20a *g);
358 361
@@ -361,5 +364,16 @@ int gk20a_fifo_is_preempt_pending(struct gk20a *g, u32 id, unsigned int id_type,
361int __locked_fifo_preempt(struct gk20a *g, u32 id, bool is_tsg); 364int __locked_fifo_preempt(struct gk20a *g, u32 id, bool is_tsg);
362void __locked_fifo_preempt_timeout_rc(struct gk20a *g, u32 id, 365void __locked_fifo_preempt_timeout_rc(struct gk20a *g, u32 id,
363 unsigned int id_type); 366 unsigned int id_type);
367int gk20a_fifo_setup_ramfc(struct channel_gk20a *c,
368 u64 gpfifo_base, u32 gpfifo_entries,
369 unsigned long timeout, u32 flags);
370int gk20a_fifo_set_priority(struct channel_gk20a *ch, u32 priority);
371int gk20a_fifo_set_timeslice(struct channel_gk20a *ch, unsigned int timeslice);
372void gk20a_fifo_setup_ramfc_for_privileged_channel(struct channel_gk20a *c);
373int gk20a_fifo_alloc_inst(struct gk20a *g, struct channel_gk20a *ch);
374void gk20a_fifo_free_inst(struct gk20a *g, struct channel_gk20a *ch);
375int gk20a_fifo_setup_userd(struct channel_gk20a *c);
376u32 gk20a_fifo_pbdma_acquire_val(u64 timeout);
377
364 378
365#endif /*__GR_GK20A_H__*/ 379#endif /*__GR_GK20A_H__*/