Re: [PATCH v1 1/2] drm/panel: simple: add Multi-Innotechnology MI1010AIT-1CP1

2021-08-05 Thread Oleksij Rempel
On Thu, Aug 05, 2021 at 07:52:24AM +0200, Ahmad Fatoum wrote:
> Hello Oleksij,
> 
> On 05.08.21 06:37, Oleksij Rempel wrote:
> > From: Sam Ravnborg 
> > 
> > The Multi Innotechnology is a 10.1" 1280x800 panel.
> > 
> > The datasheet did not specify specific values for sync, back, front porch.
> > The values are a best guess based on values for similar panels.
> > 
> > Co-Developed-by: Sam Ravnborg 
> > Co-Developed-by: Ulrich Ölmann 
> > Signed-off-by: Sam Ravnborg 
> > Signed-off-by: Ulrich Ölmann 
> > Signed-off-by: Oleksij Rempel 
> > ---
> >  drivers/gpu/drm/panel/panel-simple.c | 34 
> >  1 file changed, 34 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/panel/panel-simple.c 
> > b/drivers/gpu/drm/panel/panel-simple.c
> > index 21939d4352cf..fda79a986d12 100644
> > --- a/drivers/gpu/drm/panel/panel-simple.c
> > +++ b/drivers/gpu/drm/panel/panel-simple.c
> > @@ -3033,6 +3033,37 @@ static const struct panel_desc mitsubishi_aa070mc01 
> > = {
> > .bus_flags = DRM_BUS_FLAG_DE_HIGH,
> >  };
> >  
> > +static const struct display_timing multi_inno_mi1010ait_1cp_timing = {
> > +   .pixelclock = { 6890, 7000, 7340 },
> > +   .hactive = { 1280, 1280, 1280 },
> > +   .hfront_porch = { 30, 60, 71 },
> > +   .hback_porch = { 30, 60, 71 },
> > +   .hsync_len = { 10, 10, 48 },
> > +   .vactive = { 800, 800, 800 },
> > +   .vfront_porch = { 5, 10, 10 },
> > +   .vback_porch = { 5, 10, 10 },
> > +   .vsync_len = { 5, 6, 13 },
> > +   .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
> > +DISPLAY_FLAGS_DE_HIGH,
> > +};
> 
> Here you specify DISPLAY_FLAGS_DE_HIGH.
> 
> > +
> > +static const struct panel_desc multi_inno_mi1010ait_1cp = {
> > +   .timings = _inno_mi1010ait_1cp_timing,
> > +   .num_timings = 1,
> > +   .bpc = 8,
> > +   .size = {
> > +   .width = 217,
> > +   .height = 136,
> > +   },
> > +   .delay = {
> > +   .enable = 50,
> > +   .disable = 50,
> > +   },
> > +   .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
> > +   .bus_flags = DRM_BUS_FLAG_DE_HIGH,
> 
> And here DRM_BUS_FLAG_DE_HIGH. I see that some other panels do this too
> and some only specify one of them. Do you know if they are redundant
> or one of them is ignored?

Hmm... there is a drm_bus_flags_from_videomode():
if (vm->flags & DISPLAY_FLAGS_DE_HIGH)
*bus_flags |= DRM_BUS_FLAG_DE_HIGH;


It looks like for DPI panel it would be set automatically. This
function is not execute in case of LVDS panel.

Regards,
Oleksij
-- 
Pengutronix e.K.   | |
Steuerwalder Str. 21   | http://www.pengutronix.de/  |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |


Re: [PATCH v1 1/2] drm/panel: simple: add Multi-Innotechnology MI1010AIT-1CP1

2021-08-05 Thread Ahmad Fatoum
Hello Oleksij,

On 05.08.21 06:37, Oleksij Rempel wrote:
> From: Sam Ravnborg 
> 
> The Multi Innotechnology is a 10.1" 1280x800 panel.
> 
> The datasheet did not specify specific values for sync, back, front porch.
> The values are a best guess based on values for similar panels.
> 
> Co-Developed-by: Sam Ravnborg 
> Co-Developed-by: Ulrich Ölmann 
> Signed-off-by: Sam Ravnborg 
> Signed-off-by: Ulrich Ölmann 
> Signed-off-by: Oleksij Rempel 
> ---
>  drivers/gpu/drm/panel/panel-simple.c | 34 
>  1 file changed, 34 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-simple.c 
> b/drivers/gpu/drm/panel/panel-simple.c
> index 21939d4352cf..fda79a986d12 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -3033,6 +3033,37 @@ static const struct panel_desc mitsubishi_aa070mc01 = {
>   .bus_flags = DRM_BUS_FLAG_DE_HIGH,
>  };
>  
> +static const struct display_timing multi_inno_mi1010ait_1cp_timing = {
> + .pixelclock = { 6890, 7000, 7340 },
> + .hactive = { 1280, 1280, 1280 },
> + .hfront_porch = { 30, 60, 71 },
> + .hback_porch = { 30, 60, 71 },
> + .hsync_len = { 10, 10, 48 },
> + .vactive = { 800, 800, 800 },
> + .vfront_porch = { 5, 10, 10 },
> + .vback_porch = { 5, 10, 10 },
> + .vsync_len = { 5, 6, 13 },
> + .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
> +  DISPLAY_FLAGS_DE_HIGH,
> +};

Here you specify DISPLAY_FLAGS_DE_HIGH.

> +
> +static const struct panel_desc multi_inno_mi1010ait_1cp = {
> + .timings = _inno_mi1010ait_1cp_timing,
> + .num_timings = 1,
> + .bpc = 8,
> + .size = {
> + .width = 217,
> + .height = 136,
> + },
> + .delay = {
> + .enable = 50,
> + .disable = 50,
> + },
> + .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
> + .bus_flags = DRM_BUS_FLAG_DE_HIGH,

And here DRM_BUS_FLAG_DE_HIGH. I see that some other panels do this too
and some only specify one of them. Do you know if they are redundant
or one of them is ignored?

Cheers,
Ahmad

> + .connector_type = DRM_MODE_CONNECTOR_LVDS,
> +};
> +
>  static const struct display_timing nec_nl12880bc20_05_timing = {
>   .pixelclock = { 6700, 7100, 7500 },
>   .hactive = { 1280, 1280, 1280 },
> @@ -4464,6 +4495,9 @@ static const struct of_device_id platform_of_match[] = {
>   }, {
>   .compatible = "mitsubishi,aa070mc01-ca1",
>   .data = _aa070mc01,
> + }, {
> + .compatible = "multi-inno,mi1010ait-1cp",
> + .data = _inno_mi1010ait_1cp,
>   }, {
>   .compatible = "nec,nl12880bc20-05",
>   .data = _nl12880bc20_05,
> 


-- 
Pengutronix e.K.   | |
Steuerwalder Str. 21   | http://www.pengutronix.de/  |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |


[PATCH v1 1/2] drm/panel: simple: add Multi-Innotechnology MI1010AIT-1CP1

2021-08-04 Thread Oleksij Rempel
From: Sam Ravnborg 

The Multi Innotechnology is a 10.1" 1280x800 panel.

The datasheet did not specify specific values for sync, back, front porch.
The values are a best guess based on values for similar panels.

Co-Developed-by: Sam Ravnborg 
Co-Developed-by: Ulrich Ölmann 
Signed-off-by: Sam Ravnborg 
Signed-off-by: Ulrich Ölmann 
Signed-off-by: Oleksij Rempel 
---
 drivers/gpu/drm/panel/panel-simple.c | 34 
 1 file changed, 34 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c 
b/drivers/gpu/drm/panel/panel-simple.c
index 21939d4352cf..fda79a986d12 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -3033,6 +3033,37 @@ static const struct panel_desc mitsubishi_aa070mc01 = {
.bus_flags = DRM_BUS_FLAG_DE_HIGH,
 };
 
+static const struct display_timing multi_inno_mi1010ait_1cp_timing = {
+   .pixelclock = { 6890, 7000, 7340 },
+   .hactive = { 1280, 1280, 1280 },
+   .hfront_porch = { 30, 60, 71 },
+   .hback_porch = { 30, 60, 71 },
+   .hsync_len = { 10, 10, 48 },
+   .vactive = { 800, 800, 800 },
+   .vfront_porch = { 5, 10, 10 },
+   .vback_porch = { 5, 10, 10 },
+   .vsync_len = { 5, 6, 13 },
+   .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
+DISPLAY_FLAGS_DE_HIGH,
+};
+
+static const struct panel_desc multi_inno_mi1010ait_1cp = {
+   .timings = _inno_mi1010ait_1cp_timing,
+   .num_timings = 1,
+   .bpc = 8,
+   .size = {
+   .width = 217,
+   .height = 136,
+   },
+   .delay = {
+   .enable = 50,
+   .disable = 50,
+   },
+   .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
+   .bus_flags = DRM_BUS_FLAG_DE_HIGH,
+   .connector_type = DRM_MODE_CONNECTOR_LVDS,
+};
+
 static const struct display_timing nec_nl12880bc20_05_timing = {
.pixelclock = { 6700, 7100, 7500 },
.hactive = { 1280, 1280, 1280 },
@@ -4464,6 +4495,9 @@ static const struct of_device_id platform_of_match[] = {
}, {
.compatible = "mitsubishi,aa070mc01-ca1",
.data = _aa070mc01,
+   }, {
+   .compatible = "multi-inno,mi1010ait-1cp",
+   .data = _inno_mi1010ait_1cp,
}, {
.compatible = "nec,nl12880bc20-05",
.data = _nl12880bc20_05,
-- 
2.30.2