Re: [PATCH v6 5/7] drm: writeback: Modify drm_writeback_get_out_fence helper

Alex Hung <[email protected]>
Newsgroups org.freedesktop.lists.intel-gfx,org.freedesktop.lists.amd-gfx,org.freedesktop.lists.dri-devel,org.freedesktop.lists.intel-xe,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Reviewed-by: Alex Hung <[email protected]>

On 7/13/26 22:28, Suraj Kandpal wrote:
> drm_writeback_get_out_fence() does not itself need the parent
> drm_connector object, but update it to take drm_connector for
> consistency across the writeback interface, which is being moved
> to use the top level drm_connector and traverse down to
> drm_writeback_connector rather than passing in the lower level
> object and traversing back up.
> 
> Signed-off-by: Suraj Kandpal <[email protected]>
> Reviewed-by: John Harrison <[email protected]>
> ---
> v5 -> v6:
> - Rebase over latest kernel
> 
> v3 -> v4:
> - Update subject line for consitency (John)
> - Update commit message across commits for consitency (John)
> 
>   drivers/gpu/drm/drm_atomic_uapi.c | 4 +---
>   drivers/gpu/drm/drm_writeback.c   | 4 ++--
>   include/drm/drm_writeback.h       | 2 +-
>   3 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
> index a5c11832ff64..2271cd970985 100644
> --- a/drivers/gpu/drm/drm_atomic_uapi.c
> +++ b/drivers/gpu/drm/drm_atomic_uapi.c
> @@ -1492,7 +1492,6 @@ static int prepare_signaling(struct drm_device *dev,
>   	}
>   
>   	for_each_new_connector_in_state(state, conn, conn_state, i) {
> -		struct drm_writeback_connector *wb_conn;
>   		struct drm_out_fence_state *f;
>   		struct dma_fence *fence;
>   		s32 __user *fence_ptr;
> @@ -1514,8 +1513,7 @@ static int prepare_signaling(struct drm_device *dev,
>   		f[*num_fences].out_fence_ptr = fence_ptr;
>   		*fence_state = f;
>   
> -		wb_conn = &conn->writeback;
> -		fence = drm_writeback_get_out_fence(wb_conn);
> +		fence = drm_writeback_get_out_fence(conn);
>   		if (!fence)
>   			return -ENOMEM;
>   
> diff --git a/drivers/gpu/drm/drm_writeback.c b/drivers/gpu/drm/drm_writeback.c
> index df8484a7aa03..d2ccb4dcba0a 100644
> --- a/drivers/gpu/drm/drm_writeback.c
> +++ b/drivers/gpu/drm/drm_writeback.c
> @@ -531,10 +531,10 @@ drm_writeback_signal_completion(struct drm_connector *connector,
>   EXPORT_SYMBOL(drm_writeback_signal_completion);
>   
>   struct dma_fence *
> -drm_writeback_get_out_fence(struct drm_writeback_connector *wb_connector)
> +drm_writeback_get_out_fence(struct drm_connector *connector)
>   {
>   	struct dma_fence *fence;
> -	struct drm_connector *connector = drm_writeback_to_connector(wb_connector);
> +	struct drm_writeback_connector *wb_connector = &connector->writeback;
>   
>   	if (WARN_ON(connector->connector_type !=
>   		    DRM_MODE_CONNECTOR_WRITEBACK))
> diff --git a/include/drm/drm_writeback.h b/include/drm/drm_writeback.h
> index 5e8ab51c2da4..2afa48ea7c00 100644
> --- a/include/drm/drm_writeback.h
> +++ b/include/drm/drm_writeback.h
> @@ -104,5 +104,5 @@ drm_writeback_signal_completion(struct drm_connector *connector,
>   				int status);
>   
>   struct dma_fence *
> -drm_writeback_get_out_fence(struct drm_writeback_connector *wb_connector);
> +drm_writeback_get_out_fence(struct drm_connector *connector);
>   #endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.