summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-04-11 08:18:00 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-12 18:34:20 -0400
commitf474a9e0e41d62f6a804c6501068da621556013e (patch)
treed440cd5a2be155a7013ddc8db47049fa772ec9b3 /drivers/gpu/nvgpu/common/linux/ioctl_channel.c
parentc3c3a3c5715d6aa38544922b76a636135429fd22 (diff)
gpu: nvgpu: use nvgpu list for event id list
Use nvgpu list APIs instead of linux list APIs to store event IDs into channel and TSGs Jira NVGPU-13 Change-Id: I51e4b6ab3b38c845a870901b4d498927ca404a78 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1460574 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_channel.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_channel.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
index 0e121aa7..8da9eacb 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
@@ -574,13 +574,13 @@ static int gk20a_event_id_release(struct inode *inode, struct file *filp)
574 struct tsg_gk20a *tsg = g->fifo.tsg + event_id_data->id; 574 struct tsg_gk20a *tsg = g->fifo.tsg + event_id_data->id;
575 575
576 nvgpu_mutex_acquire(&tsg->event_id_list_lock); 576 nvgpu_mutex_acquire(&tsg->event_id_list_lock);
577 list_del_init(&event_id_data->event_id_node); 577 nvgpu_list_del(&event_id_data->event_id_node);
578 nvgpu_mutex_release(&tsg->event_id_list_lock); 578 nvgpu_mutex_release(&tsg->event_id_list_lock);
579 } else { 579 } else {
580 struct channel_gk20a *ch = g->fifo.channel + event_id_data->id; 580 struct channel_gk20a *ch = g->fifo.channel + event_id_data->id;
581 581
582 nvgpu_mutex_acquire(&ch->event_id_list_lock); 582 nvgpu_mutex_acquire(&ch->event_id_list_lock);
583 list_del_init(&event_id_data->event_id_node); 583 nvgpu_list_del(&event_id_data->event_id_node);
584 nvgpu_mutex_release(&ch->event_id_list_lock); 584 nvgpu_mutex_release(&ch->event_id_list_lock);
585 } 585 }
586 586
@@ -697,10 +697,10 @@ static int gk20a_channel_event_id_enable(struct channel_gk20a *ch,
697 err = nvgpu_mutex_init(&event_id_data->lock); 697 err = nvgpu_mutex_init(&event_id_data->lock);
698 if (err) 698 if (err)
699 goto clean_up_free; 699 goto clean_up_free;
700 INIT_LIST_HEAD(&event_id_data->event_id_node); 700 nvgpu_init_list_node(&event_id_data->event_id_node);
701 701
702 nvgpu_mutex_acquire(&ch->event_id_list_lock); 702 nvgpu_mutex_acquire(&ch->event_id_list_lock);
703 list_add_tail(&event_id_data->event_id_node, &ch->event_id_list); 703 nvgpu_list_add_tail(&event_id_data->event_id_node, &ch->event_id_list);
704 nvgpu_mutex_release(&ch->event_id_list_lock); 704 nvgpu_mutex_release(&ch->event_id_list_lock);
705 705
706 fd_install(local_fd, file); 706 fd_install(local_fd, file);