[PATCH 17/20] drm: rcar-du: crtc: Enable and disable CMMs

Laurent Pinchart laurent.pinchart at ideasonboard.com
Fri Jun 7 11:51:16 UTC 2019


Hi Jacopo,

Thank you for the patch.

On Thu, Jun 06, 2019 at 04:22:17PM +0200, Jacopo Mondi wrote:
> Enable/disable the CMM associated with a CRTC at
> atomic_enable()/atomic_disable() time.

I would squash this patch with the next 3. It's hard to review them
independently.

> Signed-off-by: Jacopo Mondi <jacopo+renesas at jmondi.org>
> ---
>  drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> index 9f270a54b164..e6d3df37c827 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> @@ -21,6 +21,7 @@
>  #include <drm/drm_plane_helper.h>
>  #include <drm/drm_vblank.h>
>  
> +#include "rcar_cmm.h"
>  #include "rcar_du_crtc.h"
>  #include "rcar_du_drv.h"
>  #include "rcar_du_encoder.h"
> @@ -523,6 +524,7 @@ static int rcar_du_crtc_get(struct rcar_du_crtc *rcrtc)
>  		goto error_group;
>  
>  	rcar_du_crtc_setup(rcrtc);
> +

Unrelated change ?

>  	rcrtc->initialized = true;
>  
>  	return 0;
> @@ -619,6 +621,9 @@ static void rcar_du_crtc_stop(struct rcar_du_crtc *rcrtc)
>  	if (rcar_du_has(rcrtc->dev, RCAR_DU_FEATURE_VSP1_SOURCE))
>  		rcar_du_vsp_disable(rcrtc);
>  
> +	if (rcar_du_has(rcrtc->dev, RCAR_DU_FEATURE_CMM) && rcrtc->cmm)

You can just test rcrtc->cmm. Same below.

> +		rcar_cmm_disable(rcrtc->cmm);
> +
>  	/*
>  	 * Select switch sync mode. This stops display operation and configures
>  	 * the HSYNC and VSYNC signals as inputs.
> @@ -686,6 +691,9 @@ static void rcar_du_crtc_atomic_enable(struct drm_crtc *crtc,
>  	}
>  
>  	rcar_du_crtc_start(rcrtc);
> +
> +	if (rcar_du_has(rcrtc->dev, RCAR_DU_FEATURE_CMM) && rcrtc->cmm)
> +		rcar_cmm_enable(rcrtc->cmm);
>  }
>  
>  static void rcar_du_crtc_atomic_disable(struct drm_crtc *crtc,

-- 
Regards,

Laurent Pinchart


More information about the dri-devel mailing list