Re: [PATCH v3 3/9] drm/connector: Make ->atomic_commit() optional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 02, 2018 at 02:20:14PM +0200, Boris Brezillon wrote:
> Not all writeback connector implementations might want to commit things
> from the connector driver. Some, like the malidp driver, commit things
> from their main commit_tail() function, and would rather not have to
> implement a dummy hook for drm_connector_helper_funcs.atomic_commit().
> 
> Make this function optional and reflect this fact in the doc.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@xxxxxxxxxxx>

Acked-by: Liviu Dudau <liviu.dudau@xxxxxxx>

Thanks!
Liviu

> ---
> Changes in v3:
> - New patch
> ---
>  drivers/gpu/drm/drm_atomic_helper.c      | 2 ++
>  include/drm/drm_modeset_helper_vtables.h | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 69063bcf2334..ea19fcc252dc 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -1184,6 +1184,8 @@ static void drm_atomic_helper_commit_writebacks(struct drm_device *dev,
>  		const struct drm_connector_helper_funcs *funcs;
>  
>  		funcs = connector->helper_private;
> +		if (!funcs->funcs->atomic_commit)
> +			continue;
>  
>  		if (new_conn_state->writeback_job && new_conn_state->writeback_job->fb) {
>  			WARN_ON(connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK);
> diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h
> index fb841f44949c..d0eb76c4b309 100644
> --- a/include/drm/drm_modeset_helper_vtables.h
> +++ b/include/drm/drm_modeset_helper_vtables.h
> @@ -983,6 +983,8 @@ struct drm_connector_helper_funcs {
>  	 * The writeback_job to commit is available in
>  	 * &drm_connector_state.writeback_job.
>  	 *
> +	 * This hook is optional.
> +	 *
>  	 * This callback is used by the atomic modeset helpers.
>  	 */
>  	void (*atomic_commit)(struct drm_connector *connector,
> -- 
> 2.14.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux