mbox series

[v1,0/6] drm: add a few simple panels

Message ID 20200601083309.712606-1-sam@ravnborg.org
Headers show
Series drm: add a few simple panels | expand

Message

Sam Ravnborg June 1, 2020, 8:33 a.m. UTC
Push a few patches that has been sitting in my tree for
far too long time.
Adds a few more panels to panel-simple, including
documentation of the compatible.

I have added the last few people that added new
panels to panel-simple to the cc list,
in the hope to speed up the review process a little.

	Sam

Sam Ravnborg (6):
      dt-bindings: panel: add Seiko 70WVW2T 7" panel
      drm: panel-simple: add Seiko 70WVW2T 7" simple panel
      dt-bindings: panel: add Hitachi 3,5" QVGA panel
      drm: panel-simple: add Hitachi 3.5" QVGA panel
      dt-bindings: panel: add LOGIC Technologies panels
      drm: panel-simple: add LOGIC Technologies panels

 .../bindings/display/panel/panel-simple.yaml       |   8 ++
 drivers/gpu/drm/panel/panel-simple.c               | 127 +++++++++++++++++++++
 2 files changed, 135 insertions(+)

Comments

Doug Anderson June 2, 2020, 12:30 a.m. UTC | #1
Hi,

On Mon, Jun 1, 2020 at 1:33 AM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> +static const struct drm_display_mode logictechno_lttd800480070_l6wh_rt_mode = {
> +       .clock = 33000,
> +       .hdisplay = 800,
> +       .hsync_start = 800 + 154,
> +       .hsync_end = 800 + 154 + 3,
> +       .htotal = 800 + 154 + 3 + 43,
> +       .vdisplay = 480,
> +       .vsync_start = 480 + 47,
> +       .vsync_end = 480 + 47 + 3,
> +       .vtotal = 480 + 47 + 3 + 20,
> +       .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,

This is different than the "typ" mode from the random spreadsheet I
found on the internet:

https://logictechno.com/wp-content/uploads/2016/11/LTTD800480070-L6WH-RT-v1.1.pdf

As per my other comments, I wonder how important "vrefresh" is and if
we should include it.


-Doug
Doug Anderson June 2, 2020, 12:30 a.m. UTC | #2
Hi,

On Mon, Jun 1, 2020 at 1:33 AM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> This panel is used on evaluation boards for Atmel at91sam9261 and
> at91sam6263.
>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> ---
>  drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index 8624bb80108c..25c96639631f 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -1813,6 +1813,32 @@ static const struct panel_desc hannstar_hsd100pxn1 = {
>         .connector_type = DRM_MODE_CONNECTOR_LVDS,
>  };
>
> +static const struct drm_display_mode hitachi_tx09d71vm1cca_mode = {
> +       .clock = 4965000,

This is the pixel clock in kHz, right?  So it runs at almost 5 Terahertz?


> +       .hdisplay = 240,
> +       .hsync_start = 240 + 0,
> +       .hsync_end = 240 + 0 + 5,
> +       .htotal = 240 + 0 + 5 + 1,
> +       .vdisplay = 320,
> +       .vsync_start = 320 + 0,
> +       .vsync_end = 320 + 0 + 1,
> +       .vtotal = 320 + 0 + 1 + 1,

Some random datasheet I found has really different numbers.  If the
numbers above are what everyone is using then I suppose it's fine,
just curious why the mismatch.

Also: should you provide "vrefresh"?



-Doug
Doug Anderson June 2, 2020, 12:31 a.m. UTC | #3
Hi,

On Mon, Jun 1, 2020 at 1:33 AM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> The Seiko 70WVW2T is a discontinued product, but may be used somewhere.
> Tested on a proprietary product.
>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Søren Andersen <san@skov.dk>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> ---
>  drivers/gpu/drm/panel/panel-simple.c | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index b067f66cea0e..8624bb80108c 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -3194,6 +3194,31 @@ static const struct panel_desc shelly_sca07010_bfn_lnn = {
>         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
>  };
>
> +static const struct drm_display_mode sii_70wvw2t_mode = {
> +       .clock = 33000,
> +       .hdisplay = 800,
> +       .hsync_start = 800 + 256,
> +       .hsync_end = 800 + 256 + 0,
> +       .htotal = 800 + 256 + 0 + 0,
> +       .vdisplay = 480,
> +       .vsync_start = 480 + 0,
> +       .vsync_end = 480 + 0 + 0,
> +       .vtotal = 480 + 0 + 0 + 45,

Important to have a "vrefresh"?


> +       .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
> +};
> +
> +static const struct panel_desc sii_70wvw2t = {
> +       .modes = &sii_70wvw2t_mode,
> +       .num_modes = 1,

Do we want "bpc = 6"?


> +       .size = {
> +               .width = 152,
> +               .height = 91,
> +       },
> +       .bus_format = MEDIA_BUS_FMT_RGB888_1X24,

Should this be a 666 format?  Random internet-found data sheet says
262K colors...
Emil Velikov June 2, 2020, 2:55 p.m. UTC | #4
On Tue, 2 Jun 2020 at 01:31, Doug Anderson <dianders@chromium.org> wrote:
>
> Hi,
>
> On Mon, Jun 1, 2020 at 1:33 AM Sam Ravnborg <sam@ravnborg.org> wrote:
> >
> > The Seiko 70WVW2T is a discontinued product, but may be used somewhere.
> > Tested on a proprietary product.
> >
> > Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> > Cc: Søren Andersen <san@skov.dk>
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Cc: Sam Ravnborg <sam@ravnborg.org>
> > ---
> >  drivers/gpu/drm/panel/panel-simple.c | 28 ++++++++++++++++++++++++++++
> >  1 file changed, 28 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> > index b067f66cea0e..8624bb80108c 100644
> > --- a/drivers/gpu/drm/panel/panel-simple.c
> > +++ b/drivers/gpu/drm/panel/panel-simple.c
> > @@ -3194,6 +3194,31 @@ static const struct panel_desc shelly_sca07010_bfn_lnn = {
> >         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
> >  };
> >
> > +static const struct drm_display_mode sii_70wvw2t_mode = {
> > +       .clock = 33000,
> > +       .hdisplay = 800,
> > +       .hsync_start = 800 + 256,
> > +       .hsync_end = 800 + 256 + 0,
> > +       .htotal = 800 + 256 + 0 + 0,
> > +       .vdisplay = 480,
> > +       .vsync_start = 480 + 0,
> > +       .vsync_end = 480 + 0 + 0,
> > +       .vtotal = 480 + 0 + 0 + 45,
>
> Important to have a "vrefresh"?
>
Ville posted a series (most of which already landed) getting removing
vrefresh all together. The overall idea is to compute it, in the rare
case it's needed.


>
> > +       .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
> > +};
> > +
> > +static const struct panel_desc sii_70wvw2t = {
> > +       .modes = &sii_70wvw2t_mode,
> > +       .num_modes = 1,
>
> Do we want "bpc = 6"?
>
The largest user of bpc is userspace - the data gets copied via the ioctls.

A secondary, and quite limited, user are drivers exposing the "max
bpc" connector property. From a quick look: amdgpu, the synopsys
dw-hdmi bridge and i915 do so. In case the data missing, atomics
assume a max 8 bpc.

>
> > +       .size = {
> > +               .width = 152,
> > +               .height = 91,
> > +       },
> > +       .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
>
> Should this be a 666 format?  Random internet-found data sheet says
> 262K colors...

Good catch. Would be nice to have a spec sheet link (even if random)
in the commit message.

HTH
-Emil
Sam Ravnborg June 5, 2020, 5 p.m. UTC | #5
Hi Doug.

On Mon, Jun 01, 2020 at 05:31:06PM -0700, Doug Anderson wrote:
> Hi,
> 
> On Mon, Jun 1, 2020 at 1:33 AM Sam Ravnborg <sam@ravnborg.org> wrote:
> >
> > The Seiko 70WVW2T is a discontinued product, but may be used somewhere.
> > Tested on a proprietary product.
> >
> > Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> > Cc: Søren Andersen <san@skov.dk>
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Cc: Sam Ravnborg <sam@ravnborg.org>
> > ---
> >  drivers/gpu/drm/panel/panel-simple.c | 28 ++++++++++++++++++++++++++++
> >  1 file changed, 28 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> > index b067f66cea0e..8624bb80108c 100644
> > --- a/drivers/gpu/drm/panel/panel-simple.c
> > +++ b/drivers/gpu/drm/panel/panel-simple.c
> > @@ -3194,6 +3194,31 @@ static const struct panel_desc shelly_sca07010_bfn_lnn = {
> >         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
> >  };
> >
> > +static const struct drm_display_mode sii_70wvw2t_mode = {
> > +       .clock = 33000,
> > +       .hdisplay = 800,
> > +       .hsync_start = 800 + 256,
> > +       .hsync_end = 800 + 256 + 0,
> > +       .htotal = 800 + 256 + 0 + 0,
> > +       .vdisplay = 480,
> > +       .vsync_start = 480 + 0,
> > +       .vsync_end = 480 + 0 + 0,
> > +       .vtotal = 480 + 0 + 0 + 45,
> 
> Important to have a "vrefresh"?
> 
> 
> > +       .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
> > +};
> > +
> > +static const struct panel_desc sii_70wvw2t = {
> > +       .modes = &sii_70wvw2t_mode,
> > +       .num_modes = 1,
> 
> Do we want "bpc = 6"?
> 
> 
> > +       .size = {
> > +               .width = 152,
> > +               .height = 91,
> > +       },
> > +       .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
> 
> Should this be a 666 format?  Random internet-found data sheet says
> 262K colors...

Thanks for catching this!
You are indeed right, this is MEDIA_BUS_FMT_RGB666_1X18 and only bpc = 6.
My bad excuse is that other displays for the same HW is RGB888 and bpc = 8.

Will fix and repost.

	Sam
Sam Ravnborg June 5, 2020, 5:19 p.m. UTC | #6
Hi Doug.

On Mon, Jun 01, 2020 at 05:30:53PM -0700, Doug Anderson wrote:
> Hi,
> 
> On Mon, Jun 1, 2020 at 1:33 AM Sam Ravnborg <sam@ravnborg.org> wrote:
> >
> > This panel is used on evaluation boards for Atmel at91sam9261 and
> > at91sam6263.
> >
> > Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Cc: Sam Ravnborg <sam@ravnborg.org>
> > ---
> >  drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++
> >  1 file changed, 29 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> > index 8624bb80108c..25c96639631f 100644
> > --- a/drivers/gpu/drm/panel/panel-simple.c
> > +++ b/drivers/gpu/drm/panel/panel-simple.c
> > @@ -1813,6 +1813,32 @@ static const struct panel_desc hannstar_hsd100pxn1 = {
> >         .connector_type = DRM_MODE_CONNECTOR_LVDS,
> >  };
> >
> > +static const struct drm_display_mode hitachi_tx09d71vm1cca_mode = {
> > +       .clock = 4965000,
> 
> This is the pixel clock in kHz, right?  So it runs at almost 5 Terahertz?
> 
> 
> > +       .hdisplay = 240,
> > +       .hsync_start = 240 + 0,
> > +       .hsync_end = 240 + 0 + 5,
> > +       .htotal = 240 + 0 + 5 + 1,
> > +       .vdisplay = 320,
> > +       .vsync_start = 320 + 0,
> > +       .vsync_end = 320 + 0 + 1,
> > +       .vtotal = 320 + 0 + 1 + 1,
> 
> Some random datasheet I found has really different numbers.  If the
> numbers above are what everyone is using then I suppose it's fine,
> just curious why the mismatch.

The timing comes from:
arch/arm/boot/dts/at91sam9263ek.dts - that include display timings for
the panel on the evaluation board.
I did not verify any datasheet - I just blindly copied what was there.
And clock was obviously not properly adjusted to khz.

Will fix in v2 - will also try to find a datasheet this time.

Thanks for noticing!

	Sam