summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_channel.c4
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c6
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/gr_vgpu.c9
3 files changed, 12 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
index b0d1ccff..5319b829 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
@@ -791,8 +791,8 @@ static int gk20a_channel_get_event_data_from_id(struct channel_gk20a *ch,
791 bool event_found = false; 791 bool event_found = false;
792 792
793 nvgpu_mutex_acquire(&ch->event_id_list_lock); 793 nvgpu_mutex_acquire(&ch->event_id_list_lock);
794 list_for_each_entry(local_event_id_data, &ch->event_id_list, 794 nvgpu_list_for_each_entry(local_event_id_data, &ch->event_id_list,
795 event_id_node) { 795 gk20a_event_id_data, event_id_node) {
796 if (local_event_id_data->event_id == event_id) { 796 if (local_event_id_data->event_id == event_id) {
797 event_found = true; 797 event_found = true;
798 break; 798 break;
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c
index 7a2a02e9..e06b41da 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/fifo_vgpu.c
@@ -692,7 +692,8 @@ int vgpu_fifo_force_reset_ch(struct channel_gk20a *ch,
692 692
693 nvgpu_rwsem_down_read(&tsg->ch_list_lock); 693 nvgpu_rwsem_down_read(&tsg->ch_list_lock);
694 694
695 list_for_each_entry(ch_tsg, &tsg->ch_list, ch_entry) { 695 nvgpu_list_for_each_entry(ch_tsg, &tsg->ch_list,
696 channel_gk20a, ch_entry) {
696 if (gk20a_channel_get(ch_tsg)) { 697 if (gk20a_channel_get(ch_tsg)) {
697 nvgpu_set_error_notifier(ch_tsg, err_code); 698 nvgpu_set_error_notifier(ch_tsg, err_code);
698 ch_tsg->has_timedout = true; 699 ch_tsg->has_timedout = true;
@@ -747,7 +748,8 @@ static void vgpu_fifo_set_ctx_mmu_error_ch_tsg(struct gk20a *g,
747 748
748 nvgpu_rwsem_down_read(&tsg->ch_list_lock); 749 nvgpu_rwsem_down_read(&tsg->ch_list_lock);
749 750
750 list_for_each_entry(ch_tsg, &tsg->ch_list, ch_entry) { 751 nvgpu_list_for_each_entry(ch_tsg, &tsg->ch_list,
752 channel_gk20a, ch_entry) {
751 if (gk20a_channel_get(ch_tsg)) { 753 if (gk20a_channel_get(ch_tsg)) {
752 vgpu_fifo_set_ctx_mmu_error_ch(g, ch_tsg); 754 vgpu_fifo_set_ctx_mmu_error_ch(g, ch_tsg);
753 gk20a_channel_put(ch_tsg); 755 gk20a_channel_put(ch_tsg);
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gr_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/gr_vgpu.c
index 33551d17..4d36e66b 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/gr_vgpu.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/gr_vgpu.c
@@ -1132,7 +1132,8 @@ static int vgpu_gr_suspend_resume_contexts(struct gk20a *g,
1132 } 1132 }
1133 1133
1134 n = 0; 1134 n = 0;
1135 list_for_each_entry(ch_data, &dbg_s->ch_list, ch_entry) 1135 nvgpu_list_for_each_entry(ch_data, &dbg_s->ch_list,
1136 dbg_session_channel_data, ch_entry)
1136 n++; 1137 n++;
1137 1138
1138 if (oob_size < n * sizeof(u16)) { 1139 if (oob_size < n * sizeof(u16)) {
@@ -1145,7 +1146,8 @@ static int vgpu_gr_suspend_resume_contexts(struct gk20a *g,
1145 p = &msg.params.suspend_contexts; 1146 p = &msg.params.suspend_contexts;
1146 p->num_channels = n; 1147 p->num_channels = n;
1147 n = 0; 1148 n = 0;
1148 list_for_each_entry(ch_data, &dbg_s->ch_list, ch_entry) 1149 nvgpu_list_for_each_entry(ch_data, &dbg_s->ch_list,
1150 dbg_session_channel_data, ch_entry)
1149 oob[n++] = (u16)ch_data->chid; 1151 oob[n++] = (u16)ch_data->chid;
1150 1152
1151 err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); 1153 err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg));
@@ -1155,7 +1157,8 @@ static int vgpu_gr_suspend_resume_contexts(struct gk20a *g,
1155 } 1157 }
1156 1158
1157 if (p->resident_chid != (u16)~0) { 1159 if (p->resident_chid != (u16)~0) {
1158 list_for_each_entry(ch_data, &dbg_s->ch_list, ch_entry) { 1160 nvgpu_list_for_each_entry(ch_data, &dbg_s->ch_list,
1161 dbg_session_channel_data, ch_entry) {
1159 if (ch_data->chid == p->resident_chid) { 1162 if (ch_data->chid == p->resident_chid) {
1160 channel_fd = ch_data->channel_fd; 1163 channel_fd = ch_data->channel_fd;
1161 break; 1164 break;