diff options
| author | 2023-12-30 04:37:25 +0100 | |
|---|---|---|
| committer | 2024-01-18 21:12:30 -0500 | |
| commit | 303cd311621b25fbb8d55e0ed2cc4c3248de44ad (patch) | |
| tree | f52d147d935449c21e8a8edf8ad28272859d94c5 /src/core/hle/service/nvdrv | |
| parent | GPU-SMMU: Estimate game leak and preallocate device region. (diff) | |
| download | yuzu-303cd311621b25fbb8d55e0ed2cc4c3248de44ad.tar.gz yuzu-303cd311621b25fbb8d55e0ed2cc4c3248de44ad.tar.xz yuzu-303cd311621b25fbb8d55e0ed2cc4c3248de44ad.zip | |
SMMU: Add Android compatibility
Diffstat (limited to 'src/core/hle/service/nvdrv')
| -rw-r--r-- | src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp index 0b6aa9993..a50577c75 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.cpp | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include "common/common_types.h" | 8 | #include "common/common_types.h" |
| 9 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| 10 | #include "core/core.h" | 10 | #include "core/core.h" |
| 11 | #include "core/hle/kernel/k_process.h" | ||
| 11 | #include "core/hle/service/nvdrv/core/container.h" | 12 | #include "core/hle/service/nvdrv/core/container.h" |
| 12 | #include "core/hle/service/nvdrv/core/nvmap.h" | 13 | #include "core/hle/service/nvdrv/core/nvmap.h" |
| 13 | #include "core/hle/service/nvdrv/core/syncpoint_manager.h" | 14 | #include "core/hle/service/nvdrv/core/syncpoint_manager.h" |
| @@ -109,7 +110,7 @@ NvResult nvhost_nvdec_common::Submit(IoctlSubmit& params, std::span<u8> data, De | |||
| 109 | ASSERT_OR_EXECUTE(object, return NvResult::InvalidState;); | 110 | ASSERT_OR_EXECUTE(object, return NvResult::InvalidState;); |
| 110 | Tegra::ChCommandHeaderList cmdlist(cmd_buffer.word_count); | 111 | Tegra::ChCommandHeaderList cmdlist(cmd_buffer.word_count); |
| 111 | session->process->GetMemory().ReadBlock(object->address + cmd_buffer.offset, cmdlist.data(), | 112 | session->process->GetMemory().ReadBlock(object->address + cmd_buffer.offset, cmdlist.data(), |
| 112 | cmdlist.size() * sizeof(u32)); | 113 | cmdlist.size() * sizeof(u32)); |
| 113 | gpu.PushCommandBuffer(core.Host1xDeviceFile().fd_to_id[fd], cmdlist); | 114 | gpu.PushCommandBuffer(core.Host1xDeviceFile().fd_to_id[fd], cmdlist); |
| 114 | } | 115 | } |
| 115 | // Some games expect command_buffers to be written back | 116 | // Some games expect command_buffers to be written back |
| @@ -135,7 +136,8 @@ NvResult nvhost_nvdec_common::GetWaitbase(IoctlGetWaitbase& params) { | |||
| 135 | return NvResult::Success; | 136 | return NvResult::Success; |
| 136 | } | 137 | } |
| 137 | 138 | ||
| 138 | NvResult nvhost_nvdec_common::MapBuffer(IoctlMapBuffer& params, std::span<MapBufferEntry> entries, DeviceFD fd) { | 139 | NvResult nvhost_nvdec_common::MapBuffer(IoctlMapBuffer& params, std::span<MapBufferEntry> entries, |
| 140 | DeviceFD fd) { | ||
| 139 | const size_t num_entries = std::min(params.num_entries, static_cast<u32>(entries.size())); | 141 | const size_t num_entries = std::min(params.num_entries, static_cast<u32>(entries.size())); |
| 140 | for (size_t i = 0; i < num_entries; i++) { | 142 | for (size_t i = 0; i < num_entries; i++) { |
| 141 | DAddr pin_address = nvmap.PinHandle(entries[i].map_handle, sessions[fd], true); | 143 | DAddr pin_address = nvmap.PinHandle(entries[i].map_handle, sessions[fd], true); |