|
|
@ -4,20 +4,25 @@ |
|
|
|
|
|
|
|
|
#pragma once |
|
|
#pragma once |
|
|
|
|
|
|
|
|
|
|
|
#include <memory> |
|
|
#include <vector> |
|
|
#include <vector> |
|
|
#include "common/common_types.h" |
|
|
#include "common/common_types.h" |
|
|
#include "common/swap.h" |
|
|
#include "common/swap.h" |
|
|
#include "core/hle/service/nvdrv/devices/nvdevice.h" |
|
|
#include "core/hle/service/nvdrv/devices/nvdevice.h" |
|
|
|
|
|
#include "core/hle/service/nvdrv/memory_manager.h" |
|
|
|
|
|
|
|
|
namespace Service { |
|
|
namespace Service { |
|
|
namespace Nvidia { |
|
|
namespace Nvidia { |
|
|
namespace Devices { |
|
|
namespace Devices { |
|
|
|
|
|
|
|
|
|
|
|
class nvmap; |
|
|
constexpr u32 NVGPU_IOCTL_MAGIC('H'); |
|
|
constexpr u32 NVGPU_IOCTL_MAGIC('H'); |
|
|
constexpr u32 NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO(0x8); |
|
|
constexpr u32 NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO(0x8); |
|
|
|
|
|
|
|
|
class nvhost_gpu final : public nvdevice { |
|
|
class nvhost_gpu final : public nvdevice { |
|
|
public: |
|
|
public: |
|
|
nvhost_gpu() = default; |
|
|
|
|
|
|
|
|
nvhost_gpu(std::shared_ptr<nvmap> nvmap_dev, std::shared_ptr<MemoryManager> memory_manager) |
|
|
|
|
|
: nvdevice(), nvmap_dev(std::move(nvmap_dev)), memory_manager(std::move(memory_manager)) {} |
|
|
~nvhost_gpu() override = default; |
|
|
~nvhost_gpu() override = default; |
|
|
|
|
|
|
|
|
u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) override; |
|
|
u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) override; |
|
|
@ -132,6 +137,9 @@ private: |
|
|
u32 AllocGPFIFOEx2(const std::vector<u8>& input, std::vector<u8>& output); |
|
|
u32 AllocGPFIFOEx2(const std::vector<u8>& input, std::vector<u8>& output); |
|
|
u32 AllocateObjectContext(const std::vector<u8>& input, std::vector<u8>& output); |
|
|
u32 AllocateObjectContext(const std::vector<u8>& input, std::vector<u8>& output); |
|
|
u32 SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& output); |
|
|
u32 SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& output); |
|
|
|
|
|
|
|
|
|
|
|
std::shared_ptr<nvmap> nvmap_dev; |
|
|
|
|
|
std::shared_ptr<MemoryManager> memory_manager; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
} // namespace Devices |
|
|
} // namespace Devices |
|
|
|