diff mbox series

[1/9] drm/panel/panel-sitronix-st7701: Make DSI mode flags common to ST7701

Message ID 20220710194437.289042-1-marex@denx.de (mailing list archive)
State New, archived
Headers show
Series [1/9] drm/panel/panel-sitronix-st7701: Make DSI mode flags common to ST7701 | expand

Commit Message

Marek Vasut July 10, 2022, 7:44 p.m. UTC
The ST7701 and ST7701S are TFT matrix drivers with integrated multi
protocol decoder capable of DSI/DPI/SPI input and 480x360...864 line
TFT matrix output. Currently the only supported input is DSI.

The protocol decoder is separate from the TFT matrix driver and is
always capable of handling all of DSI non-burst mode with sync pulses
or sync events as well as DSI burst mode.

Move the DSI mode configuration from TFT matrix driver properties to
common ST7701 code, because this is common to all TFT matrices.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Guido Günther <agx@sigxcpu.org>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
---
 drivers/gpu/drm/panel/panel-sitronix-st7701.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Linus Walleij July 11, 2022, 1:17 p.m. UTC | #1
On Sun, Jul 10, 2022 at 9:44 PM Marek Vasut <marex@denx.de> wrote:

> The ST7701 and ST7701S are TFT matrix drivers with integrated multi
> protocol decoder capable of DSI/DPI/SPI input and 480x360...864 line
> TFT matrix output. Currently the only supported input is DSI.
>
> The protocol decoder is separate from the TFT matrix driver and is
> always capable of handling all of DSI non-burst mode with sync pulses
> or sync events as well as DSI burst mode.
>
> Move the DSI mode configuration from TFT matrix driver properties to
> common ST7701 code, because this is common to all TFT matrices.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Guido Günther <agx@sigxcpu.org>
> Cc: Jagan Teki <jagan@amarulasolutions.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Thierry Reding <thierry.reding@gmail.com>

All very nice patches
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Tell me if you need me to apply them to drm-misc as well.

Yours,
Linus Walleij
Marek Vasut July 12, 2022, 5:52 p.m. UTC | #2
On 7/11/22 15:17, Linus Walleij wrote:
> On Sun, Jul 10, 2022 at 9:44 PM Marek Vasut <marex@denx.de> wrote:
> 
>> The ST7701 and ST7701S are TFT matrix drivers with integrated multi
>> protocol decoder capable of DSI/DPI/SPI input and 480x360...864 line
>> TFT matrix output. Currently the only supported input is DSI.
>>
>> The protocol decoder is separate from the TFT matrix driver and is
>> always capable of handling all of DSI non-burst mode with sync pulses
>> or sync events as well as DSI burst mode.
>>
>> Move the DSI mode configuration from TFT matrix driver properties to
>> common ST7701 code, because this is common to all TFT matrices.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Guido Günther <agx@sigxcpu.org>
>> Cc: Jagan Teki <jagan@amarulasolutions.com>
>> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Cc: Sam Ravnborg <sam@ravnborg.org>
>> Cc: Thierry Reding <thierry.reding@gmail.com>
> 
> All very nice patches
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> 
> Tell me if you need me to apply them to drm-misc as well.

Sure, thank you.
Linus Walleij July 19, 2022, 8:39 a.m. UTC | #3
On Sun, Jul 10, 2022 at 9:44 PM Marek Vasut <marex@denx.de> wrote:

> The ST7701 and ST7701S are TFT matrix drivers with integrated multi
> protocol decoder capable of DSI/DPI/SPI input and 480x360...864 line
> TFT matrix output. Currently the only supported input is DSI.
>
> The protocol decoder is separate from the TFT matrix driver and is
> always capable of handling all of DSI non-burst mode with sync pulses
> or sync events as well as DSI burst mode.
>
> Move the DSI mode configuration from TFT matrix driver properties to
> common ST7701 code, because this is common to all TFT matrices.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Guido Günther <agx@sigxcpu.org>
> Cc: Jagan Teki <jagan@amarulasolutions.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Thierry Reding <thierry.reding@gmail.com>

All 9 patches applied and pushed for drm-misc-next.

Yours,
Linus Walleij
Marek Vasut July 19, 2022, 12:15 p.m. UTC | #4
On 7/19/22 10:39, Linus Walleij wrote:
> On Sun, Jul 10, 2022 at 9:44 PM Marek Vasut <marex@denx.de> wrote:
> 
>> The ST7701 and ST7701S are TFT matrix drivers with integrated multi
>> protocol decoder capable of DSI/DPI/SPI input and 480x360...864 line
>> TFT matrix output. Currently the only supported input is DSI.
>>
>> The protocol decoder is separate from the TFT matrix driver and is
>> always capable of handling all of DSI non-burst mode with sync pulses
>> or sync events as well as DSI burst mode.
>>
>> Move the DSI mode configuration from TFT matrix driver properties to
>> common ST7701 code, because this is common to all TFT matrices.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Guido Günther <agx@sigxcpu.org>
>> Cc: Jagan Teki <jagan@amarulasolutions.com>
>> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> Cc: Linus Walleij <linus.walleij@linaro.org>
>> Cc: Sam Ravnborg <sam@ravnborg.org>
>> Cc: Thierry Reding <thierry.reding@gmail.com>
> 
> All 9 patches applied and pushed for drm-misc-next.

Nice, and I got cleared to submit another panel support which prompted 
this rework, so that's coming soon.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7701.c b/drivers/gpu/drm/panel/panel-sitronix-st7701.c
index 320a2a8fd459..90b0e90eb6e2 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7701.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7701.c
@@ -89,7 +89,6 @@ 
 struct st7701_panel_desc {
 	const struct drm_display_mode *mode;
 	unsigned int lanes;
-	unsigned long flags;
 	enum mipi_dsi_pixel_format format;
 	const char *const *supply_names;
 	unsigned int num_supplies;
@@ -318,7 +317,6 @@  static const char * const ts8550b_supply_names[] = {
 static const struct st7701_panel_desc ts8550b_desc = {
 	.mode = &ts8550b_mode,
 	.lanes = 2,
-	.flags = MIPI_DSI_MODE_VIDEO,
 	.format = MIPI_DSI_FMT_RGB888,
 	.supply_names = ts8550b_supply_names,
 	.num_supplies = ARRAY_SIZE(ts8550b_supply_names),
@@ -336,7 +334,7 @@  static int st7701_dsi_probe(struct mipi_dsi_device *dsi)
 		return -ENOMEM;
 
 	desc = of_device_get_match_data(&dsi->dev);
-	dsi->mode_flags = desc->flags;
+	dsi->mode_flags = MIPI_DSI_MODE_VIDEO;
 	dsi->format = desc->format;
 	dsi->lanes = desc->lanes;