diff options
| author | 2023-12-24 21:49:54 +0100 | |
|---|---|---|
| committer | 2024-01-18 21:12:30 -0500 | |
| commit | c85d7ccd79fb69bc096cd19bb8f95ac9534ffc23 (patch) | |
| tree | 7634acb7cfbee7829f958ad6ba03028c13a4ffec /src/video_core | |
| parent | NVDRV: Implement sessions and initial implementation of SMMU (diff) | |
| download | yuzu-c85d7ccd79fb69bc096cd19bb8f95ac9534ffc23.tar.gz yuzu-c85d7ccd79fb69bc096cd19bb8f95ac9534ffc23.tar.xz yuzu-c85d7ccd79fb69bc096cd19bb8f95ac9534ffc23.zip | |
SMMU: Implement backing CPU page protect/unprotect
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/host1x/gpu_device_memory_manager.cpp | 11 | ||||
| -rw-r--r-- | src/video_core/host1x/gpu_device_memory_manager.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/video_core/host1x/gpu_device_memory_manager.cpp b/src/video_core/host1x/gpu_device_memory_manager.cpp index 2ca445081..668c2f08b 100644 --- a/src/video_core/host1x/gpu_device_memory_manager.cpp +++ b/src/video_core/host1x/gpu_device_memory_manager.cpp | |||
| @@ -5,6 +5,17 @@ | |||
| 5 | #include "video_core/host1x/gpu_device_memory_manager.h" | 5 | #include "video_core/host1x/gpu_device_memory_manager.h" |
| 6 | #include "video_core/rasterizer_interface.h" | 6 | #include "video_core/rasterizer_interface.h" |
| 7 | 7 | ||
| 8 | namespace Tegra { | ||
| 9 | |||
| 10 | struct MaxwellDeviceMethods { | ||
| 11 | static inline void MarkRegionCaching(Core::Memory::Memory* interface, VAddr address, | ||
| 12 | size_t size, bool caching) { | ||
| 13 | interface->RasterizerMarkRegionCached(address, size, caching); | ||
| 14 | } | ||
| 15 | }; | ||
| 16 | |||
| 17 | } // namespace Tegra | ||
| 18 | |||
| 8 | template struct Core::DeviceMemoryManagerAllocator<Tegra::MaxwellDeviceTraits>; | 19 | template struct Core::DeviceMemoryManagerAllocator<Tegra::MaxwellDeviceTraits>; |
| 9 | template class Core::DeviceMemoryManager<Tegra::MaxwellDeviceTraits>; | 20 | template class Core::DeviceMemoryManager<Tegra::MaxwellDeviceTraits>; |
| 10 | 21 | ||
diff --git a/src/video_core/host1x/gpu_device_memory_manager.h b/src/video_core/host1x/gpu_device_memory_manager.h index 30ad52017..2fb77605e 100644 --- a/src/video_core/host1x/gpu_device_memory_manager.h +++ b/src/video_core/host1x/gpu_device_memory_manager.h | |||
| @@ -9,10 +9,13 @@ class RasterizerInterface; | |||
| 9 | 9 | ||
| 10 | namespace Tegra { | 10 | namespace Tegra { |
| 11 | 11 | ||
| 12 | struct MaxwellDeviceMethods; | ||
| 13 | |||
| 12 | struct MaxwellDeviceTraits { | 14 | struct MaxwellDeviceTraits { |
| 13 | static constexpr bool supports_pinning = true; | 15 | static constexpr bool supports_pinning = true; |
| 14 | static constexpr size_t device_virtual_bits = 34; | 16 | static constexpr size_t device_virtual_bits = 34; |
| 15 | using DeviceInterface = typename VideoCore::RasterizerInterface; | 17 | using DeviceInterface = typename VideoCore::RasterizerInterface; |
| 18 | using DeviceMethods = typename MaxwellDeviceMethods; | ||
| 16 | }; | 19 | }; |
| 17 | 20 | ||
| 18 | using MaxwellDeviceMemoryManager = Core::DeviceMemoryManager<MaxwellDeviceTraits>; | 21 | using MaxwellDeviceMemoryManager = Core::DeviceMemoryManager<MaxwellDeviceTraits>; |