diff options
author | Chloe Marcec <dmarcecguzman@gmail.com> | 2020-11-08 09:11:34 +0100 |
---|---|---|
committer | Chloe Marcec <dmarcecguzman@gmail.com> | 2020-11-10 05:57:35 +0100 |
commit | 31c12de0fecec5889020191ca6de0b7fbf8c51ba (patch) | |
tree | 530f9569b0e145f83b6e876886698403a73b02f7 /src/core/hle/service/nvdrv/nvdrv.h | |
parent | Merge pull request #4909 from lioncash/interrupt (diff) | |
download | yuzu-31c12de0fecec5889020191ca6de0b7fbf8c51ba.tar yuzu-31c12de0fecec5889020191ca6de0b7fbf8c51ba.tar.gz yuzu-31c12de0fecec5889020191ca6de0b7fbf8c51ba.tar.bz2 yuzu-31c12de0fecec5889020191ca6de0b7fbf8c51ba.tar.lz yuzu-31c12de0fecec5889020191ca6de0b7fbf8c51ba.tar.xz yuzu-31c12de0fecec5889020191ca6de0b7fbf8c51ba.tar.zst yuzu-31c12de0fecec5889020191ca6de0b7fbf8c51ba.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nvdrv/nvdrv.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/core/hle/service/nvdrv/nvdrv.h b/src/core/hle/service/nvdrv/nvdrv.h index f3d863dac..3ccc62a76 100644 --- a/src/core/hle/service/nvdrv/nvdrv.h +++ b/src/core/hle/service/nvdrv/nvdrv.h @@ -112,14 +112,23 @@ public: return std::static_pointer_cast<T>(itr->second); } + NvResult VerifyFd(DeviceFD fd) const; + /// Opens a device node and returns a file descriptor to it. - u32 Open(const std::string& device_name); + DeviceFD Open(const std::string& device_name); + /// Sends an ioctl command to the specified file descriptor. - u32 Ioctl(u32 fd, u32 command, const std::vector<u8>& input, const std::vector<u8>& input2, - std::vector<u8>& output, std::vector<u8>& output2, IoctlCtrl& ctrl, - IoctlVersion version); + NvResult Ioctl1(DeviceFD fd, Ioctl command, const std::vector<u8>& input, + std::vector<u8>& output); + + NvResult Ioctl2(DeviceFD fd, Ioctl command, const std::vector<u8>& input, + const std::vector<u8>& inline_input, std::vector<u8>& output); + + NvResult Ioctl3(DeviceFD fd, Ioctl command, const std::vector<u8>& input, + std::vector<u8>& output, std::vector<u8>& inline_output); + /// Closes a device file descriptor and returns operation success. - ResultCode Close(u32 fd); + NvResult Close(DeviceFD fd); void SignalSyncpt(const u32 syncpoint_id, const u32 value); @@ -132,10 +141,10 @@ private: SyncpointManager syncpoint_manager; /// Id to use for the next open file descriptor. - u32 next_fd = 1; + DeviceFD next_fd = 1; /// Mapping of file descriptors to the devices they reference. - std::unordered_map<u32, std::shared_ptr<Devices::nvdevice>> open_files; + std::unordered_map<DeviceFD, std::shared_ptr<Devices::nvdevice>> open_files; /// Mapping of device node names to their implementation. std::unordered_map<std::string, std::shared_ptr<Devices::nvdevice>> devices; |