diff options
| author | 2020-11-01 01:24:17 -0700 | |
|---|---|---|
| committer | 2020-11-01 01:24:17 -0700 | |
| commit | bca95916603ad5913281c72c2a0620bddf2f3010 (patch) | |
| tree | d1ace78f9b62459c9b8e476baaa7b367d3de58e8 /src/core | |
| parent | Merge pull request #4853 from ReinUsesLisp/fcmp-imm (diff) | |
| download | yuzu-bca95916603ad5913281c72c2a0620bddf2f3010.tar.gz yuzu-bca95916603ad5913281c72c2a0620bddf2f3010.tar.xz yuzu-bca95916603ad5913281c72c2a0620bddf2f3010.zip | |
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.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | 20 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl.h | 6 |
2 files changed, 10 insertions, 16 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index b27ee0502..75d9191ff 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | |||
| @@ -36,8 +36,8 @@ u32 nvhost_ctrl::ioctl(Ioctl command, const std::vector<u8>& input, const std::v | |||
| 36 | return IocCtrlEventRegister(input, output); | 36 | return IocCtrlEventRegister(input, output); |
| 37 | case IoctlCommand::IocCtrlEventUnregisterCommand: | 37 | case IoctlCommand::IocCtrlEventUnregisterCommand: |
| 38 | return IocCtrlEventUnregister(input, output); | 38 | return IocCtrlEventUnregister(input, output); |
| 39 | case IoctlCommand::IocCtrlEventSignalCommand: | 39 | case IoctlCommand::IocCtrlClearEventWaitCommand: |
| 40 | return IocCtrlEventSignal(input, output); | 40 | return IocCtrlClearEventWait(input, output); |
| 41 | default: | 41 | default: |
| 42 | UNIMPLEMENTED_MSG("Unimplemented ioctl"); | 42 | UNIMPLEMENTED_MSG("Unimplemented ioctl"); |
| 43 | return 0; | 43 | return 0; |
| @@ -154,23 +154,17 @@ u32 nvhost_ctrl::IocCtrlEventUnregister(const std::vector<u8>& input, std::vecto | |||
| 154 | return NvResult::Success; | 154 | return NvResult::Success; |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | u32 nvhost_ctrl::IocCtrlEventSignal(const std::vector<u8>& input, std::vector<u8>& output) { | 157 | u32 nvhost_ctrl::IocCtrlClearEventWait(const std::vector<u8>& input, std::vector<u8>& output) { |
| 158 | IocCtrlEventSignalParams params{}; | 158 | IocCtrlEventSignalParams params{}; |
| 159 | std::memcpy(¶ms, input.data(), sizeof(params)); | 159 | std::memcpy(¶ms, input.data(), sizeof(params)); |
| 160 | // TODO(Blinkhawk): This is normally called when an NvEvents timeout on WaitSynchronization | 160 | u32 event_id = params.event_id & 0x00FF; |
| 161 | // It is believed from RE to cancel the GPU Event. However, better research is required | 161 | LOG_WARNING(Service_NVDRV, "cleared event wait on, event_id: {:X}", event_id); |
| 162 | u32 event_id = params.user_event_id & 0x00FF; | ||
| 163 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, user_event_id: {:X}", event_id); | ||
| 164 | if (event_id >= MaxNvEvents) { | 162 | if (event_id >= MaxNvEvents) { |
| 165 | return NvResult::BadParameter; | 163 | return NvResult::BadParameter; |
| 166 | } | 164 | } |
| 167 | if (events_interface.status[event_id] == EventState::Waiting) { | 165 | if (events_interface.status[event_id] == EventState::Waiting) { |
| 168 | auto& gpu = system.GPU(); | 166 | events_interface.LiberateEvent(event_id); |
| 169 | if (gpu.CancelSyncptInterrupt(events_interface.assigned_syncpt[event_id], | 167 | events_interface.events[event_id].writable->Signal(); |
| 170 | events_interface.assigned_value[event_id])) { | ||
| 171 | events_interface.LiberateEvent(event_id); | ||
| 172 | events_interface.events[event_id].writable->Signal(); | ||
| 173 | } | ||
| 174 | } | 168 | } |
| 175 | return NvResult::Success; | 169 | return NvResult::Success; |
| 176 | } | 170 | } |
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h index 9898623de..f7b04d9f1 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.h | |||
| @@ -31,7 +31,7 @@ private: | |||
| 31 | IocSyncptWaitexCommand = 0xC0100019, | 31 | IocSyncptWaitexCommand = 0xC0100019, |
| 32 | IocSyncptReadMaxCommand = 0xC008001A, | 32 | IocSyncptReadMaxCommand = 0xC008001A, |
| 33 | IocGetConfigCommand = 0xC183001B, | 33 | IocGetConfigCommand = 0xC183001B, |
| 34 | IocCtrlEventSignalCommand = 0xC004001C, | 34 | IocCtrlClearEventWaitCommand = 0xC004001C, |
| 35 | IocCtrlEventWaitCommand = 0xC010001D, | 35 | IocCtrlEventWaitCommand = 0xC010001D, |
| 36 | IocCtrlEventWaitAsyncCommand = 0xC010001E, | 36 | IocCtrlEventWaitAsyncCommand = 0xC010001E, |
| 37 | IocCtrlEventRegisterCommand = 0xC004001F, | 37 | IocCtrlEventRegisterCommand = 0xC004001F, |
| @@ -94,7 +94,7 @@ private: | |||
| 94 | static_assert(sizeof(IocGetConfigParams) == 387, "IocGetConfigParams is incorrect size"); | 94 | static_assert(sizeof(IocGetConfigParams) == 387, "IocGetConfigParams is incorrect size"); |
| 95 | 95 | ||
| 96 | struct IocCtrlEventSignalParams { | 96 | struct IocCtrlEventSignalParams { |
| 97 | u32_le user_event_id; | 97 | u32_le event_id; |
| 98 | }; | 98 | }; |
| 99 | static_assert(sizeof(IocCtrlEventSignalParams) == 4, | 99 | static_assert(sizeof(IocCtrlEventSignalParams) == 4, |
| 100 | "IocCtrlEventSignalParams is incorrect size"); | 100 | "IocCtrlEventSignalParams is incorrect size"); |
| @@ -142,7 +142,7 @@ private: | |||
| 142 | 142 | ||
| 143 | u32 IocCtrlEventUnregister(const std::vector<u8>& input, std::vector<u8>& output); | 143 | u32 IocCtrlEventUnregister(const std::vector<u8>& input, std::vector<u8>& output); |
| 144 | 144 | ||
| 145 | u32 IocCtrlEventSignal(const std::vector<u8>& input, std::vector<u8>& output); | 145 | u32 IocCtrlClearEventWait(const std::vector<u8>& input, std::vector<u8>& output); |
| 146 | 146 | ||
| 147 | EventInterface& events_interface; | 147 | EventInterface& events_interface; |
| 148 | }; | 148 | }; |