From 7a84a1a9748d01961e91ad612ed338abf9ec844c Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 24 Oct 2023 13:19:54 -0400 Subject: nvdrv: convert nvhost_gpu --- src/core/hle/service/nvdrv/devices/nvhost_gpu.h | 32 +++++++++++++------------ 1 file changed, 17 insertions(+), 15 deletions(-) (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 529c20526..fba4232c4 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h @@ -186,23 +186,25 @@ private: u32_le channel_priority{}; u32_le channel_timeslice{}; - NvResult SetNVMAPfd(std::span input, std::span output); - NvResult SetClientData(std::span input, std::span output); - NvResult GetClientData(std::span input, std::span output); - NvResult ZCullBind(std::span input, std::span output); - NvResult SetErrorNotifier(std::span input, std::span output); - NvResult SetChannelPriority(std::span input, std::span output); - NvResult AllocGPFIFOEx2(std::span input, std::span output); - NvResult AllocateObjectContext(std::span input, std::span output); + NvResult SetNVMAPfd(IoctlSetNvmapFD& params); + NvResult SetClientData(IoctlClientData& params); + NvResult GetClientData(IoctlClientData& params); + NvResult ZCullBind(IoctlZCullBind& params); + NvResult SetErrorNotifier(IoctlSetErrorNotifier& params); + NvResult SetChannelPriority(IoctlChannelSetPriority& params); + NvResult AllocGPFIFOEx2(IoctlAllocGpfifoEx2& params); + NvResult AllocateObjectContext(IoctlAllocObjCtx& params); + NvResult SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, std::span output, Tegra::CommandList&& entries); - NvResult SubmitGPFIFOBase(std::span input, std::span output, - bool kickoff = false); - NvResult SubmitGPFIFOBase(std::span input, std::span input_inline, - std::span output); - NvResult GetWaitbase(std::span input, std::span output); - NvResult ChannelSetTimeout(std::span input, std::span output); - NvResult ChannelSetTimeslice(std::span input, std::span output); + NvResult SubmitGPFIFOBase1(std::span input, std::span output, + bool kickoff = false); + NvResult SubmitGPFIFOBase2(std::span input, std::span input_inline, + std::span output); + + NvResult GetWaitbase(IoctlGetWaitbase& params); + NvResult ChannelSetTimeout(IoctlChannelSetTimeout& params); + NvResult ChannelSetTimeslice(IoctlSetTimeslice& params); EventInterface& events_interface; NvCore::Container& core; -- cgit v1.2.3 From 94b7ac50bb5283caf20989341e27d77ec2c57bef Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 24 Oct 2023 13:41:48 -0400 Subject: nvdrv: fix up remaining copy calls --- src/core/hle/service/nvdrv/devices/nvhost_gpu.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (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 fba4232c4..703079a54 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h @@ -195,12 +195,9 @@ private: NvResult AllocGPFIFOEx2(IoctlAllocGpfifoEx2& params); NvResult AllocateObjectContext(IoctlAllocObjCtx& params); - NvResult SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, std::span output, - Tegra::CommandList&& entries); - NvResult SubmitGPFIFOBase1(std::span input, std::span output, - bool kickoff = false); - NvResult SubmitGPFIFOBase2(std::span input, std::span input_inline, - std::span output); + NvResult SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, Tegra::CommandList&& entries); + NvResult SubmitGPFIFOBase1(std::span input, bool kickoff = false); + NvResult SubmitGPFIFOBase2(std::span input, std::span input_inline); NvResult GetWaitbase(IoctlGetWaitbase& params); NvResult ChannelSetTimeout(IoctlChannelSetTimeout& params); -- cgit v1.2.3 From 723df0f3685f01ce5a0330d567932136a9de7a8f Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 25 Oct 2023 00:34:40 -0400 Subject: nvdrv: rework to remove memcpy --- src/core/hle/service/nvdrv/devices/nvhost_gpu.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (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 703079a54..88fd228ff 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h @@ -196,8 +196,10 @@ private: NvResult AllocateObjectContext(IoctlAllocObjCtx& params); NvResult SubmitGPFIFOImpl(IoctlSubmitGpfifo& params, Tegra::CommandList&& entries); - NvResult SubmitGPFIFOBase1(std::span input, bool kickoff = false); - NvResult SubmitGPFIFOBase2(std::span input, std::span input_inline); + NvResult SubmitGPFIFOBase1(IoctlSubmitGpfifo& params, + std::span commands, bool kickoff = false); + NvResult SubmitGPFIFOBase2(IoctlSubmitGpfifo& params, + std::span commands); NvResult GetWaitbase(IoctlGetWaitbase& params); NvResult ChannelSetTimeout(IoctlChannelSetTimeout& params); -- cgit v1.2.3