mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
Fixed the erroneous timeout message in sync-unmap and corrected the condition for returning ETIMEDOUT. In the original codeflow, after waiting for mapped_buffer release, nvgpu_timeout_expired is called to check whether to return ETIMEDOUT. However, if there is a delay between the end of the waiting and the nvgpu_timeout_expired check, ETIMEDOUT is returned regardless if the mapped_buffer is released with the timeout message printed. This is an incorrect behavior. This patch fixes it by letting the refcount of the mapped_buffer be the only source to determine the return value. Bug 200434475 Change-Id: I8ca170c811da415c24045ab643da26476bc7463c Signed-off-by: Kyle Guo <kyleg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1945388 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>