summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_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/channel_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/channel_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
index 42550632..d530f47d 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
@@ -201,7 +201,6 @@ struct channel_gk20a {
201 struct channel_ctx_gk20a ch_ctx; 201 struct channel_ctx_gk20a ch_ctx;
202 202
203 struct mem_desc inst_block; 203 struct mem_desc inst_block;
204 struct mem_desc_sub ramfc;
205 204
206 u64 userd_iova; 205 u64 userd_iova;
207 u64 userd_gpu_va; 206 u64 userd_gpu_va;
@@ -314,8 +313,6 @@ int gk20a_channel_release(struct inode *inode, struct file *filp);
314struct channel_gk20a *gk20a_get_channel_from_file(int fd); 313struct channel_gk20a *gk20a_get_channel_from_file(int fd);
315void gk20a_channel_update(struct channel_gk20a *c); 314void gk20a_channel_update(struct channel_gk20a *c);
316 315
317void gk20a_init_channel(struct gpu_ops *gops);
318
319/* returns ch if reference was obtained */ 316/* returns ch if reference was obtained */
320struct channel_gk20a *__must_check _gk20a_channel_get(struct channel_gk20a *ch, 317struct channel_gk20a *__must_check _gk20a_channel_get(struct channel_gk20a *ch,
321 const char *caller); 318 const char *caller);
@@ -336,7 +333,6 @@ struct channel_gk20a *gk20a_open_new_channel_with_cb(struct gk20a *g,
336 void *update_fn_data, 333 void *update_fn_data,
337 int runlist_id, 334 int runlist_id,
338 bool is_privileged_channel); 335 bool is_privileged_channel);
339void channel_gk20a_unbind(struct channel_gk20a *ch_gk20a);
340 336
341int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, 337int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
342 struct nvgpu_gpfifo *gpfifo, 338 struct nvgpu_gpfifo *gpfifo,
@@ -351,14 +347,6 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
351int gk20a_alloc_channel_gpfifo(struct channel_gk20a *c, 347int gk20a_alloc_channel_gpfifo(struct channel_gk20a *c,
352 struct nvgpu_alloc_gpfifo_ex_args *args); 348 struct nvgpu_alloc_gpfifo_ex_args *args);
353 349
354void channel_gk20a_unbind(struct channel_gk20a *ch_gk20a);
355void channel_gk20a_disable(struct channel_gk20a *ch);
356int channel_gk20a_alloc_inst(struct gk20a *g, struct channel_gk20a *ch);
357void channel_gk20a_free_inst(struct gk20a *g, struct channel_gk20a *ch);
358u32 channel_gk20a_pbdma_acquire_val(struct channel_gk20a *c);
359int channel_gk20a_setup_ramfc(struct channel_gk20a *c,
360 u64 gpfifo_base, u32 gpfifo_entries, u32 flags);
361void channel_gk20a_enable(struct channel_gk20a *ch);
362void gk20a_channel_timeout_restart_all_channels(struct gk20a *g); 350void gk20a_channel_timeout_restart_all_channels(struct gk20a *g);
363 351
364bool channel_gk20a_is_prealloc_enabled(struct channel_gk20a *c); 352bool channel_gk20a_is_prealloc_enabled(struct channel_gk20a *c);
@@ -369,13 +357,9 @@ bool channel_gk20a_joblist_is_empty(struct channel_gk20a *c);
369int gk20a_channel_get_timescale_from_timeslice(struct gk20a *g, 357int gk20a_channel_get_timescale_from_timeslice(struct gk20a *g,
370 int timeslice_period, 358 int timeslice_period,
371 int *__timeslice_timeout, int *__timeslice_scale); 359 int *__timeslice_timeout, int *__timeslice_scale);
372int gk20a_channel_set_priority(struct channel_gk20a *ch, u32 priority);
373int gk20a_channel_set_timeslice(struct channel_gk20a *ch, unsigned int timeslice);
374int gk20a_channel_set_runlist_interleave(struct channel_gk20a *ch, 360int gk20a_channel_set_runlist_interleave(struct channel_gk20a *ch,
375 u32 level); 361 u32 level);
376void gk20a_channel_event_id_post_event(struct channel_gk20a *ch, 362void gk20a_channel_event_id_post_event(struct channel_gk20a *ch,
377 u32 event_id); 363 u32 event_id);
378 364
379void gk20a_channel_setup_ramfc_for_privileged_channel(struct channel_gk20a *c);
380
381#endif /* CHANNEL_GK20A_H */ 365#endif /* CHANNEL_GK20A_H */