From c2861e2808c5cd8d60ed6da79881f9deaf3f4da2 Mon Sep 17 00:00:00 2001 From: Grace An Date: Tue, 2 Aug 2022 14:13:04 -0700 Subject: [PATCH] soc: hw_fence: add support for 64-bit client_data Modify msm_hw_fence_wait_update_v2 api to include the optional parameter client_data_list, a list of values that are returned to the client upon signaling of the corresponding fence through the RxQ. Change-Id: I1daeadc7812cf475fba635be2fc446157da9d73b Signed-off-by: Grace An --- include/linux/soc/qcom/msm_hw_fence.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/include/linux/soc/qcom/msm_hw_fence.h b/include/linux/soc/qcom/msm_hw_fence.h index c0c909bfd6e1..a646ef20969d 100644 --- a/include/linux/soc/qcom/msm_hw_fence.h +++ b/include/linux/soc/qcom/msm_hw_fence.h @@ -262,8 +262,17 @@ int msm_hw_fence_destroy_with_handle(void *client_handle, u64 handle); * @handles: Optional pointer to an array of handles of 'fences'. * If non-null, these handles are filled by the function. * This list must have the same size as 'fences' if present. - * @num_fences: Number of elements in the 'fences' list (and 'handles', - * if present). + * @client_data_list: Optional pointer to an array of u64 client_data + * values for each fence in 'fences'. + * If non-null, this list must have the same size as + * the 'fences' list. This client registers each fence + * with the client_data value at the same index so that + * this value is returned to the client upon signaling + * of the fence. + * If a null pointer is provided, a default value of + * zero is registered as the client_data of each fence. + * @num_fences: Number of elements in the 'fences' list (and 'handles' and + * 'client_data_list' if either or both are present). * @reg: Boolean to indicate if register or unregister for waiting on * the hw-fence. * @@ -287,7 +296,7 @@ int msm_hw_fence_destroy_with_handle(void *client_handle, u64 handle); * Return: 0 on success or negative errno (-EINVAL) */ int msm_hw_fence_wait_update_v2(void *client_handle, - struct dma_fence **fences, u64 *handles, u32 num_fences, bool reg); + struct dma_fence **fences, u64 *handles, u64 *client_data_list, u32 num_fences, bool reg); /** * msm_hw_fence_wait_update() - Register or unregister the Client with the @@ -429,7 +438,7 @@ static inline int msm_hw_fence_destroy_with_handle(void *client_handle, u64 hand } static inline int msm_hw_fence_wait_update_v2(void *client_handle, - struct dma_fence **fences, u64 *handles, u32 num_fences, bool reg) + struct dma_fence **fences, u64 *handles, u64 *client_data_list, u32 num_fences, bool reg) { return -EINVAL; }