From f474a9e0e41d62f6a804c6501068da621556013e Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 11 Apr 2017 17:48:00 +0530 Subject: 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 Reviewed-on: http://git-master/r/1460574 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/ioctl_channel.c | 8 ++++---- drivers/gpu/nvgpu/common/linux/ioctl_tsg.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'drivers/gpu/nvgpu/common') 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) struct tsg_gk20a *tsg = g->fifo.tsg + event_id_data->id; nvgpu_mutex_acquire(&tsg->event_id_list_lock); - list_del_init(&event_id_data->event_id_node); + nvgpu_list_del(&event_id_data->event_id_node); nvgpu_mutex_release(&tsg->event_id_list_lock); } else { struct channel_gk20a *ch = g->fifo.channel + event_id_data->id; nvgpu_mutex_acquire(&ch->event_id_list_lock); - list_del_init(&event_id_data->event_id_node); + nvgpu_list_del(&event_id_data->event_id_node); nvgpu_mutex_release(&ch->event_id_list_lock); } @@ -697,10 +697,10 @@ static int gk20a_channel_event_id_enable(struct channel_gk20a *ch, err = nvgpu_mutex_init(&event_id_data->lock); if (err) goto clean_up_free; - INIT_LIST_HEAD(&event_id_data->event_id_node); + nvgpu_init_list_node(&event_id_data->event_id_node); nvgpu_mutex_acquire(&ch->event_id_list_lock); - list_add_tail(&event_id_data->event_id_node, &ch->event_id_list); + nvgpu_list_add_tail(&event_id_data->event_id_node, &ch->event_id_list); nvgpu_mutex_release(&ch->event_id_list_lock); 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, bool event_found = false; nvgpu_mutex_acquire(&tsg->event_id_list_lock); - list_for_each_entry(local_event_id_data, &tsg->event_id_list, - event_id_node) { + nvgpu_list_for_each_entry(local_event_id_data, &tsg->event_id_list, + gk20a_event_id_data, event_id_node) { if (local_event_id_data->event_id == event_id) { event_found = true; break; @@ -148,10 +148,10 @@ static int gk20a_tsg_event_id_enable(struct tsg_gk20a *tsg, if (err) goto clean_up_free; - INIT_LIST_HEAD(&event_id_data->event_id_node); + nvgpu_init_list_node(&event_id_data->event_id_node); nvgpu_mutex_acquire(&tsg->event_id_list_lock); - list_add_tail(&event_id_data->event_id_node, &tsg->event_id_list); + nvgpu_list_add_tail(&event_id_data->event_id_node, &tsg->event_id_list); nvgpu_mutex_release(&tsg->event_id_list_lock); fd_install(local_fd, file); -- cgit v1.2.2