diff options
Diffstat (limited to 'src/core/hle/service/vi')
-rw-r--r-- | src/core/hle/service/vi/vi.cpp | 64 | ||||
-rw-r--r-- | src/core/hle/service/vi/vi.h | 4 | ||||
-rw-r--r-- | src/core/hle/service/vi/vi_m.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/service/vi/vi_m.h | 6 | ||||
-rw-r--r-- | src/core/hle/service/vi/vi_s.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/service/vi/vi_s.h | 6 | ||||
-rw-r--r-- | src/core/hle/service/vi/vi_u.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/service/vi/vi_u.h | 6 |
8 files changed, 40 insertions, 52 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index d9cfebd70..fca076d7a 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -17,9 +17,9 @@ #include "common/settings.h" #include "common/swap.h" #include "core/core_timing.h" -#include "core/hle/ipc_helpers.h" #include "core/hle/kernel/k_readable_event.h" #include "core/hle/kernel/k_thread.h" +#include "core/hle/service/ipc_helpers.h" #include "core/hle/service/nvdrv/nvdata.h" #include "core/hle/service/nvflinger/binder.h" #include "core/hle/service/nvflinger/buffer_queue_producer.h" @@ -85,7 +85,7 @@ public: } private: - void TransactParcel(Kernel::HLERequestContext& ctx) { + void TransactParcel(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u32 id = rp.Pop<u32>(); const auto transaction = static_cast<android::TransactionId>(rp.Pop<u32>()); @@ -100,7 +100,7 @@ private: rb.Push(ResultSuccess); } - void AdjustRefcount(Kernel::HLERequestContext& ctx) { + void AdjustRefcount(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u32 id = rp.Pop<u32>(); const s32 addval = rp.PopRaw<s32>(); @@ -113,7 +113,7 @@ private: rb.Push(ResultSuccess); } - void GetNativeHandle(Kernel::HLERequestContext& ctx) { + void GetNativeHandle(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u32 id = rp.Pop<u32>(); const u32 unknown = rp.Pop<u32>(); @@ -186,7 +186,7 @@ public: } private: - void SetLayerZ(Kernel::HLERequestContext& ctx) { + void SetLayerZ(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u64 layer_id = rp.Pop<u64>(); const u64 z_value = rp.Pop<u64>(); @@ -200,7 +200,7 @@ private: // This function currently does nothing but return a success error code in // the vi library itself, so do the same thing, but log out the passed in values. - void SetLayerVisibility(Kernel::HLERequestContext& ctx) { + void SetLayerVisibility(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u64 layer_id = rp.Pop<u64>(); const bool visibility = rp.Pop<bool>(); @@ -211,7 +211,7 @@ private: rb.Push(ResultSuccess); } - void GetDisplayMode(Kernel::HLERequestContext& ctx) { + void GetDisplayMode(HLERequestContext& ctx) { LOG_WARNING(Service_VI, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 6}; @@ -325,7 +325,7 @@ public: } private: - void CloseDisplay(Kernel::HLERequestContext& ctx) { + void CloseDisplay(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u64 display = rp.Pop<u64>(); @@ -335,7 +335,7 @@ private: rb.Push(rc); } - void CreateManagedLayer(Kernel::HLERequestContext& ctx) { + void CreateManagedLayer(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u32 unknown = rp.Pop<u32>(); rp.Skip(1, false); @@ -359,7 +359,7 @@ private: rb.Push(*layer_id); } - void AddToLayerStack(Kernel::HLERequestContext& ctx) { + void AddToLayerStack(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u32 stack = rp.Pop<u32>(); const u64 layer_id = rp.Pop<u64>(); @@ -371,7 +371,7 @@ private: rb.Push(ResultSuccess); } - void SetLayerVisibility(Kernel::HLERequestContext& ctx) { + void SetLayerVisibility(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u64 layer_id = rp.Pop<u64>(); const bool visibility = rp.Pop<bool>(); @@ -440,7 +440,7 @@ private: PreserveAspectRatio = 4, }; - void GetRelayService(Kernel::HLERequestContext& ctx) { + void GetRelayService(HLERequestContext& ctx) { LOG_WARNING(Service_VI, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; @@ -448,7 +448,7 @@ private: rb.PushIpcInterface<IHOSBinderDriver>(system, hos_binder_driver_server); } - void GetSystemDisplayService(Kernel::HLERequestContext& ctx) { + void GetSystemDisplayService(HLERequestContext& ctx) { LOG_WARNING(Service_VI, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; @@ -456,7 +456,7 @@ private: rb.PushIpcInterface<ISystemDisplayService>(system); } - void GetManagerDisplayService(Kernel::HLERequestContext& ctx) { + void GetManagerDisplayService(HLERequestContext& ctx) { LOG_WARNING(Service_VI, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; @@ -464,7 +464,7 @@ private: rb.PushIpcInterface<IManagerDisplayService>(system, nv_flinger); } - void GetIndirectDisplayTransactionService(Kernel::HLERequestContext& ctx) { + void GetIndirectDisplayTransactionService(HLERequestContext& ctx) { LOG_WARNING(Service_VI, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 2, 0, 1}; @@ -472,7 +472,7 @@ private: rb.PushIpcInterface<IHOSBinderDriver>(system, hos_binder_driver_server); } - void OpenDisplay(Kernel::HLERequestContext& ctx) { + void OpenDisplay(HLERequestContext& ctx) { LOG_WARNING(Service_VI, "(STUBBED) called"); IPC::RequestParser rp{ctx}; @@ -481,13 +481,13 @@ private: OpenDisplayImpl(ctx, std::string_view{name_buf.data(), name_buf.size()}); } - void OpenDefaultDisplay(Kernel::HLERequestContext& ctx) { + void OpenDefaultDisplay(HLERequestContext& ctx) { LOG_DEBUG(Service_VI, "called"); OpenDisplayImpl(ctx, "Default"); } - void OpenDisplayImpl(Kernel::HLERequestContext& ctx, std::string_view name) { + void OpenDisplayImpl(HLERequestContext& ctx, std::string_view name) { const auto trim_pos = name.find('\0'); if (trim_pos != std::string_view::npos) { @@ -509,7 +509,7 @@ private: rb.Push<u64>(*display_id); } - void CloseDisplay(Kernel::HLERequestContext& ctx) { + void CloseDisplay(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u64 display_id = rp.Pop<u64>(); @@ -521,14 +521,14 @@ private: // This literally does nothing internally in the actual service itself, // and just returns a successful result code regardless of the input. - void SetDisplayEnabled(Kernel::HLERequestContext& ctx) { + void SetDisplayEnabled(HLERequestContext& ctx) { LOG_DEBUG(Service_VI, "called."); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(ResultSuccess); } - void GetDisplayResolution(Kernel::HLERequestContext& ctx) { + void GetDisplayResolution(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u64 display_id = rp.Pop<u64>(); @@ -544,7 +544,7 @@ private: rb.Push(static_cast<u64>(DisplayResolution::UndockedHeight)); } - void SetLayerScalingMode(Kernel::HLERequestContext& ctx) { + void SetLayerScalingMode(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto scaling_mode = rp.PopEnum<NintendoScaleMode>(); const u64 unknown = rp.Pop<u64>(); @@ -570,7 +570,7 @@ private: rb.Push(ResultSuccess); } - void ListDisplays(Kernel::HLERequestContext& ctx) { + void ListDisplays(HLERequestContext& ctx) { LOG_WARNING(Service_VI, "(STUBBED) called"); const DisplayInfo display_info; @@ -580,7 +580,7 @@ private: rb.Push<u64>(1); } - void OpenLayer(Kernel::HLERequestContext& ctx) { + void OpenLayer(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto name_buf = rp.PopRaw<std::array<u8, 0x40>>(); const auto end = std::find(name_buf.begin(), name_buf.end(), '\0'); @@ -616,7 +616,7 @@ private: rb.Push<u64>(buffer_size); } - void CloseLayer(Kernel::HLERequestContext& ctx) { + void CloseLayer(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto layer_id{rp.Pop<u64>()}; @@ -628,7 +628,7 @@ private: rb.Push(ResultSuccess); } - void CreateStrayLayer(Kernel::HLERequestContext& ctx) { + void CreateStrayLayer(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u32 flags = rp.Pop<u32>(); rp.Pop<u32>(); // padding @@ -663,7 +663,7 @@ private: rb.Push<u64>(buffer_size); } - void DestroyStrayLayer(Kernel::HLERequestContext& ctx) { + void DestroyStrayLayer(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u64 layer_id = rp.Pop<u64>(); @@ -673,7 +673,7 @@ private: rb.Push(ResultSuccess); } - void GetDisplayVsyncEvent(Kernel::HLERequestContext& ctx) { + void GetDisplayVsyncEvent(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const u64 display_id = rp.Pop<u64>(); @@ -696,7 +696,7 @@ private: rb.PushCopyObjects(*vsync_event); } - void ConvertScalingMode(Kernel::HLERequestContext& ctx) { + void ConvertScalingMode(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto mode = rp.PopEnum<NintendoScaleMode>(); LOG_DEBUG(Service_VI, "called mode={}", mode); @@ -713,7 +713,7 @@ private: } } - void GetIndirectLayerImageMap(Kernel::HLERequestContext& ctx) { + void GetIndirectLayerImageMap(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto width = rp.Pop<s64>(); const auto height = rp.Pop<s64>(); @@ -739,7 +739,7 @@ private: rb.Push(ResultSuccess); } - void GetIndirectLayerImageRequiredMemoryInfo(Kernel::HLERequestContext& ctx) { + void GetIndirectLayerImageRequiredMemoryInfo(HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; const auto width = rp.Pop<u64>(); const auto height = rp.Pop<u64>(); @@ -790,7 +790,7 @@ static bool IsValidServiceAccess(Permission permission, Policy policy) { return false; } -void detail::GetDisplayServiceImpl(Kernel::HLERequestContext& ctx, Core::System& system, +void detail::GetDisplayServiceImpl(HLERequestContext& ctx, Core::System& system, NVFlinger::NVFlinger& nv_flinger, NVFlinger::HosBinderDriverServer& hos_binder_driver_server, Permission permission) { diff --git a/src/core/hle/service/vi/vi.h b/src/core/hle/service/vi/vi.h index 4ed7aaf2b..48b2f30aa 100644 --- a/src/core/hle/service/vi/vi.h +++ b/src/core/hle/service/vi/vi.h @@ -9,7 +9,7 @@ namespace Core { class System; } -namespace Kernel { +namespace Service { class HLERequestContext; } @@ -42,7 +42,7 @@ enum class Policy { }; namespace detail { -void GetDisplayServiceImpl(Kernel::HLERequestContext& ctx, Core::System& system, +void GetDisplayServiceImpl(HLERequestContext& ctx, Core::System& system, NVFlinger::NVFlinger& nv_flinger, NVFlinger::HosBinderDriverServer& hos_binder_driver_server, Permission permission); diff --git a/src/core/hle/service/vi/vi_m.cpp b/src/core/hle/service/vi/vi_m.cpp index 7ca44354b..019e55811 100644 --- a/src/core/hle/service/vi/vi_m.cpp +++ b/src/core/hle/service/vi/vi_m.cpp @@ -24,7 +24,7 @@ VI_M::VI_M(Core::System& system_, NVFlinger::NVFlinger& nv_flinger_, VI_M::~VI_M() = default; -void VI_M::GetDisplayService(Kernel::HLERequestContext& ctx) { +void VI_M::GetDisplayService(HLERequestContext& ctx) { LOG_DEBUG(Service_VI, "called"); detail::GetDisplayServiceImpl(ctx, system, nv_flinger, hos_binder_driver_server, diff --git a/src/core/hle/service/vi/vi_m.h b/src/core/hle/service/vi/vi_m.h index 3bf76d439..392da04a3 100644 --- a/src/core/hle/service/vi/vi_m.h +++ b/src/core/hle/service/vi/vi_m.h @@ -9,10 +9,6 @@ namespace Core { class System; } -namespace Kernel { -class HLERequestContext; -} - namespace Service::NVFlinger { class HosBinderDriverServer; class NVFlinger; @@ -27,7 +23,7 @@ public: ~VI_M() override; private: - void GetDisplayService(Kernel::HLERequestContext& ctx); + void GetDisplayService(HLERequestContext& ctx); NVFlinger::NVFlinger& nv_flinger; NVFlinger::HosBinderDriverServer& hos_binder_driver_server; diff --git a/src/core/hle/service/vi/vi_s.cpp b/src/core/hle/service/vi/vi_s.cpp index fd799dac1..901c5988e 100644 --- a/src/core/hle/service/vi/vi_s.cpp +++ b/src/core/hle/service/vi/vi_s.cpp @@ -20,7 +20,7 @@ VI_S::VI_S(Core::System& system_, NVFlinger::NVFlinger& nv_flinger_, VI_S::~VI_S() = default; -void VI_S::GetDisplayService(Kernel::HLERequestContext& ctx) { +void VI_S::GetDisplayService(HLERequestContext& ctx) { LOG_DEBUG(Service_VI, "called"); detail::GetDisplayServiceImpl(ctx, system, nv_flinger, hos_binder_driver_server, diff --git a/src/core/hle/service/vi/vi_s.h b/src/core/hle/service/vi/vi_s.h index 97503ac7f..34282fcfd 100644 --- a/src/core/hle/service/vi/vi_s.h +++ b/src/core/hle/service/vi/vi_s.h @@ -9,10 +9,6 @@ namespace Core { class System; } -namespace Kernel { -class HLERequestContext; -} - namespace Service::NVFlinger { class HosBinderDriverServer; class NVFlinger; @@ -27,7 +23,7 @@ public: ~VI_S() override; private: - void GetDisplayService(Kernel::HLERequestContext& ctx); + void GetDisplayService(HLERequestContext& ctx); NVFlinger::NVFlinger& nv_flinger; NVFlinger::HosBinderDriverServer& hos_binder_driver_server; diff --git a/src/core/hle/service/vi/vi_u.cpp b/src/core/hle/service/vi/vi_u.cpp index 6cc54bd13..08c5cf486 100644 --- a/src/core/hle/service/vi/vi_u.cpp +++ b/src/core/hle/service/vi/vi_u.cpp @@ -20,7 +20,7 @@ VI_U::VI_U(Core::System& system_, NVFlinger::NVFlinger& nv_flinger_, VI_U::~VI_U() = default; -void VI_U::GetDisplayService(Kernel::HLERequestContext& ctx) { +void VI_U::GetDisplayService(HLERequestContext& ctx) { LOG_DEBUG(Service_VI, "called"); detail::GetDisplayServiceImpl(ctx, system, nv_flinger, hos_binder_driver_server, diff --git a/src/core/hle/service/vi/vi_u.h b/src/core/hle/service/vi/vi_u.h index 797941bd7..8b0a8dd02 100644 --- a/src/core/hle/service/vi/vi_u.h +++ b/src/core/hle/service/vi/vi_u.h @@ -9,10 +9,6 @@ namespace Core { class System; } -namespace Kernel { -class HLERequestContext; -} - namespace Service::NVFlinger { class HosBinderDriverServer; class NVFlinger; @@ -27,7 +23,7 @@ public: ~VI_U() override; private: - void GetDisplayService(Kernel::HLERequestContext& ctx); + void GetDisplayService(HLERequestContext& ctx); NVFlinger::NVFlinger& nv_flinger; NVFlinger::HosBinderDriverServer& hos_binder_driver_server; |