mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 18:42:29 +03:00
channel_sync->wait_fd depends upon nvgpu_os_fence->program_waits which invokes a channel_sync method and this leads to a circular dependency. In order to resolve the above, constructed struct nvgpu_os_fence_sema and struct nvgpu_os_fence_syncpt with interfaces that support conversion between struct nvgpu_os_fence to above. Also, added the following interfaces for retrieving syncpts and semaphore from the above structs respectively. void nvgpu_os_fence_sema_extract_nth_semaphore(...) int nvgpu_os_fence_sema_get_num_semaphores(...) void nvgpu_os_fence_syncpt_extract_nth_syncpt(...) int nvgpu_os_fence_syncpt_get_num_syncpoints(...) These enable channel_sync code to directly program the cmd_bufs based on the syncpts and semaphore received using the above APIs instead of the current state of doing the wait programming from within nvgpu_os_fence's interfaces. Jira NVGPU-1093 Change-Id: Ie411f0ba60bca38f66a0024f5dfca03ef0b836eb Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1827475 Reviewed-by: Konsta Holtta <kholtta@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>