diff options
author | Joshua Bakita <bakitajoshua@gmail.com> | 2023-10-29 13:07:40 -0400 |
---|---|---|
committer | Joshua Bakita <bakitajoshua@gmail.com> | 2023-10-29 13:10:52 -0400 |
commit | 2c5337a24f7f2d02989dfb733c55d6d8c7e90493 (patch) | |
tree | b9f1028cb443b03190b710c0d7ee640bf5958631 /include/os/linux/ioctl_tsg.c | |
parent | aa06f84f03cba7ad1aae5cd527355bb3d8c152a6 (diff) |
Update includes to L4T r32.7.4 and drop nvgpu/gk20a.h dependency
Also add instructions for updating `include/`. These files are now
only needed to build on Linux 4.9-based Tegra platforms.
Diffstat (limited to 'include/os/linux/ioctl_tsg.c')
-rw-r--r-- | include/os/linux/ioctl_tsg.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/include/os/linux/ioctl_tsg.c b/include/os/linux/ioctl_tsg.c index 2f8cb3a..296b02b 100644 --- a/include/os/linux/ioctl_tsg.c +++ b/include/os/linux/ioctl_tsg.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2014-2021, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -134,7 +134,10 @@ static int gk20a_tsg_unbind_channel_fd(struct tsg_gk20a *tsg, int ch_fd) | |||
134 | goto out; | 134 | goto out; |
135 | } | 135 | } |
136 | 136 | ||
137 | err = gk20a_tsg_unbind_channel(ch); | 137 | err = gk20a_tsg_unbind_channel(ch, false); |
138 | if (err == -EAGAIN) { | ||
139 | goto out; | ||
140 | } | ||
138 | 141 | ||
139 | /* | 142 | /* |
140 | * Mark the channel timedout since channel unbound from TSG | 143 | * Mark the channel timedout since channel unbound from TSG |
@@ -307,17 +310,10 @@ static int gk20a_tsg_event_id_enable(struct tsg_gk20a *tsg, | |||
307 | snprintf(name, sizeof(name), "nvgpu-event%d-fd%d", | 310 | snprintf(name, sizeof(name), "nvgpu-event%d-fd%d", |
308 | event_id, local_fd); | 311 | event_id, local_fd); |
309 | 312 | ||
310 | file = anon_inode_getfile(name, &gk20a_event_id_ops, | ||
311 | NULL, O_RDWR); | ||
312 | if (IS_ERR(file)) { | ||
313 | err = PTR_ERR(file); | ||
314 | goto clean_up; | ||
315 | } | ||
316 | |||
317 | event_id_data = nvgpu_kzalloc(tsg->g, sizeof(*event_id_data)); | 313 | event_id_data = nvgpu_kzalloc(tsg->g, sizeof(*event_id_data)); |
318 | if (!event_id_data) { | 314 | if (!event_id_data) { |
319 | err = -ENOMEM; | 315 | err = -ENOMEM; |
320 | goto clean_up_file; | 316 | goto clean_up; |
321 | } | 317 | } |
322 | event_id_data->g = g; | 318 | event_id_data->g = g; |
323 | event_id_data->id = tsg->tsgid; | 319 | event_id_data->id = tsg->tsgid; |
@@ -330,12 +326,18 @@ static int gk20a_tsg_event_id_enable(struct tsg_gk20a *tsg, | |||
330 | 326 | ||
331 | nvgpu_init_list_node(&event_id_data->event_id_node); | 327 | nvgpu_init_list_node(&event_id_data->event_id_node); |
332 | 328 | ||
329 | file = anon_inode_getfile(name, &gk20a_event_id_ops, | ||
330 | event_id_data, O_RDWR); | ||
331 | if (IS_ERR(file)) { | ||
332 | err = PTR_ERR(file); | ||
333 | goto clean_up_free; | ||
334 | } | ||
335 | |||
333 | nvgpu_mutex_acquire(&tsg->event_id_list_lock); | 336 | nvgpu_mutex_acquire(&tsg->event_id_list_lock); |
334 | nvgpu_list_add_tail(&event_id_data->event_id_node, &tsg->event_id_list); | 337 | nvgpu_list_add_tail(&event_id_data->event_id_node, &tsg->event_id_list); |
335 | nvgpu_mutex_release(&tsg->event_id_list_lock); | 338 | nvgpu_mutex_release(&tsg->event_id_list_lock); |
336 | 339 | ||
337 | fd_install(local_fd, file); | 340 | fd_install(local_fd, file); |
338 | file->private_data = event_id_data; | ||
339 | 341 | ||
340 | *fd = local_fd; | 342 | *fd = local_fd; |
341 | 343 | ||
@@ -343,8 +345,6 @@ static int gk20a_tsg_event_id_enable(struct tsg_gk20a *tsg, | |||
343 | 345 | ||
344 | clean_up_free: | 346 | clean_up_free: |
345 | nvgpu_kfree(g, event_id_data); | 347 | nvgpu_kfree(g, event_id_data); |
346 | clean_up_file: | ||
347 | fput(file); | ||
348 | clean_up: | 348 | clean_up: |
349 | put_unused_fd(local_fd); | 349 | put_unused_fd(local_fd); |
350 | free_ref: | 350 | free_ref: |