mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-26 23:57:03 +02:00
stub nv ctrl-gpu and nvdec debug stuff
This commit is contained in:
parent
b09d073497
commit
c3ec6f62ed
5 changed files with 37 additions and 7 deletions
|
|
@ -47,6 +47,8 @@ NvResult nvhost_ctrl_gpu::Ioctl1(DeviceFD fd, Ioctl command, std::span<const u8>
|
|||
return WrapFixed(this, &nvhost_ctrl_gpu::FlushL2, input, output);
|
||||
case 0x14:
|
||||
return WrapFixed(this, &nvhost_ctrl_gpu::GetActiveSlotMask, input, output);
|
||||
case 0x15:
|
||||
return WrapFixed(this, &nvhost_ctrl_gpu::PmuGetGpuLoad, input, output);
|
||||
case 0x1c:
|
||||
return WrapFixed(this, &nvhost_ctrl_gpu::GetGpuTime, input, output);
|
||||
default:
|
||||
|
|
@ -234,6 +236,12 @@ NvResult nvhost_ctrl_gpu::GetActiveSlotMask(IoctlActiveSlotMask& params) {
|
|||
return NvResult::Success;
|
||||
}
|
||||
|
||||
NvResult nvhost_ctrl_gpu::PmuGetGpuLoad(IoctlPmuGetLoad& params) {
|
||||
LOG_WARNING(Service_NVDRV, "(stubbed) called");
|
||||
params.pmu_gpu_load = 100;
|
||||
return NvResult::Success;
|
||||
}
|
||||
|
||||
NvResult nvhost_ctrl_gpu::ZCullGetCtxSize(IoctlZcullGetCtxSize& params) {
|
||||
LOG_DEBUG(Service_NVDRV, "called");
|
||||
params.size = 0x1;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
|
|
@ -184,6 +184,11 @@ private:
|
|||
};
|
||||
static_assert(sizeof(IoctlGetCpuTimeCorrelationInfo) == 264);
|
||||
|
||||
struct IoctlPmuGetLoad {
|
||||
u32 pmu_gpu_load;
|
||||
};
|
||||
static_assert(sizeof(IoctlPmuGetLoad) == 4);
|
||||
|
||||
NvResult GetCharacteristics1(IoctlCharacteristics& params);
|
||||
NvResult GetCharacteristics3(IoctlCharacteristics& params,
|
||||
std::span<IoctlGpuCharacteristics> gpu_characteristics);
|
||||
|
|
@ -192,6 +197,7 @@ private:
|
|||
NvResult GetTPCMasks3(IoctlGpuGetTpcMasksArgs& params, std::span<u32> tpc_mask);
|
||||
|
||||
NvResult GetActiveSlotMask(IoctlActiveSlotMask& params);
|
||||
NvResult PmuGetGpuLoad(IoctlPmuGetLoad& params);
|
||||
NvResult ZCullGetCtxSize(IoctlZcullGetCtxSize& params);
|
||||
NvResult ZCullGetInfo(IoctlNvgpuGpuZcullGetInfoArgs& params);
|
||||
NvResult ZBCSetTable(IoctlZbcSetTable& params);
|
||||
|
|
|
|||
|
|
@ -25,18 +25,20 @@ NvResult nvhost_nvdec::Ioctl1(DeviceFD fd, Ioctl command, std::span<const u8> in
|
|||
switch (command.group) {
|
||||
case 0x0:
|
||||
switch (command.cmd) {
|
||||
case 0x1:
|
||||
case 0x01:
|
||||
return WrapFixedVariable(this, &nvhost_nvdec::Submit, input, output, fd);
|
||||
case 0x2:
|
||||
case 0x02:
|
||||
return WrapFixed(this, &nvhost_nvdec::GetSyncpoint, input, output);
|
||||
case 0x3:
|
||||
case 0x03:
|
||||
return WrapFixed(this, &nvhost_nvdec::GetWaitbase, input, output);
|
||||
case 0x7:
|
||||
case 0x07:
|
||||
return WrapFixed(this, &nvhost_nvdec::SetSubmitTimeout, input, output);
|
||||
case 0x9:
|
||||
case 0x09:
|
||||
return WrapFixedVariable(this, &nvhost_nvdec::MapBuffer, input, output, fd);
|
||||
case 0xa:
|
||||
case 0x0a:
|
||||
return WrapFixedVariable(this, &nvhost_nvdec::UnmapBuffer, input, output);
|
||||
case 0x23:
|
||||
return WrapFixed(this, &nvhost_nvdec::GetClkRate, input, output);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,6 +168,13 @@ NvResult nvhost_nvdec_common::SetSubmitTimeout(u32 timeout) {
|
|||
return NvResult::Success;
|
||||
}
|
||||
|
||||
NvResult nvhost_nvdec_common::GetClkRate(IoctlGetClkRate& params) {
|
||||
LOG_WARNING(Service_NVDRV, "(STUBBED) called");
|
||||
params.clk_rate = 614400000;
|
||||
params.module_id = 0;
|
||||
return NvResult::Success;
|
||||
}
|
||||
|
||||
Kernel::KEvent* nvhost_nvdec_common::QueryEvent(u32 event_id) {
|
||||
LOG_CRITICAL(Service_NVDRV, "Unknown HOSTX1 Event {}", event_id);
|
||||
return nullptr;
|
||||
|
|
|
|||
|
|
@ -111,6 +111,12 @@ protected:
|
|||
};
|
||||
static_assert(sizeof(IoctlMapBuffer) == 0x0C, "IoctlMapBuffer is incorrect size");
|
||||
|
||||
struct IoctlGetClkRate {
|
||||
u32_le clk_rate{};
|
||||
u32_le module_id{};
|
||||
};
|
||||
static_assert(sizeof(IoctlGetClkRate) == 8);
|
||||
|
||||
/// Ioctl command implementations
|
||||
NvResult SetNVMAPfd(IoctlSetNvmapFD&);
|
||||
NvResult Submit(IoctlSubmit& params, std::span<u8> input, DeviceFD fd);
|
||||
|
|
@ -119,6 +125,7 @@ protected:
|
|||
NvResult MapBuffer(IoctlMapBuffer& params, std::span<MapBufferEntry> entries, DeviceFD fd);
|
||||
NvResult UnmapBuffer(IoctlMapBuffer& params, std::span<MapBufferEntry> entries);
|
||||
NvResult SetSubmitTimeout(u32 timeout);
|
||||
NvResult GetClkRate(IoctlGetClkRate& params);
|
||||
|
||||
Kernel::KEvent* QueryEvent(u32 event_id) override;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue