diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-01 15:02:47 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-10-06 21:00:51 +0200 |
commit | d30b885d713fa2b9393aeb3c515f4d881bf838f2 (patch) | |
tree | 4445e1621b403fd6603e9773841107ba9c10822e /src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp | |
parent | NvHost: Remake Ctrl Implementation. (diff) | |
download | yuzu-d30b885d713fa2b9393aeb3c515f4d881bf838f2.tar yuzu-d30b885d713fa2b9393aeb3c515f4d881bf838f2.tar.gz yuzu-d30b885d713fa2b9393aeb3c515f4d881bf838f2.tar.bz2 yuzu-d30b885d713fa2b9393aeb3c515f4d881bf838f2.tar.lz yuzu-d30b885d713fa2b9393aeb3c515f4d881bf838f2.tar.xz yuzu-d30b885d713fa2b9393aeb3c515f4d881bf838f2.tar.zst yuzu-d30b885d713fa2b9393aeb3c515f4d881bf838f2.zip |
Diffstat (limited to 'src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp')
-rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp index 2b3b7efea..e353408eb 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp @@ -7,10 +7,15 @@ #include "core/core.h" #include "core/core_timing.h" #include "core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h" +#include "core/hle/service/nvdrv/nvdrv.h" namespace Service::Nvidia::Devices { -nvhost_ctrl_gpu::nvhost_ctrl_gpu(Core::System& system_) : nvdevice{system_} {} +nvhost_ctrl_gpu::nvhost_ctrl_gpu(Core::System& system_, EventInterface& events_interface_) + : nvdevice{system_}, events_interface{events_interface_} { + error_notifier_event = events_interface.CreateNonCtrlEvent("CtrlGpuErrorNotifier"); + unknown_event = events_interface.CreateNonCtrlEvent("CtrlGpuUknownEvent"); +} nvhost_ctrl_gpu::~nvhost_ctrl_gpu() = default; NvResult nvhost_ctrl_gpu::Ioctl1(DeviceFD fd, Ioctl command, const std::vector<u8>& input, @@ -286,4 +291,17 @@ NvResult nvhost_ctrl_gpu::GetGpuTime(const std::vector<u8>& input, std::vector<u return NvResult::Success; } +Kernel::KEvent* nvhost_ctrl_gpu::QueryEvent(u32 event_id) { + switch (event_id) { + case 1: + return error_notifier_event; + case 2: + return unknown_event; + default: { + LOG_CRITICAL(Service_NVDRV, "Unknown Ctrl GPU Event {}", event_id); + } + } + return nullptr; +} + } // namespace Service::Nvidia::Devices |