From f04031e5e8837abb2be3feb0ee30e1af54de7845 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 14 Mar 2017 13:39:59 -0700 Subject: 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 Reviewed-on: http://git-master/r/1322423 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gm20b/fifo_gm20b.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'drivers/gpu/nvgpu/gm20b') diff --git a/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c b/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c index f09da825..fc653357 100644 --- a/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/fifo_gm20b.c @@ -188,16 +188,18 @@ void gm20b_init_fifo(struct gpu_ops *gops) { gops->fifo.init_fifo_setup_hw = gk20a_init_fifo_setup_hw; gops->fifo.bind_channel = channel_gm20b_bind; - gops->fifo.unbind_channel = channel_gk20a_unbind; - gops->fifo.disable_channel = channel_gk20a_disable; - gops->fifo.enable_channel = channel_gk20a_enable; - gops->fifo.alloc_inst = channel_gk20a_alloc_inst; - gops->fifo.free_inst = channel_gk20a_free_inst; - gops->fifo.setup_ramfc = channel_gk20a_setup_ramfc; - gops->fifo.channel_set_priority = gk20a_channel_set_priority; - gops->fifo.channel_set_timeslice = gk20a_channel_set_timeslice; - gops->fifo.userd_gp_get = gk20a_userd_gp_get; - gops->fifo.userd_gp_put = gk20a_userd_gp_put; + gops->fifo.unbind_channel = gk20a_fifo_channel_unbind; + gops->fifo.disable_channel = gk20a_fifo_disable_channel; + gops->fifo.enable_channel = gk20a_fifo_enable_channel; + gops->fifo.alloc_inst = gk20a_fifo_alloc_inst; + gops->fifo.free_inst = gk20a_fifo_free_inst; + gops->fifo.setup_ramfc = gk20a_fifo_setup_ramfc; + gops->fifo.channel_set_priority = gk20a_fifo_set_priority; + gops->fifo.channel_set_timeslice = gk20a_fifo_set_timeslice; + gops->fifo.setup_userd = gk20a_fifo_setup_userd; + gops->fifo.userd_gp_get = gk20a_fifo_userd_gp_get; + gops->fifo.userd_gp_put = gk20a_fifo_userd_gp_put; + gops->fifo.pbdma_acquire_val = gk20a_fifo_pbdma_acquire_val; gops->fifo.preempt_channel = gk20a_fifo_preempt_channel; gops->fifo.preempt_tsg = gk20a_fifo_preempt_tsg; -- cgit v1.2.2