From: Tommaso Merciai <tomm.merciai@gmail.com>
To: Liu Ying <victor.liu@nxp.com>
Cc: linux-renesas-soc@vger.kernel.org,
dri-devel@lists.freedesktop.org, biju.das.jz@bp.renesas.com,
Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/bridge: ite-it6263: Support VESA input format
Date: Wed, 4 Dec 2024 11:37:05 +0100 [thread overview]
Message-ID: <Z1Aw0WafGmYDrr8K@tom-desktop> (raw)
In-Reply-To: <834a2690-ca06-4a8b-9a81-c4981074f95c@nxp.com>
Hi Liu Ying,
Thanks for your review.
On Wed, Dec 04, 2024 at 11:34:23AM +0800, Liu Ying wrote:
> On 12/04/2024, tomm.merciai@gmail.com wrote:
> > From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> >
> > Introduce it6263_is_input_bus_fmt_valid() and refactor the
> > it6263_bridge_atomic_get_input_bus_fmts() function to support VESA
> > format by selecting the LVDS input format based on the LVDS data mapping
> > and thereby support both JEIDA and VESA input formats.
>
> ite,it6263.yaml says IT6263 supports vesa-24 and vesa-30, while
> this patch actually only adds vesa-24 support. So, to be more
> specific, the patch subject and commit message should reflect
> this rather than claim "Support VESA input format".
Fully agree, thanks.
I will fix that in v2 specifying vesa-24 like you suggest.
>
> >
> > Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
>
> Can you please send this patch with your Renesas email address
> instead of Gmail email address?
> Otherwise, add a Signed-off-by tag with your Gmail email address.
Thanks, for the point.
What about adding Acked-by: from my renesas email address?
>
> > ---
> > drivers/gpu/drm/bridge/ite-it6263.c | 25 ++++++++++++++++++++++---
> > 1 file changed, 22 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/ite-it6263.c b/drivers/gpu/drm/bridge/ite-it6263.c
> > index cbabd4e20d3e..83d1db29157a 100644
> > --- a/drivers/gpu/drm/bridge/ite-it6263.c
> > +++ b/drivers/gpu/drm/bridge/ite-it6263.c
> > @@ -48,6 +48,7 @@
> > #define REG_COL_DEP GENMASK(1, 0)
> > #define BIT8 FIELD_PREP(REG_COL_DEP, 1)
> > #define OUT_MAP BIT(4)
> > +#define VESA BIT(4)
> > #define JEIDA 0
> > #define REG_DESSC_ENB BIT(6)
> > #define DMODE BIT(7)
> > @@ -428,12 +429,30 @@ static inline void it6263_lvds_reset(struct it6263 *it)
> > fsleep(10000);
> > }
> >
> > +static bool it6263_is_input_bus_fmt_valid(u32 input_fmt)
>
> 1) Inline this small function.
> 2) Change the argument input_fmt type from u32 to int to
> match the type of it->lvds_data_mapping.
Will fix that in v2, thanks :)
>
> static inline bool it6263_is_input_bus_fmt_valid(int input_fmt)
>
> > +{
> > + switch (input_fmt) {
> > + case MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA:
> > + case MEDIA_BUS_FMT_RGB888_1X7X4_SPWG:
> > + return true;
> > + }
> > + return false;
> > +}
> > +
> > static inline void it6263_lvds_set_interface(struct it6263 *it)
> > {
> > + u8 fmt;
> > +
> > /* color depth */
> > regmap_write_bits(it->lvds_regmap, LVDS_REG_2C, REG_COL_DEP, BIT8);
> > +
> > + if (it->lvds_data_mapping == MEDIA_BUS_FMT_RGB888_1X7X4_SPWG)
> > + fmt = VESA;
> > + else
> > + fmt = JEIDA;
> > +
> > /* output mapping */
> > - regmap_write_bits(it->lvds_regmap, LVDS_REG_2C, OUT_MAP, JEIDA);
> > + regmap_write_bits(it->lvds_regmap, LVDS_REG_2C, OUT_MAP, fmt);
> >
> > if (it->lvds_dual_link) {
> > regmap_write_bits(it->lvds_regmap, LVDS_REG_2C, DMODE, DISO);
> > @@ -714,14 +733,14 @@ it6263_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
> >
> > *num_input_fmts = 0;
> >
> > - if (it->lvds_data_mapping != MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA)
> > + if (!it6263_is_input_bus_fmt_valid(it->lvds_data_mapping))
> > return NULL;
> >
> > input_fmts = kmalloc(sizeof(*input_fmts), GFP_KERNEL);
> > if (!input_fmts)
> > return NULL;
> >
> > - input_fmts[0] = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA;
> > + input_fmts[0] = it->lvds_data_mapping;
> > *num_input_fmts = 1;
> >
> > return input_fmts;
>
> --
> Regards,
> Liu Ying
Thanks & Regards,
Tommaso
>
next prev parent reply other threads:[~2024-12-04 10:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 17:21 [PATCH] drm/bridge: ite-it6263: Support VESA input format tomm.merciai
2024-12-03 17:37 ` Dmitry Baryshkov
2024-12-04 3:42 ` Liu Ying
2024-12-04 6:45 ` Biju Das
2024-12-05 9:02 ` Liu Ying
2024-12-05 11:42 ` Dmitry Baryshkov
2024-12-05 12:19 ` Biju Das
2024-12-04 3:34 ` Liu Ying
2024-12-04 6:27 ` Biju Das
2024-12-04 6:47 ` Liu Ying
2024-12-04 10:37 ` Tommaso Merciai [this message]
2024-12-04 11:53 ` Dmitry Baryshkov
2024-12-04 13:11 ` Tommaso Merciai
2024-12-04 13:33 ` Dmitry Baryshkov
2024-12-04 13:36 ` Tommaso Merciai
2024-12-04 8:11 ` 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=Z1Aw0WafGmYDrr8K@tom-desktop \
--to=tomm.merciai@gmail.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=tommaso.merciai.xr@bp.renesas.com \
--cc=tzimmermann@suse.de \
--cc=victor.liu@nxp.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.