diff options
| author | 2018-04-24 10:33:33 -0400 | |
|---|---|---|
| committer | 2018-04-24 12:01:27 -0400 | |
| commit | 285d8d8b7d6d22202f87d60f67768be69b7f0bd1 (patch) | |
| tree | 6675c1f83cf42e72ff7fb72ddad05cbc780d9e80 /src | |
| parent | ns: Move logging macros over to new fmt-compatible ones (diff) | |
| download | yuzu-285d8d8b7d6d22202f87d60f67768be69b7f0bd1.tar.gz yuzu-285d8d8b7d6d22202f87d60f67768be69b7f0bd1.tar.xz yuzu-285d8d8b7d6d22202f87d60f67768be69b7f0bd1.zip | |
nvdrv: Move logging macros over to new fmt-compatible ones
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | 26 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | 12 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp | 16 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | 37 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvmap.cpp | 10 | ||||
| -rw-r--r-- | src/core/hle/service/nvdrv/interface.cpp | 14 |
7 files changed, 61 insertions, 60 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp index aa6c7e8dc..103e66d0c 100644 --- a/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp +++ b/src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp | |||
| @@ -20,9 +20,9 @@ u32 nvdisp_disp0::ioctl(Ioctl command, const std::vector<u8>& input, std::vector | |||
| 20 | void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u32 height, | 20 | void nvdisp_disp0::flip(u32 buffer_handle, u32 offset, u32 format, u32 width, u32 height, |
| 21 | u32 stride, NVFlinger::BufferQueue::BufferTransformFlags transform) { | 21 | u32 stride, NVFlinger::BufferQueue::BufferTransformFlags transform) { |
| 22 | VAddr addr = nvmap_dev->GetObjectAddress(buffer_handle); | 22 | VAddr addr = nvmap_dev->GetObjectAddress(buffer_handle); |
| 23 | LOG_WARNING(Service, | 23 | NGLOG_WARNING(Service, |
| 24 | "Drawing from address %lx offset %08X Width %u Height %u Stride %u Format %u", addr, | 24 | "Drawing from address {:X} offset {:08X} Width {} Height {} Stride {} Format {}", |
| 25 | offset, width, height, stride, format); | 25 | addr, offset, width, height, stride, format); |
| 26 | 26 | ||
| 27 | using PixelFormat = Tegra::FramebufferConfig::PixelFormat; | 27 | using PixelFormat = Tegra::FramebufferConfig::PixelFormat; |
| 28 | const Tegra::FramebufferConfig framebuffer{ | 28 | const Tegra::FramebufferConfig framebuffer{ |
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp index 8e7ca6123..36d7f837b 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.cpp | |||
| @@ -12,8 +12,8 @@ | |||
| 12 | namespace Service::Nvidia::Devices { | 12 | namespace Service::Nvidia::Devices { |
| 13 | 13 | ||
| 14 | u32 nvhost_as_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { | 14 | u32 nvhost_as_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { |
| 15 | LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx", | 15 | NGLOG_DEBUG(Service_NVDRV, "called, command={:#010X}, input_size={:#X}, output_size={:#X}", |
| 16 | command.raw, input.size(), output.size()); | 16 | command.raw, input.size(), output.size()); |
| 17 | 17 | ||
| 18 | switch (static_cast<IoctlCommand>(command.raw)) { | 18 | switch (static_cast<IoctlCommand>(command.raw)) { |
| 19 | case IoctlCommand::IocInitalizeExCommand: | 19 | case IoctlCommand::IocInitalizeExCommand: |
| @@ -38,7 +38,7 @@ u32 nvhost_as_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vecto | |||
| 38 | u32 nvhost_as_gpu::InitalizeEx(const std::vector<u8>& input, std::vector<u8>& output) { | 38 | u32 nvhost_as_gpu::InitalizeEx(const std::vector<u8>& input, std::vector<u8>& output) { |
| 39 | IoctlInitalizeEx params{}; | 39 | IoctlInitalizeEx params{}; |
| 40 | std::memcpy(¶ms, input.data(), input.size()); | 40 | std::memcpy(¶ms, input.data(), input.size()); |
| 41 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, big_page_size=0x%x", params.big_page_size); | 41 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, big_page_size={:#X}", params.big_page_size); |
| 42 | std::memcpy(output.data(), ¶ms, output.size()); | 42 | std::memcpy(output.data(), ¶ms, output.size()); |
| 43 | return 0; | 43 | return 0; |
| 44 | } | 44 | } |
| @@ -46,8 +46,8 @@ u32 nvhost_as_gpu::InitalizeEx(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 46 | u32 nvhost_as_gpu::AllocateSpace(const std::vector<u8>& input, std::vector<u8>& output) { | 46 | u32 nvhost_as_gpu::AllocateSpace(const std::vector<u8>& input, std::vector<u8>& output) { |
| 47 | IoctlAllocSpace params{}; | 47 | IoctlAllocSpace params{}; |
| 48 | std::memcpy(¶ms, input.data(), input.size()); | 48 | std::memcpy(¶ms, input.data(), input.size()); |
| 49 | LOG_DEBUG(Service_NVDRV, "called, pages=%x, page_size=%x, flags=%x", params.pages, | 49 | NGLOG_DEBUG(Service_NVDRV, "called, pages={:X}, page_size={:X}, flags={:X}", params.pages, |
| 50 | params.page_size, params.flags); | 50 | params.page_size, params.flags); |
| 51 | 51 | ||
| 52 | auto& gpu = Core::System::GetInstance().GPU(); | 52 | auto& gpu = Core::System::GetInstance().GPU(); |
| 53 | const u64 size{static_cast<u64>(params.pages) * static_cast<u64>(params.page_size)}; | 53 | const u64 size{static_cast<u64>(params.pages) * static_cast<u64>(params.page_size)}; |
| @@ -95,11 +95,11 @@ u32 nvhost_as_gpu::MapBufferEx(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 95 | IoctlMapBufferEx params{}; | 95 | IoctlMapBufferEx params{}; |
| 96 | std::memcpy(¶ms, input.data(), input.size()); | 96 | std::memcpy(¶ms, input.data(), input.size()); |
| 97 | 97 | ||
| 98 | LOG_DEBUG(Service_NVDRV, | 98 | NGLOG_DEBUG(Service_NVDRV, |
| 99 | "called, flags=%x, nvmap_handle=%x, buffer_offset=%" PRIu64 ", mapping_size=%" PRIu64 | 99 | "called, flags={:X}, nvmap_handle={:X}, buffer_offset={}, mapping_size={}" |
| 100 | ", offset=%" PRIu64, | 100 | ", offset={}", |
| 101 | params.flags, params.nvmap_handle, params.buffer_offset, params.mapping_size, | 101 | params.flags, params.nvmap_handle, params.buffer_offset, params.mapping_size, |
| 102 | params.offset); | 102 | params.offset); |
| 103 | 103 | ||
| 104 | if (!params.nvmap_handle) { | 104 | if (!params.nvmap_handle) { |
| 105 | return 0; | 105 | return 0; |
| @@ -133,7 +133,7 @@ u32 nvhost_as_gpu::MapBufferEx(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 133 | u32 nvhost_as_gpu::BindChannel(const std::vector<u8>& input, std::vector<u8>& output) { | 133 | u32 nvhost_as_gpu::BindChannel(const std::vector<u8>& input, std::vector<u8>& output) { |
| 134 | IoctlBindChannel params{}; | 134 | IoctlBindChannel params{}; |
| 135 | std::memcpy(¶ms, input.data(), input.size()); | 135 | std::memcpy(¶ms, input.data(), input.size()); |
| 136 | LOG_DEBUG(Service_NVDRV, "called, fd=%x", params.fd); | 136 | NGLOG_DEBUG(Service_NVDRV, "called, fd={:X}", params.fd); |
| 137 | channel = params.fd; | 137 | channel = params.fd; |
| 138 | std::memcpy(output.data(), ¶ms, output.size()); | 138 | std::memcpy(output.data(), ¶ms, output.size()); |
| 139 | return 0; | 139 | return 0; |
| @@ -142,8 +142,8 @@ u32 nvhost_as_gpu::BindChannel(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 142 | u32 nvhost_as_gpu::GetVARegions(const std::vector<u8>& input, std::vector<u8>& output) { | 142 | u32 nvhost_as_gpu::GetVARegions(const std::vector<u8>& input, std::vector<u8>& output) { |
| 143 | IoctlGetVaRegions params{}; | 143 | IoctlGetVaRegions params{}; |
| 144 | std::memcpy(¶ms, input.data(), input.size()); | 144 | std::memcpy(¶ms, input.data(), input.size()); |
| 145 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, buf_addr=%" PRIu64 ", buf_size=%x", | 145 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, buf_addr={:X}, buf_size={:X}", params.buf_addr, |
| 146 | params.buf_addr, params.buf_size); | 146 | params.buf_size); |
| 147 | 147 | ||
| 148 | params.buf_size = 0x30; | 148 | params.buf_size = 0x30; |
| 149 | params.regions[0].offset = 0x04000000; | 149 | params.regions[0].offset = 0x04000000; |
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index 6e1ba1ac7..46f0b6862 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | |||
| @@ -9,8 +9,8 @@ | |||
| 9 | namespace Service::Nvidia::Devices { | 9 | namespace Service::Nvidia::Devices { |
| 10 | 10 | ||
| 11 | u32 nvhost_ctrl::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { | 11 | u32 nvhost_ctrl::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { |
| 12 | LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx", | 12 | NGLOG_DEBUG(Service_NVDRV, "called, command={:#010X}, input_size={:#X}, output_size={:#X}", |
| 13 | command.raw, input.size(), output.size()); | 13 | command.raw, input.size(), output.size()); |
| 14 | 14 | ||
| 15 | switch (static_cast<IoctlCommand>(command.raw)) { | 15 | switch (static_cast<IoctlCommand>(command.raw)) { |
| 16 | case IoctlCommand::IocGetConfigCommand: | 16 | case IoctlCommand::IocGetConfigCommand: |
| @@ -25,8 +25,8 @@ u32 nvhost_ctrl::ioctl(Ioctl command, const std::vector<u8>& input, std::vector< | |||
| 25 | u32 nvhost_ctrl::NvOsGetConfigU32(const std::vector<u8>& input, std::vector<u8>& output) { | 25 | u32 nvhost_ctrl::NvOsGetConfigU32(const std::vector<u8>& input, std::vector<u8>& output) { |
| 26 | IocGetConfigParams params{}; | 26 | IocGetConfigParams params{}; |
| 27 | std::memcpy(¶ms, input.data(), sizeof(params)); | 27 | std::memcpy(¶ms, input.data(), sizeof(params)); |
| 28 | LOG_DEBUG(Service_NVDRV, "called, setting=%s!%s", params.domain_str.data(), | 28 | NGLOG_DEBUG(Service_NVDRV, "called, setting={}!{}", params.domain_str.data(), |
| 29 | params.param_str.data()); | 29 | params.param_str.data()); |
| 30 | 30 | ||
| 31 | if (!strcmp(params.domain_str.data(), "nv")) { | 31 | if (!strcmp(params.domain_str.data(), "nv")) { |
| 32 | if (!strcmp(params.param_str.data(), "NV_MEMORY_PROFILER")) { | 32 | if (!strcmp(params.param_str.data(), "NV_MEMORY_PROFILER")) { |
| @@ -48,8 +48,8 @@ u32 nvhost_ctrl::NvOsGetConfigU32(const std::vector<u8>& input, std::vector<u8>& | |||
| 48 | u32 nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& output) { | 48 | u32 nvhost_ctrl::IocCtrlEventWait(const std::vector<u8>& input, std::vector<u8>& output) { |
| 49 | IocCtrlEventWaitParams params{}; | 49 | IocCtrlEventWaitParams params{}; |
| 50 | std::memcpy(¶ms, input.data(), sizeof(params)); | 50 | std::memcpy(¶ms, input.data(), sizeof(params)); |
| 51 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, syncpt_id=%u threshold=%u timeout=%d", | 51 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, syncpt_id={} threshold={} timeout={}", |
| 52 | params.syncpt_id, params.threshold, params.timeout); | 52 | params.syncpt_id, params.threshold, params.timeout); |
| 53 | 53 | ||
| 54 | // TODO(Subv): Implement actual syncpt waiting. | 54 | // TODO(Subv): Implement actual syncpt waiting. |
| 55 | params.value = 0; | 55 | params.value = 0; |
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 b715723d3..1e457ae6e 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp | |||
| @@ -10,8 +10,8 @@ | |||
| 10 | namespace Service::Nvidia::Devices { | 10 | namespace Service::Nvidia::Devices { |
| 11 | 11 | ||
| 12 | u32 nvhost_ctrl_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { | 12 | u32 nvhost_ctrl_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { |
| 13 | LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx", | 13 | NGLOG_DEBUG(Service_NVDRV, "called, command={:#010X}, input_size={:#X}, output_size={:#X}", |
| 14 | command.raw, input.size(), output.size()); | 14 | command.raw, input.size(), output.size()); |
| 15 | 15 | ||
| 16 | switch (static_cast<IoctlCommand>(command.raw)) { | 16 | switch (static_cast<IoctlCommand>(command.raw)) { |
| 17 | case IoctlCommand::IocGetCharacteristicsCommand: | 17 | case IoctlCommand::IocGetCharacteristicsCommand: |
| @@ -30,7 +30,7 @@ u32 nvhost_ctrl_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vec | |||
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | u32 nvhost_ctrl_gpu::GetCharacteristics(const std::vector<u8>& input, std::vector<u8>& output) { | 32 | u32 nvhost_ctrl_gpu::GetCharacteristics(const std::vector<u8>& input, std::vector<u8>& output) { |
| 33 | LOG_DEBUG(Service_NVDRV, "called"); | 33 | NGLOG_DEBUG(Service_NVDRV, "called"); |
| 34 | IoctlCharacteristics params{}; | 34 | IoctlCharacteristics params{}; |
| 35 | std::memcpy(¶ms, input.data(), input.size()); | 35 | std::memcpy(¶ms, input.data(), input.size()); |
| 36 | params.gc.arch = 0x120; | 36 | params.gc.arch = 0x120; |
| @@ -77,14 +77,14 @@ u32 nvhost_ctrl_gpu::GetCharacteristics(const std::vector<u8>& input, std::vecto | |||
| 77 | u32 nvhost_ctrl_gpu::GetTPCMasks(const std::vector<u8>& input, std::vector<u8>& output) { | 77 | u32 nvhost_ctrl_gpu::GetTPCMasks(const std::vector<u8>& input, std::vector<u8>& output) { |
| 78 | IoctlGpuGetTpcMasksArgs params{}; | 78 | IoctlGpuGetTpcMasksArgs params{}; |
| 79 | std::memcpy(¶ms, input.data(), input.size()); | 79 | std::memcpy(¶ms, input.data(), input.size()); |
| 80 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, mask=0x%x, mask_buf_addr=0x%" PRIx64, | 80 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, mask={:#X}, mask_buf_addr={:#X}", |
| 81 | params.mask_buf_size, params.mask_buf_addr); | 81 | params.mask_buf_size, params.mask_buf_addr); |
| 82 | std::memcpy(output.data(), ¶ms, sizeof(params)); | 82 | std::memcpy(output.data(), ¶ms, sizeof(params)); |
| 83 | return 0; | 83 | return 0; |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | u32 nvhost_ctrl_gpu::GetActiveSlotMask(const std::vector<u8>& input, std::vector<u8>& output) { | 86 | u32 nvhost_ctrl_gpu::GetActiveSlotMask(const std::vector<u8>& input, std::vector<u8>& output) { |
| 87 | LOG_DEBUG(Service_NVDRV, "called"); | 87 | NGLOG_DEBUG(Service_NVDRV, "called"); |
| 88 | IoctlActiveSlotMask params{}; | 88 | IoctlActiveSlotMask params{}; |
| 89 | std::memcpy(¶ms, input.data(), input.size()); | 89 | std::memcpy(¶ms, input.data(), input.size()); |
| 90 | params.slot = 0x07; | 90 | params.slot = 0x07; |
| @@ -94,7 +94,7 @@ u32 nvhost_ctrl_gpu::GetActiveSlotMask(const std::vector<u8>& input, std::vector | |||
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | u32 nvhost_ctrl_gpu::ZCullGetCtxSize(const std::vector<u8>& input, std::vector<u8>& output) { | 96 | u32 nvhost_ctrl_gpu::ZCullGetCtxSize(const std::vector<u8>& input, std::vector<u8>& output) { |
| 97 | LOG_DEBUG(Service_NVDRV, "called"); | 97 | NGLOG_DEBUG(Service_NVDRV, "called"); |
| 98 | IoctlZcullGetCtxSize params{}; | 98 | IoctlZcullGetCtxSize params{}; |
| 99 | std::memcpy(¶ms, input.data(), input.size()); | 99 | std::memcpy(¶ms, input.data(), input.size()); |
| 100 | params.size = 0x1; | 100 | params.size = 0x1; |
| @@ -103,7 +103,7 @@ u32 nvhost_ctrl_gpu::ZCullGetCtxSize(const std::vector<u8>& input, std::vector<u | |||
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | u32 nvhost_ctrl_gpu::ZCullGetInfo(const std::vector<u8>& input, std::vector<u8>& output) { | 105 | u32 nvhost_ctrl_gpu::ZCullGetInfo(const std::vector<u8>& input, std::vector<u8>& output) { |
| 106 | LOG_DEBUG(Service_NVDRV, "called"); | 106 | NGLOG_DEBUG(Service_NVDRV, "called"); |
| 107 | IoctlNvgpuGpuZcullGetInfoArgs params{}; | 107 | IoctlNvgpuGpuZcullGetInfoArgs params{}; |
| 108 | std::memcpy(¶ms, input.data(), input.size()); | 108 | std::memcpy(¶ms, input.data(), input.size()); |
| 109 | params.width_align_pixels = 0x20; | 109 | params.width_align_pixels = 0x20; |
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index dab6d0533..70625211e 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | |||
| @@ -12,8 +12,8 @@ | |||
| 12 | namespace Service::Nvidia::Devices { | 12 | namespace Service::Nvidia::Devices { |
| 13 | 13 | ||
| 14 | u32 nvhost_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { | 14 | u32 nvhost_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) { |
| 15 | LOG_DEBUG(Service_NVDRV, "called, command=0x%08x, input_size=0x%zx, output_size=0x%zx", | 15 | NGLOG_DEBUG(Service_NVDRV, "called, command={:#010X}, input_size={:#X}, output_size={:#X}", |
| 16 | command.raw, input.size(), output.size()); | 16 | command.raw, input.size(), output.size()); |
| 17 | 17 | ||
| 18 | switch (static_cast<IoctlCommand>(command.raw)) { | 18 | switch (static_cast<IoctlCommand>(command.raw)) { |
| 19 | case IoctlCommand::IocSetNVMAPfdCommand: | 19 | case IoctlCommand::IocSetNVMAPfdCommand: |
| @@ -47,14 +47,14 @@ u32 nvhost_gpu::ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u | |||
| 47 | u32 nvhost_gpu::SetNVMAPfd(const std::vector<u8>& input, std::vector<u8>& output) { | 47 | u32 nvhost_gpu::SetNVMAPfd(const std::vector<u8>& input, std::vector<u8>& output) { |
| 48 | IoctlSetNvmapFD params{}; | 48 | IoctlSetNvmapFD params{}; |
| 49 | std::memcpy(¶ms, input.data(), input.size()); | 49 | std::memcpy(¶ms, input.data(), input.size()); |
| 50 | LOG_DEBUG(Service_NVDRV, "called, fd=%x", params.nvmap_fd); | 50 | NGLOG_DEBUG(Service_NVDRV, "called, fd={}", params.nvmap_fd); |
| 51 | nvmap_fd = params.nvmap_fd; | 51 | nvmap_fd = params.nvmap_fd; |
| 52 | std::memcpy(output.data(), ¶ms, output.size()); | 52 | std::memcpy(output.data(), ¶ms, output.size()); |
| 53 | return 0; | 53 | return 0; |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | u32 nvhost_gpu::SetClientData(const std::vector<u8>& input, std::vector<u8>& output) { | 56 | u32 nvhost_gpu::SetClientData(const std::vector<u8>& input, std::vector<u8>& output) { |
| 57 | LOG_DEBUG(Service_NVDRV, "called"); | 57 | NGLOG_DEBUG(Service_NVDRV, "called"); |
| 58 | IoctlClientData params{}; | 58 | IoctlClientData params{}; |
| 59 | std::memcpy(¶ms, input.data(), input.size()); | 59 | std::memcpy(¶ms, input.data(), input.size()); |
| 60 | user_data = params.data; | 60 | user_data = params.data; |
| @@ -63,7 +63,7 @@ u32 nvhost_gpu::SetClientData(const std::vector<u8>& input, std::vector<u8>& out | |||
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | u32 nvhost_gpu::GetClientData(const std::vector<u8>& input, std::vector<u8>& output) { | 65 | u32 nvhost_gpu::GetClientData(const std::vector<u8>& input, std::vector<u8>& output) { |
| 66 | LOG_DEBUG(Service_NVDRV, "called"); | 66 | NGLOG_DEBUG(Service_NVDRV, "called"); |
| 67 | IoctlClientData params{}; | 67 | IoctlClientData params{}; |
| 68 | std::memcpy(¶ms, input.data(), input.size()); | 68 | std::memcpy(¶ms, input.data(), input.size()); |
| 69 | params.data = user_data; | 69 | params.data = user_data; |
| @@ -73,8 +73,8 @@ u32 nvhost_gpu::GetClientData(const std::vector<u8>& input, std::vector<u8>& out | |||
| 73 | 73 | ||
| 74 | u32 nvhost_gpu::ZCullBind(const std::vector<u8>& input, std::vector<u8>& output) { | 74 | u32 nvhost_gpu::ZCullBind(const std::vector<u8>& input, std::vector<u8>& output) { |
| 75 | std::memcpy(&zcull_params, input.data(), input.size()); | 75 | std::memcpy(&zcull_params, input.data(), input.size()); |
| 76 | LOG_DEBUG(Service_NVDRV, "called, gpu_va=%" PRIx64 ", mode=%x", zcull_params.gpu_va, | 76 | NGLOG_DEBUG(Service_NVDRV, "called, gpu_va={:X}, mode={:X}", zcull_params.gpu_va, |
| 77 | zcull_params.mode); | 77 | zcull_params.mode); |
| 78 | std::memcpy(output.data(), &zcull_params, output.size()); | 78 | std::memcpy(output.data(), &zcull_params, output.size()); |
| 79 | return 0; | 79 | return 0; |
| 80 | } | 80 | } |
| @@ -82,15 +82,15 @@ u32 nvhost_gpu::ZCullBind(const std::vector<u8>& input, std::vector<u8>& output) | |||
| 82 | u32 nvhost_gpu::SetErrorNotifier(const std::vector<u8>& input, std::vector<u8>& output) { | 82 | u32 nvhost_gpu::SetErrorNotifier(const std::vector<u8>& input, std::vector<u8>& output) { |
| 83 | IoctlSetErrorNotifier params{}; | 83 | IoctlSetErrorNotifier params{}; |
| 84 | std::memcpy(¶ms, input.data(), input.size()); | 84 | std::memcpy(¶ms, input.data(), input.size()); |
| 85 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, offset=%" PRIx64 ", size=%" PRIx64 ", mem=%x", | 85 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, offset={:X}, size={:X}, mem={:X}", |
| 86 | params.offset, params.size, params.mem); | 86 | params.offset, params.size, params.mem); |
| 87 | std::memcpy(output.data(), ¶ms, output.size()); | 87 | std::memcpy(output.data(), ¶ms, output.size()); |
| 88 | return 0; | 88 | return 0; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | u32 nvhost_gpu::SetChannelPriority(const std::vector<u8>& input, std::vector<u8>& output) { | 91 | u32 nvhost_gpu::SetChannelPriority(const std::vector<u8>& input, std::vector<u8>& output) { |
| 92 | std::memcpy(&channel_priority, input.data(), input.size()); | 92 | std::memcpy(&channel_priority, input.data(), input.size()); |
| 93 | LOG_DEBUG(Service_NVDRV, "(STUBBED) called, priority=%x", channel_priority); | 93 | NGLOG_DEBUG(Service_NVDRV, "(STUBBED) called, priority={:X}", channel_priority); |
| 94 | std::memcpy(output.data(), &channel_priority, output.size()); | 94 | std::memcpy(output.data(), &channel_priority, output.size()); |
| 95 | return 0; | 95 | return 0; |
| 96 | } | 96 | } |
| @@ -98,10 +98,11 @@ u32 nvhost_gpu::SetChannelPriority(const std::vector<u8>& input, std::vector<u8> | |||
| 98 | u32 nvhost_gpu::AllocGPFIFOEx2(const std::vector<u8>& input, std::vector<u8>& output) { | 98 | u32 nvhost_gpu::AllocGPFIFOEx2(const std::vector<u8>& input, std::vector<u8>& output) { |
| 99 | IoctlAllocGpfifoEx2 params{}; | 99 | IoctlAllocGpfifoEx2 params{}; |
| 100 | std::memcpy(¶ms, input.data(), input.size()); | 100 | std::memcpy(¶ms, input.data(), input.size()); |
| 101 | LOG_WARNING(Service_NVDRV, | 101 | NGLOG_WARNING(Service_NVDRV, |
| 102 | "(STUBBED) called, num_entries=%x, flags=%x, unk0=%x, unk1=%x, unk2=%x, unk3=%x", | 102 | "(STUBBED) called, num_entries={:X}, flags={:X}, unk0={:X}, " |
| 103 | params.num_entries, params.flags, params.unk0, params.unk1, params.unk2, | 103 | "unk1={:X}, unk2={:X}, unk3={:X}", |
| 104 | params.unk3); | 104 | params.num_entries, params.flags, params.unk0, params.unk1, params.unk2, |
| 105 | params.unk3); | ||
| 105 | params.fence_out.id = 0; | 106 | params.fence_out.id = 0; |
| 106 | params.fence_out.value = 0; | 107 | params.fence_out.value = 0; |
| 107 | std::memcpy(output.data(), ¶ms, output.size()); | 108 | std::memcpy(output.data(), ¶ms, output.size()); |
| @@ -111,8 +112,8 @@ u32 nvhost_gpu::AllocGPFIFOEx2(const std::vector<u8>& input, std::vector<u8>& ou | |||
| 111 | u32 nvhost_gpu::AllocateObjectContext(const std::vector<u8>& input, std::vector<u8>& output) { | 112 | u32 nvhost_gpu::AllocateObjectContext(const std::vector<u8>& input, std::vector<u8>& output) { |
| 112 | IoctlAllocObjCtx params{}; | 113 | IoctlAllocObjCtx params{}; |
| 113 | std::memcpy(¶ms, input.data(), input.size()); | 114 | std::memcpy(¶ms, input.data(), input.size()); |
| 114 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, class_num=%x, flags=%x", params.class_num, | 115 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, class_num={:X}, flags={:X}", params.class_num, |
| 115 | params.flags); | 116 | params.flags); |
| 116 | params.obj_id = 0x0; | 117 | params.obj_id = 0x0; |
| 117 | std::memcpy(output.data(), ¶ms, output.size()); | 118 | std::memcpy(output.data(), ¶ms, output.size()); |
| 118 | return 0; | 119 | return 0; |
| @@ -123,8 +124,8 @@ u32 nvhost_gpu::SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& outp | |||
| 123 | UNIMPLEMENTED(); | 124 | UNIMPLEMENTED(); |
| 124 | IoctlSubmitGpfifo params{}; | 125 | IoctlSubmitGpfifo params{}; |
| 125 | std::memcpy(¶ms, input.data(), sizeof(IoctlSubmitGpfifo)); | 126 | std::memcpy(¶ms, input.data(), sizeof(IoctlSubmitGpfifo)); |
| 126 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, gpfifo=%" PRIx64 ", num_entries=%x, flags=%x", | 127 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, gpfifo={:X}, num_entries={:X}, flags={:X}", |
| 127 | params.gpfifo, params.num_entries, params.flags); | 128 | params.gpfifo, params.num_entries, params.flags); |
| 128 | 129 | ||
| 129 | auto entries = std::vector<IoctlGpfifoEntry>(); | 130 | auto entries = std::vector<IoctlGpfifoEntry>(); |
| 130 | entries.resize(params.num_entries); | 131 | entries.resize(params.num_entries); |
diff --git a/src/core/hle/service/nvdrv/devices/nvmap.cpp b/src/core/hle/service/nvdrv/devices/nvmap.cpp index dcf079d91..11df8849d 100644 --- a/src/core/hle/service/nvdrv/devices/nvmap.cpp +++ b/src/core/hle/service/nvdrv/devices/nvmap.cpp | |||
| @@ -49,7 +49,7 @@ u32 nvmap::IocCreate(const std::vector<u8>& input, std::vector<u8>& output) { | |||
| 49 | u32 handle = next_handle++; | 49 | u32 handle = next_handle++; |
| 50 | handles[handle] = std::move(object); | 50 | handles[handle] = std::move(object); |
| 51 | 51 | ||
| 52 | LOG_DEBUG(Service_NVDRV, "size=0x%08X", params.size); | 52 | NGLOG_DEBUG(Service_NVDRV, "size={:#010X}", params.size); |
| 53 | 53 | ||
| 54 | params.handle = handle; | 54 | params.handle = handle; |
| 55 | 55 | ||
| @@ -70,7 +70,7 @@ u32 nvmap::IocAlloc(const std::vector<u8>& input, std::vector<u8>& output) { | |||
| 70 | object->addr = params.addr; | 70 | object->addr = params.addr; |
| 71 | object->status = Object::Status::Allocated; | 71 | object->status = Object::Status::Allocated; |
| 72 | 72 | ||
| 73 | LOG_DEBUG(Service_NVDRV, "called, addr=0x%" PRIx64, params.addr); | 73 | NGLOG_DEBUG(Service_NVDRV, "called, addr={:X}", params.addr); |
| 74 | 74 | ||
| 75 | std::memcpy(output.data(), ¶ms, sizeof(params)); | 75 | std::memcpy(output.data(), ¶ms, sizeof(params)); |
| 76 | return 0; | 76 | return 0; |
| @@ -80,7 +80,7 @@ u32 nvmap::IocGetId(const std::vector<u8>& input, std::vector<u8>& output) { | |||
| 80 | IocGetIdParams params; | 80 | IocGetIdParams params; |
| 81 | std::memcpy(¶ms, input.data(), sizeof(params)); | 81 | std::memcpy(¶ms, input.data(), sizeof(params)); |
| 82 | 82 | ||
| 83 | LOG_WARNING(Service_NVDRV, "called"); | 83 | NGLOG_WARNING(Service_NVDRV, "called"); |
| 84 | 84 | ||
| 85 | auto object = GetObject(params.handle); | 85 | auto object = GetObject(params.handle); |
| 86 | ASSERT(object); | 86 | ASSERT(object); |
| @@ -95,7 +95,7 @@ u32 nvmap::IocFromId(const std::vector<u8>& input, std::vector<u8>& output) { | |||
| 95 | IocFromIdParams params; | 95 | IocFromIdParams params; |
| 96 | std::memcpy(¶ms, input.data(), sizeof(params)); | 96 | std::memcpy(¶ms, input.data(), sizeof(params)); |
| 97 | 97 | ||
| 98 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); | 98 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called"); |
| 99 | 99 | ||
| 100 | auto itr = std::find_if(handles.begin(), handles.end(), | 100 | auto itr = std::find_if(handles.begin(), handles.end(), |
| 101 | [&](const auto& entry) { return entry.second->id == params.id; }); | 101 | [&](const auto& entry) { return entry.second->id == params.id; }); |
| @@ -114,7 +114,7 @@ u32 nvmap::IocParam(const std::vector<u8>& input, std::vector<u8>& output) { | |||
| 114 | IocParamParams params; | 114 | IocParamParams params; |
| 115 | std::memcpy(¶ms, input.data(), sizeof(params)); | 115 | std::memcpy(¶ms, input.data(), sizeof(params)); |
| 116 | 116 | ||
| 117 | LOG_WARNING(Service_NVDRV, "(STUBBED) called type=%u", params.type); | 117 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called type={}", params.type); |
| 118 | 118 | ||
| 119 | auto object = GetObject(params.handle); | 119 | auto object = GetObject(params.handle); |
| 120 | ASSERT(object); | 120 | ASSERT(object); |
diff --git a/src/core/hle/service/nvdrv/interface.cpp b/src/core/hle/service/nvdrv/interface.cpp index d0d64a840..38b3a9a84 100644 --- a/src/core/hle/service/nvdrv/interface.cpp +++ b/src/core/hle/service/nvdrv/interface.cpp | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | namespace Service::Nvidia { | 12 | namespace Service::Nvidia { |
| 13 | 13 | ||
| 14 | void NVDRV::Open(Kernel::HLERequestContext& ctx) { | 14 | void NVDRV::Open(Kernel::HLERequestContext& ctx) { |
| 15 | LOG_DEBUG(Service_NVDRV, "called"); | 15 | NGLOG_DEBUG(Service_NVDRV, "called"); |
| 16 | 16 | ||
| 17 | const auto& buffer = ctx.ReadBuffer(); | 17 | const auto& buffer = ctx.ReadBuffer(); |
| 18 | std::string device_name(buffer.begin(), buffer.end()); | 18 | std::string device_name(buffer.begin(), buffer.end()); |
| @@ -25,7 +25,7 @@ void NVDRV::Open(Kernel::HLERequestContext& ctx) { | |||
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | void NVDRV::Ioctl(Kernel::HLERequestContext& ctx) { | 27 | void NVDRV::Ioctl(Kernel::HLERequestContext& ctx) { |
| 28 | LOG_DEBUG(Service_NVDRV, "called"); | 28 | NGLOG_DEBUG(Service_NVDRV, "called"); |
| 29 | 29 | ||
| 30 | IPC::RequestParser rp{ctx}; | 30 | IPC::RequestParser rp{ctx}; |
| 31 | u32 fd = rp.Pop<u32>(); | 31 | u32 fd = rp.Pop<u32>(); |
| @@ -41,7 +41,7 @@ void NVDRV::Ioctl(Kernel::HLERequestContext& ctx) { | |||
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | void NVDRV::Close(Kernel::HLERequestContext& ctx) { | 43 | void NVDRV::Close(Kernel::HLERequestContext& ctx) { |
| 44 | LOG_DEBUG(Service_NVDRV, "called"); | 44 | NGLOG_DEBUG(Service_NVDRV, "called"); |
| 45 | 45 | ||
| 46 | IPC::RequestParser rp{ctx}; | 46 | IPC::RequestParser rp{ctx}; |
| 47 | u32 fd = rp.Pop<u32>(); | 47 | u32 fd = rp.Pop<u32>(); |
| @@ -53,7 +53,7 @@ void NVDRV::Close(Kernel::HLERequestContext& ctx) { | |||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | void NVDRV::Initialize(Kernel::HLERequestContext& ctx) { | 55 | void NVDRV::Initialize(Kernel::HLERequestContext& ctx) { |
| 56 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); | 56 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called"); |
| 57 | IPC::ResponseBuilder rb{ctx, 3}; | 57 | IPC::ResponseBuilder rb{ctx, 3}; |
| 58 | rb.Push(RESULT_SUCCESS); | 58 | rb.Push(RESULT_SUCCESS); |
| 59 | rb.Push<u32>(0); | 59 | rb.Push<u32>(0); |
| @@ -63,7 +63,7 @@ void NVDRV::QueryEvent(Kernel::HLERequestContext& ctx) { | |||
| 63 | IPC::RequestParser rp{ctx}; | 63 | IPC::RequestParser rp{ctx}; |
| 64 | u32 fd = rp.Pop<u32>(); | 64 | u32 fd = rp.Pop<u32>(); |
| 65 | u32 event_id = rp.Pop<u32>(); | 65 | u32 event_id = rp.Pop<u32>(); |
| 66 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, fd=%x, event_id=%x", fd, event_id); | 66 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, fd={:X}, event_id={:X}", fd, event_id); |
| 67 | 67 | ||
| 68 | IPC::ResponseBuilder rb{ctx, 3, 1}; | 68 | IPC::ResponseBuilder rb{ctx, 3, 1}; |
| 69 | rb.Push(RESULT_SUCCESS); | 69 | rb.Push(RESULT_SUCCESS); |
| @@ -75,14 +75,14 @@ void NVDRV::SetClientPID(Kernel::HLERequestContext& ctx) { | |||
| 75 | IPC::RequestParser rp{ctx}; | 75 | IPC::RequestParser rp{ctx}; |
| 76 | pid = rp.Pop<u64>(); | 76 | pid = rp.Pop<u64>(); |
| 77 | 77 | ||
| 78 | LOG_WARNING(Service_NVDRV, "(STUBBED) called, pid=0x%" PRIx64, pid); | 78 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called, pid={:#X}", pid); |
| 79 | IPC::ResponseBuilder rb{ctx, 3}; | 79 | IPC::ResponseBuilder rb{ctx, 3}; |
| 80 | rb.Push(RESULT_SUCCESS); | 80 | rb.Push(RESULT_SUCCESS); |
| 81 | rb.Push<u32>(0); | 81 | rb.Push<u32>(0); |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | void NVDRV::FinishInitialize(Kernel::HLERequestContext& ctx) { | 84 | void NVDRV::FinishInitialize(Kernel::HLERequestContext& ctx) { |
| 85 | LOG_WARNING(Service_NVDRV, "(STUBBED) called"); | 85 | NGLOG_WARNING(Service_NVDRV, "(STUBBED) called"); |
| 86 | IPC::ResponseBuilder rb{ctx, 2}; | 86 | IPC::ResponseBuilder rb{ctx, 2}; |
| 87 | rb.Push(RESULT_SUCCESS); | 87 | rb.Push(RESULT_SUCCESS); |
| 88 | } | 88 | } |