summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2018-05-25 22:31:06 -0400
committerGravatar GitHub2018-05-25 22:31:06 -0400
commit87f21657f86a4fbcda7ecef9c097874f88c18325 (patch)
tree416456ef5fd6701ebe79dc2b55d3a764fba28e66 /src
parentGetAudioRendererWorkBufferSize impl (#465) (diff)
parentStub NVGPU_IOCTL_CHANNEL_SET_TIMEOUT (diff)
downloadyuzu-87f21657f86a4fbcda7ecef9c097874f88c18325.tar.gz
yuzu-87f21657f86a4fbcda7ecef9c097874f88c18325.tar.xz
yuzu-87f21657f86a4fbcda7ecef9c097874f88c18325.zip
Merge pull request #466 from mailwl/nv-timeout
Stub NVGPU_IOCTL_CHANNEL_SET_TIMEOUT
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp9
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_gpu.h7
2 files changed, 16 insertions, 0 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp
index 03126aeee..79aab87f9 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp
@@ -34,6 +34,8 @@ u32 nvhost_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u
34 return AllocateObjectContext(input, output); 34 return AllocateObjectContext(input, output);
35 case IoctlCommand::IocChannelGetWaitbaseCommand: 35 case IoctlCommand::IocChannelGetWaitbaseCommand:
36 return GetWaitbase(input, output); 36 return GetWaitbase(input, output);
37 case IoctlCommand::IocChannelSetTimeoutCommand:
38 return ChannelSetTimeout(input, output);
37 } 39 }
38 40
39 if (command.group == NVGPU_IOCTL_MAGIC) { 41 if (command.group == NVGPU_IOCTL_MAGIC) {
@@ -149,4 +151,11 @@ u32 nvhost_gpu::GetWaitbase(const std::vector<u8>& input, std::vector<u8>& outpu
149 return 0; 151 return 0;
150} 152}
151 153
154u32 nvhost_gpu::ChannelSetTimeout(const std::vector<u8>& input, std::vector<u8>& output) {
155 IoctlChannelSetTimeout params{};
156 std::memcpy(&params, input.data(), sizeof(IoctlChannelSetTimeout));
157 NGLOG_INFO(Service_NVDRV, "called, timeout=0x{:X}", params.timeout);
158 return 0;
159}
160
152} // namespace Service::Nvidia::Devices 161} // namespace Service::Nvidia::Devices
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h
index beb1c4970..2ecf818f3 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h
@@ -34,6 +34,7 @@ private:
34 IocAllocGPFIFOEx2Command = 0xC020481A, 34 IocAllocGPFIFOEx2Command = 0xC020481A,
35 IocAllocObjCtxCommand = 0xC0104809, 35 IocAllocObjCtxCommand = 0xC0104809,
36 IocChannelGetWaitbaseCommand = 0xC0080003, 36 IocChannelGetWaitbaseCommand = 0xC0080003,
37 IocChannelSetTimeoutCommand = 0x40044803,
37 }; 38 };
38 39
39 enum class CtxObjects : u32_le { 40 enum class CtxObjects : u32_le {
@@ -50,6 +51,11 @@ private:
50 }; 51 };
51 static_assert(sizeof(IoctlSetNvmapFD) == 4, "IoctlSetNvmapFD is incorrect size"); 52 static_assert(sizeof(IoctlSetNvmapFD) == 4, "IoctlSetNvmapFD is incorrect size");
52 53
54 struct IoctlChannelSetTimeout {
55 u32_le timeout;
56 };
57 static_assert(sizeof(IoctlChannelSetTimeout) == 4, "IoctlChannelSetTimeout is incorrect size");
58
53 struct IoctlClientData { 59 struct IoctlClientData {
54 u64_le data; 60 u64_le data;
55 }; 61 };
@@ -141,6 +147,7 @@ private:
141 u32 AllocateObjectContext(const std::vector<u8>& input, std::vector<u8>& output); 147 u32 AllocateObjectContext(const std::vector<u8>& input, std::vector<u8>& output);
142 u32 SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& output); 148 u32 SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& output);
143 u32 GetWaitbase(const std::vector<u8>& input, std::vector<u8>& output); 149 u32 GetWaitbase(const std::vector<u8>& input, std::vector<u8>& output);
150 u32 ChannelSetTimeout(const std::vector<u8>& input, std::vector<u8>& output);
144 151
145 std::shared_ptr<nvmap> nvmap_dev; 152 std::shared_ptr<nvmap> nvmap_dev;
146}; 153};