2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #466 from mailwl/nv-timeout

Stub NVGPU_IOCTL_CHANNEL_SET_TIMEOUT
This commit is contained in:
bunnei 2018-05-25 22:31:06 -04:00 committed by GitHub
commit 87f21657f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -34,6 +34,8 @@ u32 nvhost_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u
return AllocateObjectContext(input, output); return AllocateObjectContext(input, output);
case IoctlCommand::IocChannelGetWaitbaseCommand: case IoctlCommand::IocChannelGetWaitbaseCommand:
return GetWaitbase(input, output); return GetWaitbase(input, output);
case IoctlCommand::IocChannelSetTimeoutCommand:
return ChannelSetTimeout(input, output);
} }
if (command.group == NVGPU_IOCTL_MAGIC) { if (command.group == NVGPU_IOCTL_MAGIC) {
@ -149,4 +151,11 @@ u32 nvhost_gpu::GetWaitbase(const std::vector<u8>& input, std::vector<u8>& outpu
return 0; return 0;
} }
u32 nvhost_gpu::ChannelSetTimeout(const std::vector<u8>& input, std::vector<u8>& output) {
IoctlChannelSetTimeout params{};
std::memcpy(&params, input.data(), sizeof(IoctlChannelSetTimeout));
NGLOG_INFO(Service_NVDRV, "called, timeout=0x{:X}", params.timeout);
return 0;
}
} // namespace Service::Nvidia::Devices } // namespace Service::Nvidia::Devices

View file

@ -34,6 +34,7 @@ private:
IocAllocGPFIFOEx2Command = 0xC020481A, IocAllocGPFIFOEx2Command = 0xC020481A,
IocAllocObjCtxCommand = 0xC0104809, IocAllocObjCtxCommand = 0xC0104809,
IocChannelGetWaitbaseCommand = 0xC0080003, IocChannelGetWaitbaseCommand = 0xC0080003,
IocChannelSetTimeoutCommand = 0x40044803,
}; };
enum class CtxObjects : u32_le { enum class CtxObjects : u32_le {
@ -50,6 +51,11 @@ private:
}; };
static_assert(sizeof(IoctlSetNvmapFD) == 4, "IoctlSetNvmapFD is incorrect size"); static_assert(sizeof(IoctlSetNvmapFD) == 4, "IoctlSetNvmapFD is incorrect size");
struct IoctlChannelSetTimeout {
u32_le timeout;
};
static_assert(sizeof(IoctlChannelSetTimeout) == 4, "IoctlChannelSetTimeout is incorrect size");
struct IoctlClientData { struct IoctlClientData {
u64_le data; u64_le data;
}; };
@ -141,6 +147,7 @@ private:
u32 AllocateObjectContext(const std::vector<u8>& input, std::vector<u8>& output); u32 AllocateObjectContext(const std::vector<u8>& input, std::vector<u8>& output);
u32 SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& output); u32 SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& output);
u32 GetWaitbase(const std::vector<u8>& input, std::vector<u8>& output); u32 GetWaitbase(const std::vector<u8>& input, std::vector<u8>& output);
u32 ChannelSetTimeout(const std::vector<u8>& input, std::vector<u8>& output);
std::shared_ptr<nvmap> nvmap_dev; std::shared_ptr<nvmap> nvmap_dev;
}; };