[PATCH] drm: atomic-helper: make CRTC .atomic_enable() operation truly optional

Daniel Vetter daniel at ffwll.ch
Wed Jun 28 09:13:08 UTC 2017


On Wed, Jun 28, 2017 at 11:23:44AM +0300, Laurent Pinchart wrote:
> The CRTC .atomic_enable() helper operation is documented as optional,
> but if not provided the helpers will call the .commit() operation
> unconditionally, which is marked as deprecated for atomic drivers. Make
> the .atomic_enable() helper operation truly optional by calling the
> .commit() operation only when available.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>

Since this needs your other series first I can't apply it right away,
meanwhile

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

Please resend with the others when you do that.
-Daniel

> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> This patch is based on top of "[PATCH 0/8] Cleanup CRTC .enable()/.disable()
> cargo-cult".
> 
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 23e4661a62fe..b624fff5fe15 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -1093,7 +1093,7 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
>  
>  			if (funcs->atomic_enable)
>  				funcs->atomic_enable(crtc, old_crtc_state);
> -			else
> +			else if (funcs->commit)
>  				funcs->commit(crtc);
>  		}
>  	}
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list