From 99fdfa1fcdcdba6abcc04733dc2bacd92b285f0a Mon Sep 17 00:00:00 2001 From: Chloe Marcec Date: Thu, 25 Mar 2021 12:56:42 +1100 Subject: nvdrv: Pass device fd and handle device create methods for device opening and closing We pass the fd to the ioctl as well as alert the device when it's opened or closed to allow for fd unique actions to take place --- src/core/hle/service/nvdrv/devices/nvhost_vic.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/core/hle/service/nvdrv/devices/nvhost_vic.cpp') diff --git a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp index 70849a9bd..0421fb956 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_vic.cpp @@ -16,7 +16,8 @@ nvhost_vic::nvhost_vic(Core::System& system, std::shared_ptr nvmap_dev, nvhost_vic::~nvhost_vic() = default; -NvResult nvhost_vic::Ioctl1(Ioctl command, const std::vector& input, std::vector& output) { +NvResult nvhost_vic::Ioctl1(DeviceFD fd, Ioctl command, const std::vector& input, + std::vector& output) { switch (command.group) { case 0x0: switch (command.cmd) { @@ -55,16 +56,19 @@ NvResult nvhost_vic::Ioctl1(Ioctl command, const std::vector& input, std::ve return NvResult::NotImplemented; } -NvResult nvhost_vic::Ioctl2(Ioctl command, const std::vector& input, +NvResult nvhost_vic::Ioctl2(DeviceFD fd, Ioctl command, const std::vector& input, const std::vector& inline_input, std::vector& output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } -NvResult nvhost_vic::Ioctl3(Ioctl command, const std::vector& input, std::vector& output, - std::vector& inline_output) { +NvResult nvhost_vic::Ioctl3(DeviceFD fd, Ioctl command, const std::vector& input, + std::vector& output, std::vector& inline_output) { UNIMPLEMENTED_MSG("Unimplemented ioctl={:08X}", command.raw); return NvResult::NotImplemented; } +void nvhost_vic::OnOpen(DeviceFD fd) {} +void nvhost_vic::OnClose(DeviceFD fd) {} + } // namespace Service::Nvidia::Devices -- cgit v1.2.3