summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2023-12-24 21:49:54 +0100
committerGravatar Liam2024-01-18 21:12:30 -0500
commitc85d7ccd79fb69bc096cd19bb8f95ac9534ffc23 (patch)
tree7634acb7cfbee7829f958ad6ba03028c13a4ffec /src/video_core
parentNVDRV: Implement sessions and initial implementation of SMMU (diff)
downloadyuzu-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.cpp11
-rw-r--r--src/video_core/host1x/gpu_device_memory_manager.h3
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
8namespace Tegra {
9
10struct 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
8template struct Core::DeviceMemoryManagerAllocator<Tegra::MaxwellDeviceTraits>; 19template struct Core::DeviceMemoryManagerAllocator<Tegra::MaxwellDeviceTraits>;
9template class Core::DeviceMemoryManager<Tegra::MaxwellDeviceTraits>; 20template 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
10namespace Tegra { 10namespace Tegra {
11 11
12struct MaxwellDeviceMethods;
13
12struct MaxwellDeviceTraits { 14struct 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
18using MaxwellDeviceMemoryManager = Core::DeviceMemoryManager<MaxwellDeviceTraits>; 21using MaxwellDeviceMemoryManager = Core::DeviceMemoryManager<MaxwellDeviceTraits>;