* [PATCH v2] drm/bridge: ite-it6263: Support VESA-24 input format
@ 2024-12-05 8:02 tomm.merciai
2024-12-05 8:54 ` Liu Ying
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: tomm.merciai @ 2024-12-05 8:02 UTC (permalink / raw)
To: tomm.merciai
Cc: linux-renesas-soc, dri-devel, biju.das.jz, Tommaso Merciai,
Dmitry Baryshkov, Liu Ying, Andrzej Hajda, Neil Armstrong,
Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, linux-kernel
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-24
format by selecting the LVDS input format based on the LVDS data mapping
and thereby support both JEIDA-24 and VESA-24 input formats.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
---
Changes since v1:
- Inline it6263_is_input_bus_fmt_valid() as suggested by LYing
- Fixed it6263_is_input_bus_fmt_valid() param from u32 to int as suggested by LYing
- Fixed commit msg as suggested by LYing
- Fixed commit body as suggested by LYing
- Collected DBaryshkov tag
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..3fc5c6795487 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 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;
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/bridge: ite-it6263: Support VESA-24 input format
2024-12-05 8:02 [PATCH v2] drm/bridge: ite-it6263: Support VESA-24 input format tomm.merciai
@ 2024-12-05 8:54 ` Liu Ying
2024-12-05 19:37 ` Dmitry Baryshkov
2024-12-09 17:20 ` Biju Das
2024-12-10 10:47 ` Dmitry Baryshkov
2 siblings, 1 reply; 5+ messages in thread
From: Liu Ying @ 2024-12-05 8:54 UTC (permalink / raw)
To: tomm.merciai
Cc: linux-renesas-soc, dri-devel, biju.das.jz, Tommaso Merciai,
Dmitry Baryshkov, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, linux-kernel
On 12/05/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-24
> format by selecting the LVDS input format based on the LVDS data mapping
> and thereby support both JEIDA-24 and VESA-24 input formats.
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> ---
> Changes since v1:
> - Inline it6263_is_input_bus_fmt_valid() as suggested by LYing
> - Fixed it6263_is_input_bus_fmt_valid() param from u32 to int as suggested by LYing
> - Fixed commit msg as suggested by LYing
> - Fixed commit body as suggested by LYing
> - Collected DBaryshkov tag
>
> drivers/gpu/drm/bridge/ite-it6263.c | 25 ++++++++++++++++++++++---
> 1 file changed, 22 insertions(+), 3 deletions(-)
Reviewed-by: Liu Ying <victor.liu@nxp.com>
Since I have no drm-misc push right, Neil, Robert, Laurent or
Dmitry, can you help push this? Ofc, no rush. It's fine to wait
for a period of time for potential comments.
--
Regards,
Liu Ying
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/bridge: ite-it6263: Support VESA-24 input format
2024-12-05 8:54 ` Liu Ying
@ 2024-12-05 19:37 ` Dmitry Baryshkov
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2024-12-05 19:37 UTC (permalink / raw)
To: Liu Ying
Cc: tomm.merciai, linux-renesas-soc, dri-devel, biju.das.jz,
Tommaso Merciai, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, linux-kernel
On Thu, Dec 05, 2024 at 04:54:09PM +0800, Liu Ying wrote:
> On 12/05/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-24
> > format by selecting the LVDS input format based on the LVDS data mapping
> > and thereby support both JEIDA-24 and VESA-24 input formats.
> >
> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> > ---
> > Changes since v1:
> > - Inline it6263_is_input_bus_fmt_valid() as suggested by LYing
> > - Fixed it6263_is_input_bus_fmt_valid() param from u32 to int as suggested by LYing
> > - Fixed commit msg as suggested by LYing
> > - Fixed commit body as suggested by LYing
> > - Collected DBaryshkov tag
> >
> > drivers/gpu/drm/bridge/ite-it6263.c | 25 ++++++++++++++++++++++---
> > 1 file changed, 22 insertions(+), 3 deletions(-)
>
> Reviewed-by: Liu Ying <victor.liu@nxp.com>
>
> Since I have no drm-misc push right, Neil, Robert, Laurent or
> Dmitry, can you help push this? Ofc, no rush. It's fine to wait
> for a period of time for potential comments.
I'll wait for a few days and apply the patch if nobody else beats me on
it.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v2] drm/bridge: ite-it6263: Support VESA-24 input format
2024-12-05 8:02 [PATCH v2] drm/bridge: ite-it6263: Support VESA-24 input format tomm.merciai
2024-12-05 8:54 ` Liu Ying
@ 2024-12-09 17:20 ` Biju Das
2024-12-10 10:47 ` Dmitry Baryshkov
2 siblings, 0 replies; 5+ messages in thread
From: Biju Das @ 2024-12-09 17:20 UTC (permalink / raw)
To: tomm.merciai
Cc: linux-renesas-soc, dri-devel, Tommaso Merciai, Dmitry Baryshkov,
Liu Ying, Andrzej Hajda, Neil Armstrong, Robert Foss,
laurent.pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, linux-kernel
Hi Tommaso Merciai,
> -----Original Message-----
> From: tomm.merciai@gmail.com <tomm.merciai@gmail.com>
> Sent: 05 December 2024 08:02
> Subject: [PATCH v2] drm/bridge: ite-it6263: Support VESA-24 input format
>
> 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-24 format by selecting the LVDS
> input format based on the LVDS data mapping and thereby support both JEIDA-24 and VESA-24 input
> formats.
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Cheers,
Biju
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/bridge: ite-it6263: Support VESA-24 input format
2024-12-05 8:02 [PATCH v2] drm/bridge: ite-it6263: Support VESA-24 input format tomm.merciai
2024-12-05 8:54 ` Liu Ying
2024-12-09 17:20 ` Biju Das
@ 2024-12-10 10:47 ` Dmitry Baryshkov
2 siblings, 0 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2024-12-10 10:47 UTC (permalink / raw)
To: tomm.merciai
Cc: linux-renesas-soc, dri-devel, biju.das.jz, Tommaso Merciai,
Liu Ying, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, linux-kernel
On Thu, 05 Dec 2024 09:02:10 +0100, tomm.merciai@gmail.com wrote:
> Introduce it6263_is_input_bus_fmt_valid() and refactor the
> it6263_bridge_atomic_get_input_bus_fmts() function to support VESA-24
> format by selecting the LVDS input format based on the LVDS data mapping
> and thereby support both JEIDA-24 and VESA-24 input formats.
>
>
Applied to drm-misc-next, thanks!
[1/1] drm/bridge: ite-it6263: Support VESA-24 input format
commit: 919b1458ccfd33ead891fa4ad1e1d06016f5a20c
Best regards,
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-10 10:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-05 8:02 [PATCH v2] drm/bridge: ite-it6263: Support VESA-24 input format tomm.merciai
2024-12-05 8:54 ` Liu Ying
2024-12-05 19:37 ` Dmitry Baryshkov
2024-12-09 17:20 ` Biju Das
2024-12-10 10:47 ` Dmitry Baryshkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®