dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	dri-devel@lists.freedesktop.org
Cc: linux-renesas-soc@vger.kernel.org,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Subject: Re: [PATCH 4/4] drm: rcar-du: kms: Configure the CLU
Date: Mon, 21 Dec 2020 14:13:57 +0000	[thread overview]
Message-ID: <6da58b9e-02e8-b77d-deff-8257924604fb@ideasonboard.com> (raw)
In-Reply-To: <20201221015730.28333-5-laurent.pinchart+renesas@ideasonboard.com>

Hi Laurent,

On 21/12/2020 01:57, Laurent Pinchart wrote:
> From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> 
> Link the DRM 3D-CLU configuration to the CMM setup configuration.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

And for the updates from my original patch (variable rename, and
property blob rework, and that ... obvious bug ... from my patch that's
now obviously gone :-D ...)

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> ---
>  drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 23 ++++++++++++++++++-----
>  1 file changed, 18 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> index 426b1870b3cb..5c77017084ed 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
> @@ -484,19 +484,23 @@ static int rcar_du_cmm_check(struct drm_crtc *crtc,
>  			     struct drm_crtc_state *state)
>  {
>  	struct drm_property_blob *drm_lut = state->gamma_lut;
> +	struct drm_property_blob *drm_clu = state->cubic_lut;
>  	struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc);
>  	struct device *dev = rcrtc->dev->dev;
>  
> -	if (!drm_lut)
> -		return 0;
> -
> -	/* We only accept fully populated LUT tables. */
> -	if (drm_color_lut_size(drm_lut) != CM2_LUT_SIZE) {
> +	/* We only accept fully populated LUTs. */
> +	if (drm_lut && drm_color_lut_size(drm_lut) != CM2_LUT_SIZE) {
>  		dev_err(dev, "invalid gamma lut size: %zu bytes\n",
>  			drm_lut->length);
>  		return -EINVAL;
>  	}
>  
> +	if (drm_clu && drm_color_lut_size(drm_clu) != CM2_CLU_SIZE) {
> +		dev_err(dev, "invalid cubic lut size: %zu bytes\n",
> +			drm_clu->length);
> +		return -EINVAL;
> +	}
> +
>  	return 0;
>  }
>  
> @@ -518,6 +522,15 @@ static void rcar_du_cmm_setup(struct rcar_du_crtc *rcrtc,
>  				     ? new_state->gamma_lut->data : NULL;
>  	}
>  
> +	if (!old_state ||
> +	    !old_state->cubic_lut != !new_state->cubic_lut ||
> +	    (old_state->cubic_lut && new_state->cubic_lut &&
> +	     old_state->cubic_lut->base.id != new_state->cubic_lut->base.id)) {
> +		cmm_config.clu.update = true;
> +		cmm_config.clu.table = new_state->cubic_lut
> +				     ? new_state->cubic_lut->data : NULL;
> +	}
> +
>  	rcar_cmm_setup(rcrtc->cmm, &cmm_config);
>  }
>  
> 

-- 
Regards
--
Kieran
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-12-21 14:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21  1:57 [PATCH 0/4] drm: rcar-du: Add cubic LUT support Laurent Pinchart
2020-12-21  1:57 ` [PATCH 1/4] drm: rcar-du: cmm: Refactor LUT configuration Laurent Pinchart
2020-12-21 13:55   ` Kieran Bingham
2020-12-21  1:57 ` [PATCH 2/4] drm: rcar-du: cmm: Provide 3D-CLU support Laurent Pinchart
2020-12-21 14:00   ` Kieran Bingham
2020-12-21  1:57 ` [PATCH 3/4] drm: Extend color correction to support 3D-CLU Laurent Pinchart
2020-12-21 14:09   ` Kieran Bingham
2020-12-22  8:00     ` Laurent Pinchart
2020-12-21 18:36   ` Daniel Vetter
2020-12-21 18:38     ` Laurent Pinchart
2020-12-21 21:59       ` Daniel Vetter
2021-01-12 16:06   ` Ville Syrjälä
2021-01-26  9:34   ` Sandy Huang
2021-01-26  9:53   ` Sandy Huang
2020-12-21  1:57 ` [PATCH 4/4] drm: rcar-du: kms: Configure the CLU Laurent Pinchart
2020-12-21 14:13   ` Kieran Bingham [this message]
2020-12-21  8:53 ` [PATCH 0/4] drm: rcar-du: Add cubic LUT support Simon Ser
2021-01-12 11:50 ` Pekka Paalanen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6da58b9e-02e8-b77d-deff-8257924604fb@ideasonboard.com \
    --to=kieran.bingham@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).