summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp
diff options
context:
space:
mode:
authorChloe Marcec <dmarcecguzman@gmail.com>2020-11-08 09:11:34 +0100
committerChloe Marcec <dmarcecguzman@gmail.com>2020-11-10 05:57:35 +0100
commit31c12de0fecec5889020191ca6de0b7fbf8c51ba (patch)
tree530f9569b0e145f83b6e876886698403a73b02f7 /src/core/hle/service/nvdrv/devices/nvhost_vic.cpp
parentMerge pull request #4909 from lioncash/interrupt (diff)
downloadyuzu-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/devices/nvhost_vic.cpp63
1 files changed, 35 insertions, 28 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp
index 60db54d00..347638490 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp
@@ -15,36 +15,43 @@ nvhost_vic::nvhost_vic(Core::System& system, std::shared_ptr<nvmap> nvmap_dev)
nvhost_vic::~nvhost_vic() = default;
-u32 nvhost_vic::ioctl(Ioctl command, const std::vector<u8>& input, const std::vector<u8>& input2,
- std::vector<u8>& output, std::vector<u8>& output2, IoctlCtrl& ctrl,
- IoctlVersion version) {
- LOG_DEBUG(Service_NVDRV, "called, command=0x{:08X}, input_size=0x{:X}, output_size=0x{:X}",
- command.raw, input.size(), output.size());
-
- switch (static_cast<IoctlCommand>(command.raw)) {
- case IoctlCommand::IocSetNVMAPfdCommand:
- return SetNVMAPfd(input);
- case IoctlCommand::IocSubmit:
- return Submit(input, output);
- case IoctlCommand::IocGetSyncpoint:
- return GetSyncpoint(input, output);
- case IoctlCommand::IocGetWaitbase:
- return GetWaitbase(input, output);
- case IoctlCommand::IocMapBuffer:
- case IoctlCommand::IocMapBuffer2:
- case IoctlCommand::IocMapBuffer3:
- case IoctlCommand::IocMapBuffer4:
- case IoctlCommand::IocMapBufferEx:
- return MapBuffer(input, output);
- case IoctlCommand::IocUnmapBuffer:
- case IoctlCommand::IocUnmapBuffer2:
- case IoctlCommand::IocUnmapBuffer3:
- case IoctlCommand::IocUnmapBufferEx:
- return UnmapBuffer(input, output);
+NvResult nvhost_vic::Ioctl1(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) {
+ switch (command.group) {
+ case 0x0:
+ switch (command.cmd) {
+ case 0x1:
+ return Submit(input, output);
+ case 0x2:
+ return GetSyncpoint(input, output);
+ case 0x3:
+ return GetWaitbase(input, output);
+ case 0x9:
+ return MapBuffer(input, output);
+ case 0xa:
+ return UnmapBuffer(input, output);
+ }
+ case 'H':
+ switch (command.cmd) {
+ case 0x1:
+ return SetNVMAPfd(input);
+ }
+ break;
}
- UNIMPLEMENTED_MSG("Unimplemented ioctl 0x{:X}", command.raw);
- return 0;
+ UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw);
+ return NvResult::NotImplemented;
+}
+
+NvResult nvhost_vic::Ioctl2(Ioctl command, const std::vector<u8>& input,
+ const std::vector<u8>& inline_input, std::vector<u8>& output) {
+ UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw);
+ return NvResult::NotImplemented;
+}
+
+NvResult nvhost_vic::Ioctl3(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output,
+ std::vector<u8>& inline_output) {
+ UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw);
+ return NvResult::NotImplemented;
}
} // namespace Service::Nvidia::Devices