diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-04-11 08:18:00 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-12 18:34:20 -0400 |
commit | f474a9e0e41d62f6a804c6501068da621556013e (patch) | |
tree | d440cd5a2be155a7013ddc8db47049fa772ec9b3 /drivers/gpu/nvgpu/common/linux | |
parent | c3c3a3c5715d6aa38544922b76a636135429fd22 (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')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_channel.c | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_tsg.c | 8 |
2 files changed, 8 insertions, 8 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); |
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c b/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c index 55a909dd..433b7c5d 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_tsg.c | |||
@@ -55,8 +55,8 @@ static int gk20a_tsg_get_event_data_from_id(struct tsg_gk20a *tsg, | |||
55 | bool event_found = false; | 55 | bool event_found = false; |
56 | 56 | ||
57 | nvgpu_mutex_acquire(&tsg->event_id_list_lock); | 57 | nvgpu_mutex_acquire(&tsg->event_id_list_lock); |
58 | list_for_each_entry(local_event_id_data, &tsg->event_id_list, | 58 | nvgpu_list_for_each_entry(local_event_id_data, &tsg->event_id_list, |
59 | event_id_node) { | 59 | gk20a_event_id_data, event_id_node) { |
60 | if (local_event_id_data->event_id == event_id) { | 60 | if (local_event_id_data->event_id == event_id) { |
61 | event_found = true; | 61 | event_found = true; |
62 | break; | 62 | break; |
@@ -148,10 +148,10 @@ static int gk20a_tsg_event_id_enable(struct tsg_gk20a *tsg, | |||
148 | if (err) | 148 | if (err) |
149 | goto clean_up_free; | 149 | goto clean_up_free; |
150 | 150 | ||
151 | INIT_LIST_HEAD(&event_id_data->event_id_node); | 151 | nvgpu_init_list_node(&event_id_data->event_id_node); |
152 | 152 | ||
153 | nvgpu_mutex_acquire(&tsg->event_id_list_lock); | 153 | nvgpu_mutex_acquire(&tsg->event_id_list_lock); |
154 | list_add_tail(&event_id_data->event_id_node, &tsg->event_id_list); | 154 | nvgpu_list_add_tail(&event_id_data->event_id_node, &tsg->event_id_list); |
155 | nvgpu_mutex_release(&tsg->event_id_list_lock); | 155 | nvgpu_mutex_release(&tsg->event_id_list_lock); |
156 | 156 | ||
157 | fd_install(local_fd, file); | 157 | fd_install(local_fd, file); |