diff options
| author | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-31 03:15:25 -0400 |
|---|---|---|
| committer | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-31 03:15:25 -0400 |
| commit | 520826452f765e47daa205e110a6056b73bf96a3 (patch) | |
| tree | af56088c3322ea46cc3b15bbda9f385e949fe604 /src | |
| parent | b40ad217ab829226841cb71f6e4c5cb05977a225 (diff) | |
nvdrv: let Switch 2 callers open nvhost-prof-gpu
Switch 2 lists the node with the other GPU nodes and Fire Emblem's CUDA
driver opens it. Switch 2 opens get the logged stub device; Switch 1
callers are still refused.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/nvdrv/nvdrv_interface.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hle/service/nvdrv/nvdrv_interface.cpp b/src/core/hle/service/nvdrv/nvdrv_interface.cpp index 020036d74b..2ee0d726a2 100644 --- a/src/core/hle/service/nvdrv/nvdrv_interface.cpp +++ b/src/core/hle/service/nvdrv/nvdrv_interface.cpp @@ -13,6 +13,7 @@ #include "core/hle/kernel/k_process.h" #include "core/hle/kernel/k_readable_event.h" #include "core/hle/service/ipc_helpers.h" +#include "core/hle/service/nvdrv/devices/nx2_stub_device.h" #include "core/hle/service/nvdrv/nvdata.h" #include "core/hle/service/nvdrv/nvdrv.h" #include "core/hle/service/nvdrv/nvdrv_interface.h" @@ -36,7 +37,10 @@ void NVDRV::Open(HLERequestContext& ctx) { const std::string device_name(Common::StringFromBuffer(buffer)); LOG_DEBUG(Service_NVDRV, "device_name={}", device_name); - if (device_name == "/dev/nvhost-prof-gpu") { + // Switch 2 lists nvhost-prof-gpu with the other GPU nodes and the CUDA driver (Fire + // Emblem's subsdk1) opens it, so only refuse it to Switch 1 callers. Switch 2 opens get + // the logged stub device. + if (device_name == "/dev/nvhost-prof-gpu" && !Devices::g_nx2_driver) { rb.Push<DeviceFD>(0); rb.PushEnum(NvResult::NotSupported); |
