diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2014-06-11 07:15:54 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:16 -0400 |
commit | e6eb4b59f6e8753c64133a4b86c6278ceef98e93 (patch) | |
tree | 9c718a8a033e559daf4fc90cee2bc4429c788c32 /drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |
parent | 6f492c3834fe18fe3d00d0024b8178250bed7276 (diff) |
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 <tbergstrom@nvidia.com>
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/416610
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) | |||
538 | 538 | ||
539 | f->channel = kzalloc(f->num_channels * sizeof(*f->channel), | 539 | f->channel = kzalloc(f->num_channels * sizeof(*f->channel), |
540 | GFP_KERNEL); | 540 | GFP_KERNEL); |
541 | f->tsg = kzalloc(f->num_channels * sizeof(*f->tsg), | ||
542 | GFP_KERNEL); | ||
541 | f->pbdma_map = kzalloc(f->num_pbdma * sizeof(*f->pbdma_map), | 543 | f->pbdma_map = kzalloc(f->num_pbdma * sizeof(*f->pbdma_map), |
542 | GFP_KERNEL); | 544 | GFP_KERNEL); |
543 | f->engine_info = kzalloc(f->max_engines * sizeof(*f->engine_info), | 545 | 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) | |||
566 | f->userd.gpu_va + chid * f->userd_entry_size; | 568 | f->userd.gpu_va + chid * f->userd_entry_size; |
567 | 569 | ||
568 | gk20a_init_channel_support(g, chid); | 570 | gk20a_init_channel_support(g, chid); |
571 | gk20a_init_tsg_support(g, chid); | ||
569 | } | 572 | } |
570 | mutex_init(&f->ch_inuse_mutex); | 573 | mutex_init(&f->ch_inuse_mutex); |
574 | mutex_init(&f->tsg_inuse_mutex); | ||
571 | 575 | ||
572 | f->remove_support = gk20a_remove_fifo_support; | 576 | f->remove_support = gk20a_remove_fifo_support; |
573 | 577 | ||