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

nvhost_ctrl: Stub out IocCtrlEventWaitAsyncCommand.

This commit is contained in:
bunnei 2018-05-29 22:35:41 -04:00
parent 0d843eaba6
commit 0658973a4e
2 changed files with 9 additions and 5 deletions

View file

@ -16,7 +16,9 @@ u32 nvhost_ctrl::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<
case IoctlCommand::IocGetConfigCommand: case IoctlCommand::IocGetConfigCommand:
return NvOsGetConfigU32(input, output); return NvOsGetConfigU32(input, output);
case IoctlCommand::IocCtrlEventWaitCommand: case IoctlCommand::IocCtrlEventWaitCommand:
return IocCtrlEventWait(input, output); return IocCtrlEventWait(input, output, false);
case IoctlCommand::IocCtrlEventWaitAsyncCommand:
return IocCtrlEventWait(input, output, true);
} }
UNIMPLEMENTED_MSG("Unimplemented ioctl"); UNIMPLEMENTED_MSG("Unimplemented ioctl");
return 0; return 0;
@ -45,11 +47,13 @@ u32 nvhost_ctrl::NvOsGetConfigU32(const std::vector<u8>& input, std::vector<u8>&
return 0; return 0;
} }
u32 nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& output) { u32 nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& output,
bool is_async) {
IocCtrlEventWaitParams params{}; IocCtrlEventWaitParams params{};
std::memcpy(&params, input.data(), sizeof(params)); std::memcpy(&params, input.data(), sizeof(params));
NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, syncpt_id={} threshold={} timeout={}", NGLOG_WARNING(Service_NVDRV,
params.syncpt_id, params.threshold, params.timeout); "(STUBBED) called, syncpt_id={}, threshold={}, timeout={}, is_async={}",
params.syncpt_id, params.threshold, params.timeout, is_async);
// TODO(Subv): Implement actual syncpt waiting. // TODO(Subv): Implement actual syncpt waiting.
params.value = 0; params.value = 0;

View file

@ -134,7 +134,7 @@ private:
u32 NvOsGetConfigU32(const std::vector<u8>& input, std::vector<u8>& output); u32 NvOsGetConfigU32(const std::vector<u8>& input, std::vector<u8>& output);
u32 IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& output); u32 IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& output, bool is_async);
}; };
} // namespace Service::Nvidia::Devices } // namespace Service::Nvidia::Devices