All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: marex@denx.de, tomm.merciai@gmail.com, linux@armlinux.org.uk,
	dri-devel@lists.freedesktop.org, pbrobinson@gmail.com
Subject: Re: [PATCH 2/2] drm/i2c/tda998x: Implement atomic_get_input_bus_fmts
Date: Mon, 3 Jan 2022 13:47:17 +0200	[thread overview]
Message-ID: <YdLiRXwpE57ryV4d@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20211231013930.139754-2-festevam@gmail.com>

Hi Fabio,

Thank you for the patch.

On Thu, Dec 30, 2021 at 10:39:30PM -0300, Fabio Estevam wrote:
> Implement the .atomic_get_input_bus_fmts callback to let the bridge
> indicate the pixel format it requires on the parallel bus to the LCDIF.
> 
> Based on Marek's commit db8b7ca5b232 ("drm/bridge: ti-sn65dsi83: Replace
> connector format patching with atomic_get_input_bus_fmts").
> 
> Tested on a imx6sx-udoo-neo board.
> 
> Suggested-by: Marek Vasut <marex@denx.de>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
>  drivers/gpu/drm/i2c/tda998x_drv.c | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
> index adaa985af87e..d987481e97c1 100644
> --- a/drivers/gpu/drm/i2c/tda998x_drv.c
> +++ b/drivers/gpu/drm/i2c/tda998x_drv.c
> @@ -1678,6 +1678,31 @@ static void tda998x_bridge_mode_set(struct drm_bridge *bridge,
>  	mutex_unlock(&priv->audio_mutex);
>  }
>  
> +#define MAX_INPUT_SEL_FORMATS  1
> +
> +static u32 *
> +tda998x_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
> +				   struct drm_bridge_state *bridge_state,
> +				   struct drm_crtc_state *crtc_state,
> +				   struct drm_connector_state *conn_state,
> +				   u32 output_fmt,
> +				   unsigned int *num_input_fmts)
> +{
> +	u32 *input_fmts;
> +
> +	*num_input_fmts = 0;
> +
> +	input_fmts = kcalloc(MAX_INPUT_SEL_FORMATS, sizeof(*input_fmts),
> +			     GFP_KERNEL);
> +	if (!input_fmts)
> +		return NULL;
> +
> +	input_fmts[0] = MEDIA_BUS_FMT_RGB888_1X24;
> +	*num_input_fmts = 1;
> +
> +	return input_fmts;
> +}
> +
>  static const struct drm_bridge_funcs tda998x_bridge_funcs = {
>  	.attach = tda998x_bridge_attach,
>  	.detach = tda998x_bridge_detach,
> @@ -1685,6 +1710,10 @@ static const struct drm_bridge_funcs tda998x_bridge_funcs = {
>  	.atomic_disable = tda998x_bridge_atomic_disable,
>  	.mode_set = tda998x_bridge_mode_set,
>  	.atomic_enable = tda998x_bridge_atomic_enable,
> +	.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
> +	.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
> +	.atomic_reset = drm_atomic_helper_bridge_reset,

I think this should go to 1/2.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> +	.atomic_get_input_bus_fmts = tda998x_atomic_get_input_bus_fmts,
>  };
>  
>  /* I2C driver functions */

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2022-01-03 11:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-31  1:39 [PATCH 1/2] drm/i2c/tda998x: Switch to atomic operations Fabio Estevam
2021-12-31  1:39 ` [PATCH 2/2] drm/i2c/tda998x: Implement atomic_get_input_bus_fmts Fabio Estevam
2022-01-03 11:47   ` Laurent Pinchart [this message]
2022-01-03 11:48 ` [PATCH 1/2] drm/i2c/tda998x: Switch to atomic operations Laurent Pinchart
2022-01-03 12:35   ` Fabio Estevam
2022-01-08 19:16     ` Tommaso Merciai
2022-01-09 18:44       ` Fabio Estevam
2022-01-11 20:21         ` Tommaso Merciai
2022-01-15 23:23           ` Tommaso Merciai
2022-01-16 13:27             ` Fabio Estevam
2022-01-16 16:28               ` Tommaso Merciai

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=YdLiRXwpE57ryV4d@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=festevam@gmail.com \
    --cc=linux@armlinux.org.uk \
    --cc=marex@denx.de \
    --cc=pbrobinson@gmail.com \
    --cc=tomm.merciai@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.