From 75e0d16caa994f0765f78268fb5a94496914d23b Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Sat, 24 Apr 2021 19:22:09 -0400 Subject: nvhost_vic: Fix device closure Implements the OnClose method of the nvhost_vic device, and removes the remnants of an older implementation. Also cleans up some of the surrounding code. --- src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp') diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp index 4e58b9b80..e2f671d8e 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec.cpp @@ -31,9 +31,8 @@ NvResult nvhost_nvdec::Ioctl1(DeviceFD fd, Ioctl command, const std::vector& return SetSubmitTimeout(input, output); case 0x9: return MapBuffer(input, output); - case 0xa: { + case 0xa: return UnmapBuffer(input, output); - } default: break; } @@ -67,7 +66,8 @@ NvResult nvhost_nvdec::Ioctl3(DeviceFD fd, Ioctl command, const std::vector& void nvhost_nvdec::OnOpen(DeviceFD fd) {} void nvhost_nvdec::OnClose(DeviceFD fd) { - system.GPU().ClearCommandBuffer(); + LOG_INFO(Service_NVDRV, "NVDEC video stream ended"); + system.GPU().ClearCdmaInstance(); } } // namespace Service::Nvidia::Devices -- cgit v1.2.3