From e1d02f4361621c3af53744c2b9f2474698acbf81 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Sun, 4 Feb 2018 21:13:10 -0800 Subject: [PATCH] Stubbed SetErrorNotifier --- src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | 11 +++++++++++ src/core/hle/service/nvdrv/devices/nvhost_gpu.h | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index 6b03563fd3..3d3f0ef23c 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp @@ -24,6 +24,8 @@ u32 nvhost_gpu::ioctl(u32 command, const std::vector& input, std::vector return GetClientData(input, output); case IocZCullBind: return ZCullBind(input, output); + case IocSetErrorNotifierCommand: + return SetErrorNotifier(input, output); } }; @@ -61,6 +63,15 @@ u32 nvhost_gpu::ZCullBind(const std::vector& input, std::vector& output) return 0; } +u32 nvhost_gpu::SetErrorNotifier(const std::vector& input, std::vector& output) { + set_error_notifier params; + std::memcpy(¶ms, input.data(), input.size()); + LOG_WARNING(Service, "(STUBBED) called, offset=%lx, size=%lx, mem=%x", params.offset, + params.size, params.mem); + std::memcpy(output.data(), ¶ms, output.size()); + return 0; +} + } // namespace Devices } // namespace Nvidia } // namespace Service diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h index 389118b917..b68197e46a 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h @@ -26,6 +26,7 @@ private: IocSetClientDataCommand = 0x40084714, IocGetClientDataCommand = 0x80084715, IocZCullBind = 0xc010480b, + IocSetErrorNotifierCommand = 0xC018480C, }; struct set_nvmap_fd { @@ -42,6 +43,13 @@ private: u32 padding; }; + struct set_error_notifier { + u64_le offset; + u64_le size; + u32_le mem; // nvmap object handle + u32_le padding; + }; + u32_le nvmap_fd{}; u64_le user_data{}; zcull_bind zcull_params{}; @@ -50,6 +58,7 @@ private: u32 SetClientData(const std::vector& input, std::vector& output); u32 GetClientData(const std::vector& input, std::vector& output); u32 ZCullBind(const std::vector& input, std::vector& output); + u32 SetErrorNotifier(const std::vector& input, std::vector& output); }; } // namespace Devices