mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-21 13:37:52 -05:00
NVDRV: Refactor and add new NvMap.
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/kernel/k_event.h"
|
||||
#include "core/hle/kernel/k_writable_event.h"
|
||||
#include "core/hle/service/nvdrv/core/container.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvdevice.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvdisp_disp0.h"
|
||||
#include "core/hle/service/nvdrv/devices/nvhost_as_gpu.h"
|
||||
@ -24,8 +25,8 @@
|
||||
#include "core/hle/service/nvdrv/nvdrv.h"
|
||||
#include "core/hle/service/nvdrv/nvdrv_interface.h"
|
||||
#include "core/hle/service/nvdrv/nvmemp.h"
|
||||
#include "core/hle/service/nvdrv/syncpoint_manager.h"
|
||||
#include "core/hle/service/nvflinger/nvflinger.h"
|
||||
#include "video_core/gpu.h"
|
||||
|
||||
namespace Service::Nvidia {
|
||||
|
||||
@ -75,6 +76,7 @@ void EventInterface::Create(u32 event_id) {
|
||||
const u64 mask = 1ULL << event_id;
|
||||
fails[event_id] = 0;
|
||||
events_mask |= mask;
|
||||
assigned_syncpt[event_id] = 0;
|
||||
}
|
||||
|
||||
void EventInterface::Free(u32 event_id) {
|
||||
@ -135,22 +137,22 @@ void InstallInterfaces(SM::ServiceManager& service_manager, NVFlinger::NVFlinger
|
||||
}
|
||||
|
||||
Module::Module(Core::System& system)
|
||||
: syncpoint_manager{system.GPU()}, service_context{system, "nvdrv"}, events_interface{*this} {
|
||||
: service_context{system, "nvdrv"}, events_interface{*this}, container{system.GPU()} {
|
||||
auto nvmap_dev = std::make_shared<Devices::nvmap>(system);
|
||||
devices["/dev/nvhost-as-gpu"] = std::make_shared<Devices::nvhost_as_gpu>(system, nvmap_dev);
|
||||
devices["/dev/nvhost-gpu"] = std::make_shared<Devices::nvhost_gpu>(
|
||||
system, nvmap_dev, events_interface, syncpoint_manager);
|
||||
devices["/dev/nvhost-gpu"] =
|
||||
std::make_shared<Devices::nvhost_gpu>(system, nvmap_dev, events_interface, container);
|
||||
devices["/dev/nvhost-ctrl-gpu"] =
|
||||
std::make_shared<Devices::nvhost_ctrl_gpu>(system, events_interface);
|
||||
devices["/dev/nvmap"] = nvmap_dev;
|
||||
devices["/dev/nvdisp_disp0"] = std::make_shared<Devices::nvdisp_disp0>(system, nvmap_dev);
|
||||
devices["/dev/nvhost-ctrl"] =
|
||||
std::make_shared<Devices::nvhost_ctrl>(system, events_interface, syncpoint_manager);
|
||||
std::make_shared<Devices::nvhost_ctrl>(system, events_interface, container);
|
||||
devices["/dev/nvhost-nvdec"] =
|
||||
std::make_shared<Devices::nvhost_nvdec>(system, nvmap_dev, syncpoint_manager);
|
||||
std::make_shared<Devices::nvhost_nvdec>(system, nvmap_dev, container);
|
||||
devices["/dev/nvhost-nvjpg"] = std::make_shared<Devices::nvhost_nvjpg>(system);
|
||||
devices["/dev/nvhost-vic"] =
|
||||
std::make_shared<Devices::nvhost_vic>(system, nvmap_dev, syncpoint_manager);
|
||||
std::make_shared<Devices::nvhost_vic>(system, nvmap_dev, container);
|
||||
}
|
||||
|
||||
Module::~Module() = default;
|
||||
|
Reference in New Issue
Block a user