Skip to content

Commit

Permalink
radv: Add radv_get_tdr_timeout_for_ip helper
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Ashton <[email protected]>

Reviewed-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Friedrich Vock <[email protected]>
  • Loading branch information
misyltoad committed Jan 18, 2024
1 parent f424d08 commit 4c86635
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/amd/vulkan/radv_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -3724,6 +3724,15 @@ VK_DEFINE_NONDISP_HANDLE_CASTS(radv_video_session, vk.base, VkVideoSessionKHR, V
VK_DEFINE_NONDISP_HANDLE_CASTS(radv_video_session_params, vk.base, VkVideoSessionParametersKHR,
VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR)

static inline uint64_t
radv_get_tdr_timeout_for_ip(enum amd_ip_type ip_type)
{
const uint64_t compute_tdr_duration_ns = 60000000000ull; /* 1 minute (default in kernel) */
const uint64_t other_tdr_duration_ns = 10000000000ull; /* 10 seconds (default in kernel) */

return ip_type == AMD_IP_COMPUTE ? compute_tdr_duration_ns : other_tdr_duration_ns;
}

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit 4c86635

Please sign in to comment.