From ba2426aa3f9b433b54e43e5dae3c596e6f3ae45d Mon Sep 17 00:00:00 2001 From: Subv Date: Sun, 11 Feb 2018 21:30:23 -0500 Subject: nvdrv: Make the GPU memory manager available to nvhost-gpu. --- src/core/hle/service/nvdrv/devices/nvhost_gpu.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/nvdrv/devices/nvhost_gpu.h') diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h index 4fe2c9ad5..5b40eaa88 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h @@ -4,20 +4,25 @@ #pragma once +#include #include #include "common/common_types.h" #include "common/swap.h" #include "core/hle/service/nvdrv/devices/nvdevice.h" +#include "core/hle/service/nvdrv/memory_manager.h" namespace Service { namespace Nvidia { namespace Devices { + +class nvmap; constexpr u32 NVGPU_IOCTL_MAGIC('H'); constexpr u32 NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO(0x8); class nvhost_gpu final : public nvdevice { public: - nvhost_gpu() = default; + nvhost_gpu(std::shared_ptr nvmap_dev, std::shared_ptr memory_manager) + : nvdevice(), nvmap_dev(std::move(nvmap_dev)), memory_manager(std::move(memory_manager)) {} ~nvhost_gpu() override = default; u32 ioctl(Ioctl command, const std::vector& input, std::vector& output) override; @@ -132,6 +137,9 @@ private: u32 AllocGPFIFOEx2(const std::vector& input, std::vector& output); u32 AllocateObjectContext(const std::vector& input, std::vector& output); u32 SubmitGPFIFO(const std::vector& input, std::vector& output); + + std::shared_ptr nvmap_dev; + std::shared_ptr memory_manager; }; } // namespace Devices -- cgit v1.2.3