mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-08 12:59:59 +00:00
Rename to align with switchbrew and remove gpu function (#4714)
* Rename to align with switchbrew * Rename to align with switchbrew and remove gpu function that checks if clearing should be done.
This commit is contained in:
parent
98f68d06f1
commit
bca9591660
2 changed files with 10 additions and 16 deletions
|
@ -36,8 +36,8 @@ u32 nvhost_ctrl::ioctl(Ioctl command, const std::vector<u8>& input, const std::v
|
||||||
return IocCtrlEventRegister(input, output);
|
return IocCtrlEventRegister(input, output);
|
||||||
case IoctlCommand::IocCtrlEventUnregisterCommand:
|
case IoctlCommand::IocCtrlEventUnregisterCommand:
|
||||||
return IocCtrlEventUnregister(input, output);
|
return IocCtrlEventUnregister(input, output);
|
||||||
case IoctlCommand::IocCtrlEventSignalCommand:
|
case IoctlCommand::IocCtrlClearEventWaitCommand:
|
||||||
return IocCtrlEventSignal(input, output);
|
return IocCtrlClearEventWait(input, output);
|
||||||
default:
|
default:
|
||||||
UNIMPLEMENTED_MSG("Unimplemented ioctl");
|
UNIMPLEMENTED_MSG("Unimplemented ioctl");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -154,24 +154,18 @@ u32 nvhost_ctrl::IocCtrlEventUnregister(const std::vector<u8>& input, std::vecto
|
||||||
return NvResult::Success;
|
return NvResult::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 nvhost_ctrl::IocCtrlEventSignal(const std::vector<u8>& input, std::vector<u8>& output) {
|
u32 nvhost_ctrl::IocCtrlClearEventWait(const std::vector<u8>& input, std::vector<u8>& output) {
|
||||||
IocCtrlEventSignalParams params{};
|
IocCtrlEventSignalParams params{};
|
||||||
std::memcpy(¶ms, input.data(), sizeof(params));
|
std::memcpy(¶ms, input.data(), sizeof(params));
|
||||||
// TODO(Blinkhawk): This is normally called when an NvEvents timeout on WaitSynchronization
|
u32 event_id = params.event_id & 0x00FF;
|
||||||
// It is believed from RE to cancel the GPU Event. However, better research is required
|
LOG_WARNING(Service_NVDRV, "cleared event wait on, event_id: {:X}", event_id);
|
||||||
u32 event_id = params.user_event_id & 0x00FF;
|
|
||||||
LOG_WARNING(Service_NVDRV, "(STUBBED) called, user_event_id: {:X}", event_id);
|
|
||||||
if (event_id >= MaxNvEvents) {
|
if (event_id >= MaxNvEvents) {
|
||||||
return NvResult::BadParameter;
|
return NvResult::BadParameter;
|
||||||
}
|
}
|
||||||
if (events_interface.status[event_id] == EventState::Waiting) {
|
if (events_interface.status[event_id] == EventState::Waiting) {
|
||||||
auto& gpu = system.GPU();
|
|
||||||
if (gpu.CancelSyncptInterrupt(events_interface.assigned_syncpt[event_id],
|
|
||||||
events_interface.assigned_value[event_id])) {
|
|
||||||
events_interface.LiberateEvent(event_id);
|
events_interface.LiberateEvent(event_id);
|
||||||
events_interface.events[event_id].writable->Signal();
|
events_interface.events[event_id].writable->Signal();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return NvResult::Success;
|
return NvResult::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ private:
|
||||||
IocSyncptWaitexCommand = 0xC0100019,
|
IocSyncptWaitexCommand = 0xC0100019,
|
||||||
IocSyncptReadMaxCommand = 0xC008001A,
|
IocSyncptReadMaxCommand = 0xC008001A,
|
||||||
IocGetConfigCommand = 0xC183001B,
|
IocGetConfigCommand = 0xC183001B,
|
||||||
IocCtrlEventSignalCommand = 0xC004001C,
|
IocCtrlClearEventWaitCommand = 0xC004001C,
|
||||||
IocCtrlEventWaitCommand = 0xC010001D,
|
IocCtrlEventWaitCommand = 0xC010001D,
|
||||||
IocCtrlEventWaitAsyncCommand = 0xC010001E,
|
IocCtrlEventWaitAsyncCommand = 0xC010001E,
|
||||||
IocCtrlEventRegisterCommand = 0xC004001F,
|
IocCtrlEventRegisterCommand = 0xC004001F,
|
||||||
|
@ -94,7 +94,7 @@ private:
|
||||||
static_assert(sizeof(IocGetConfigParams) == 387, "IocGetConfigParams is incorrect size");
|
static_assert(sizeof(IocGetConfigParams) == 387, "IocGetConfigParams is incorrect size");
|
||||||
|
|
||||||
struct IocCtrlEventSignalParams {
|
struct IocCtrlEventSignalParams {
|
||||||
u32_le user_event_id;
|
u32_le event_id;
|
||||||
};
|
};
|
||||||
static_assert(sizeof(IocCtrlEventSignalParams) == 4,
|
static_assert(sizeof(IocCtrlEventSignalParams) == 4,
|
||||||
"IocCtrlEventSignalParams is incorrect size");
|
"IocCtrlEventSignalParams is incorrect size");
|
||||||
|
@ -142,7 +142,7 @@ private:
|
||||||
|
|
||||||
u32 IocCtrlEventUnregister(const std::vector<u8>& input, std::vector<u8>& output);
|
u32 IocCtrlEventUnregister(const std::vector<u8>& input, std::vector<u8>& output);
|
||||||
|
|
||||||
u32 IocCtrlEventSignal(const std::vector<u8>& input, std::vector<u8>& output);
|
u32 IocCtrlClearEventWait(const std::vector<u8>& input, std::vector<u8>& output);
|
||||||
|
|
||||||
EventInterface& events_interface;
|
EventInterface& events_interface;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue