mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
Add a device node for management of nvs control fifo buffers for scheduling domains. The current design consists of a master structure struct nvgpu_nvs_domain_sched_ctrl for management of users as well as control queues. Initially all users are added as non-exclusive users. Subsequent changes will add support for IOCTLS to manage opening of Send/Receive and Event buffers, querying characteristics etc. In subsequent changes, a user that tries to open a Send/Receive queue will first try to reserve itself as an exclusive user and only if that succeeds can proceed with creation of both Send/Receive queues. Exclusive users will be reset to non-exclusive users just before they close their device node handle. Jira NVGPU-8128 Change-Id: I15a83f70cd49c685510a9fd5ea4476ebb3544378 Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2691404 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> GVS: Gerrit_Virtual_Submit
33 lines
1.2 KiB
C
33 lines
1.2 KiB
C
/*
|
|
* Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms and conditions of the GNU General Public License,
|
|
* version 2, as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*/
|
|
|
|
#ifndef NVGPU_OS_LINUX_IOCTL_NVS_H
|
|
#define NVGPU_OS_LINUX_IOCTL_NVS_H
|
|
|
|
#include <nvgpu/types.h>
|
|
|
|
struct inode;
|
|
struct file;
|
|
|
|
int nvgpu_nvs_dev_open(struct inode *inode, struct file *filp);
|
|
int nvgpu_nvs_dev_release(struct inode *inode, struct file *filp);
|
|
long nvgpu_nvs_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
|
|
ssize_t nvgpu_nvs_dev_read(struct file *filp, char __user *buf,
|
|
size_t size, loff_t *off);
|
|
struct nvgpu_nvs_domain *nvgpu_nvs_domain_get_from_file(int fd);
|
|
|
|
int nvgpu_nvs_ctrl_fifo_ops_open(struct inode *inode, struct file *filp);
|
|
int nvgpu_nvs_ctrl_fifo_ops_release(struct inode *inode, struct file *filp);
|
|
|
|
#endif
|