From e6eb4b59f6e8753c64133a4b86c6278ceef98e93 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Wed, 11 Jun 2014 16:45:54 +0530 Subject: gpu: nvgpu: add kernel APIs for TSG support Add support to create/destroy TSGs using node "/dev/nvhost-tsg-gpu" Provide below IOCTLs to bind/unbind channels to/from TSGs : NVGPU_TSG_IOCTL_BIND_CHANNEL NVGPU_TSG_IOCTL_UNBIND_CHANNEL Bug 1470692 Change-Id: Iaf9f16a522379eb943906624548f8d28fc6d4486 Signed-off-by: Terje Bergstrom Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/416610 --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 3c0611e6..e9febb77 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -538,6 +538,8 @@ static int gk20a_init_fifo_setup_sw(struct gk20a *g) f->channel = kzalloc(f->num_channels * sizeof(*f->channel), GFP_KERNEL); + f->tsg = kzalloc(f->num_channels * sizeof(*f->tsg), + GFP_KERNEL); f->pbdma_map = kzalloc(f->num_pbdma * sizeof(*f->pbdma_map), GFP_KERNEL); f->engine_info = kzalloc(f->max_engines * sizeof(*f->engine_info), @@ -566,8 +568,10 @@ static int gk20a_init_fifo_setup_sw(struct gk20a *g) f->userd.gpu_va + chid * f->userd_entry_size; gk20a_init_channel_support(g, chid); + gk20a_init_tsg_support(g, chid); } mutex_init(&f->ch_inuse_mutex); + mutex_init(&f->tsg_inuse_mutex); f->remove_support = gk20a_remove_fifo_support; -- cgit v1.2.2