mbox series

[RFC,0/4] drm/mipi-dbi: Support panel drivers

Message ID 20190729195526.13337-1-noralf@tronnes.org (mailing list archive)
Headers show
Series drm/mipi-dbi: Support panel drivers | expand

Message

Noralf Trønnes July 29, 2019, 7:55 p.m. UTC
Inspired by the thread[1] following the submission of a new ili9341
panel driver[2], I set out to see if I could support panel drivers in
drm_mipi_dbi.

I have included the original driver, done some prep work on it, added
panel support to drm_mipi_dbi and converted mi0283qt to this new panel
driver.

The big question is whether or not panel drivers should be allowed to
turn themselves into full fledged DRM drivers.

Noralf.

[1]
https://lists.freedesktop.org/archives/dri-devel/2019-July/228193.html
[2] https://patchwork.freedesktop.org/patch/316528/

Josef Lusticky (1):
  drm/panel: Add Ilitek ILI9341 parallel RGB panel driver

Noralf Trønnes (3):
  drm/panel/ili9341: Rebase and some more
  drm/mipi-dbi: Support command mode panel drivers
  drm/panel/ili9341: Support mi0283qt

 MAINTAINERS                                  |   6 +
 drivers/gpu/drm/drm_mipi_dbi.c               | 110 +++++
 drivers/gpu/drm/panel/Kconfig                |   9 +
 drivers/gpu/drm/panel/Makefile               |   1 +
 drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 452 +++++++++++++++++++
 include/drm/drm_mipi_dbi.h                   |   8 +
 6 files changed, 586 insertions(+)
 create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c

Comments

Josef Luštický July 30, 2019, 6:40 a.m. UTC | #1
Hi Noralf,
the patch series looks good, see comments in the patch emails.

One question: is there a general mechanism to tell a driver not to use
parallel RGB even though
the display supports it and "port" is specified in the device-tree?

Josef

po 29. 7. 2019 v 21:55 odesílatel Noralf Trønnes <noralf@tronnes.org> napsal:
>
> Inspired by the thread[1] following the submission of a new ili9341
> panel driver[2], I set out to see if I could support panel drivers in
> drm_mipi_dbi.
>
> I have included the original driver, done some prep work on it, added
> panel support to drm_mipi_dbi and converted mi0283qt to this new panel
> driver.
>
> The big question is whether or not panel drivers should be allowed to
> turn themselves into full fledged DRM drivers.
>
> Noralf.
>
> [1]
> https://lists.freedesktop.org/archives/dri-devel/2019-July/228193.html
> [2] https://patchwork.freedesktop.org/patch/316528/
>
> Josef Lusticky (1):
>   drm/panel: Add Ilitek ILI9341 parallel RGB panel driver
>
> Noralf Trønnes (3):
>   drm/panel/ili9341: Rebase and some more
>   drm/mipi-dbi: Support command mode panel drivers
>   drm/panel/ili9341: Support mi0283qt
>
>  MAINTAINERS                                  |   6 +
>  drivers/gpu/drm/drm_mipi_dbi.c               | 110 +++++
>  drivers/gpu/drm/panel/Kconfig                |   9 +
>  drivers/gpu/drm/panel/Makefile               |   1 +
>  drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 452 +++++++++++++++++++
>  include/drm/drm_mipi_dbi.h                   |   8 +
>  6 files changed, 586 insertions(+)
>  create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c
>
> --
> 2.20.1
>
Noralf Trønnes July 30, 2019, 2:08 p.m. UTC | #2
Den 30.07.2019 08.40, skrev Josef Luštický:
> Hi Noralf,
> the patch series looks good, see comments in the patch emails.
> 
> One question: is there a general mechanism to tell a driver not to use
> parallel RGB even though
> the display supports it and "port" is specified in the device-tree?
> 

Not that I know of. It was just one difference that stood out which
would make it easy to have the same panel driver support both DPI and
DBI pixel mode.

Since your panel has a ili9341 I assmue it has onboard RAM? So you
should be able to drive your display in both modes I guess.

Noralf.

> Josef
> 
> po 29. 7. 2019 v 21:55 odesílatel Noralf Trønnes <noralf@tronnes.org> napsal:
>>
>> Inspired by the thread[1] following the submission of a new ili9341
>> panel driver[2], I set out to see if I could support panel drivers in
>> drm_mipi_dbi.
>>
>> I have included the original driver, done some prep work on it, added
>> panel support to drm_mipi_dbi and converted mi0283qt to this new panel
>> driver.
>>
>> The big question is whether or not panel drivers should be allowed to
>> turn themselves into full fledged DRM drivers.
>>
>> Noralf.
>>
>> [1]
>> https://lists.freedesktop.org/archives/dri-devel/2019-July/228193.html
>> [2] https://patchwork.freedesktop.org/patch/316528/
>>
>> Josef Lusticky (1):
>>   drm/panel: Add Ilitek ILI9341 parallel RGB panel driver
>>
>> Noralf Trønnes (3):
>>   drm/panel/ili9341: Rebase and some more
>>   drm/mipi-dbi: Support command mode panel drivers
>>   drm/panel/ili9341: Support mi0283qt
>>
>>  MAINTAINERS                                  |   6 +
>>  drivers/gpu/drm/drm_mipi_dbi.c               | 110 +++++
>>  drivers/gpu/drm/panel/Kconfig                |   9 +
>>  drivers/gpu/drm/panel/Makefile               |   1 +
>>  drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 452 +++++++++++++++++++
>>  include/drm/drm_mipi_dbi.h                   |   8 +
>>  6 files changed, 586 insertions(+)
>>  create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c
>>
>> --
>> 2.20.1
>>
>
Josef Luštický July 30, 2019, 2:27 p.m. UTC | #3
Yes, the onboard RAM is ili9341 feature.
I am able to drive the DisplayTech DT024CTFT panel in both modes.

I've just tested the DisplayTech DT024CTFT panel with your patchset
and it works fine with parallel RGB input mode:
compatible = "displaytech,dt024ctft", "ilitek,ili9341";
and with SPI input mode:
compatible = "mi,mi0283qt", "ilitek,ili9341";

However, there seems to be an issue when i use
compatible = "displaytech,dt024ctft", "ilitek,ili9341";
but no port property.
This is caused by calling dt024ctft_prepare in such case.

I would expected the driver to fallback to SPI input mode in such case.
In other words, the ili9341-based panels can be used in both modes,
but not all displays available
on the market provide breakout pins for the parallel RGB connection.

út 30. 7. 2019 v 16:08 odesílatel Noralf Trønnes <noralf@tronnes.org> napsal:
>
>
>
> Den 30.07.2019 08.40, skrev Josef Luštický:
> > Hi Noralf,
> > the patch series looks good, see comments in the patch emails.
> >
> > One question: is there a general mechanism to tell a driver not to use
> > parallel RGB even though
> > the display supports it and "port" is specified in the device-tree?
> >
>
> Not that I know of. It was just one difference that stood out which
> would make it easy to have the same panel driver support both DPI and
> DBI pixel mode.
>
> Since your panel has a ili9341 I assmue it has onboard RAM? So you
> should be able to drive your display in both modes I guess.
>
> Noralf.
>
> > Josef
> >
> > po 29. 7. 2019 v 21:55 odesílatel Noralf Trønnes <noralf@tronnes.org> napsal:
> >>
> >> Inspired by the thread[1] following the submission of a new ili9341
> >> panel driver[2], I set out to see if I could support panel drivers in
> >> drm_mipi_dbi.
> >>
> >> I have included the original driver, done some prep work on it, added
> >> panel support to drm_mipi_dbi and converted mi0283qt to this new panel
> >> driver.
> >>
> >> The big question is whether or not panel drivers should be allowed to
> >> turn themselves into full fledged DRM drivers.
> >>
> >> Noralf.
> >>
> >> [1]
> >> https://lists.freedesktop.org/archives/dri-devel/2019-July/228193.html
> >> [2] https://patchwork.freedesktop.org/patch/316528/
> >>
> >> Josef Lusticky (1):
> >>   drm/panel: Add Ilitek ILI9341 parallel RGB panel driver
> >>
> >> Noralf Trønnes (3):
> >>   drm/panel/ili9341: Rebase and some more
> >>   drm/mipi-dbi: Support command mode panel drivers
> >>   drm/panel/ili9341: Support mi0283qt
> >>
> >>  MAINTAINERS                                  |   6 +
> >>  drivers/gpu/drm/drm_mipi_dbi.c               | 110 +++++
> >>  drivers/gpu/drm/panel/Kconfig                |   9 +
> >>  drivers/gpu/drm/panel/Makefile               |   1 +
> >>  drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 452 +++++++++++++++++++
> >>  include/drm/drm_mipi_dbi.h                   |   8 +
> >>  6 files changed, 586 insertions(+)
> >>  create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c
> >>
> >> --
> >> 2.20.1
> >>
> >
Noralf Trønnes July 30, 2019, 2:51 p.m. UTC | #4
Please reply inline instead of top-posting.

Den 30.07.2019 16.27, skrev Josef Luštický:
> Yes, the onboard RAM is ili9341 feature.
> I am able to drive the DisplayTech DT024CTFT panel in both modes.
> 
> I've just tested the DisplayTech DT024CTFT panel with your patchset
> and it works fine with parallel RGB input mode:
> compatible = "displaytech,dt024ctft", "ilitek,ili9341";
> and with SPI input mode:
> compatible = "mi,mi0283qt", "ilitek,ili9341";
> 
> However, there seems to be an issue when i use
> compatible = "displaytech,dt024ctft", "ilitek,ili9341";
> but no port property.
> This is caused by calling dt024ctft_prepare in such case.
> 
> I would expected the driver to fallback to SPI input mode in such case.
> In other words, the ili9341-based panels can be used in both modes,
> but not all displays available
> on the market provide breakout pins for the parallel RGB connection.
> 

You need to support both modes in dt024ctft_prepare and apply the
appropriate controller setup for the chosen pixel interface. The setup
is panel specific and interface specific.

Unless your panel is specced the exact same way as the mi0283qt panel,
then the dt024ctft panel will have different power pump setup, gamma
curve etc. So each panel needs its own prepare function. Some panels
even have commands in their setup that isn't listed in the controller
datasheet, ie. they have a custom controller for their display. Some
even pretend to be one controller, but reading the register contents,
it's doubtful that this is true and it's more likely to be a clone.

Noralf.

> út 30. 7. 2019 v 16:08 odesílatel Noralf Trønnes <noralf@tronnes.org> napsal:
>>
>>
>>
>> Den 30.07.2019 08.40, skrev Josef Luštický:
>>> Hi Noralf,
>>> the patch series looks good, see comments in the patch emails.
>>>
>>> One question: is there a general mechanism to tell a driver not to use
>>> parallel RGB even though
>>> the display supports it and "port" is specified in the device-tree?
>>>
>>
>> Not that I know of. It was just one difference that stood out which
>> would make it easy to have the same panel driver support both DPI and
>> DBI pixel mode.
>>
>> Since your panel has a ili9341 I assmue it has onboard RAM? So you
>> should be able to drive your display in both modes I guess.
>>
>> Noralf.
>>
>>> Josef
>>>
>>> po 29. 7. 2019 v 21:55 odesílatel Noralf Trønnes <noralf@tronnes.org> napsal:
>>>>
>>>> Inspired by the thread[1] following the submission of a new ili9341
>>>> panel driver[2], I set out to see if I could support panel drivers in
>>>> drm_mipi_dbi.
>>>>
>>>> I have included the original driver, done some prep work on it, added
>>>> panel support to drm_mipi_dbi and converted mi0283qt to this new panel
>>>> driver.
>>>>
>>>> The big question is whether or not panel drivers should be allowed to
>>>> turn themselves into full fledged DRM drivers.
>>>>
>>>> Noralf.
>>>>
>>>> [1]
>>>> https://lists.freedesktop.org/archives/dri-devel/2019-July/228193.html
>>>> [2] https://patchwork.freedesktop.org/patch/316528/
>>>>
>>>> Josef Lusticky (1):
>>>>   drm/panel: Add Ilitek ILI9341 parallel RGB panel driver
>>>>
>>>> Noralf Trønnes (3):
>>>>   drm/panel/ili9341: Rebase and some more
>>>>   drm/mipi-dbi: Support command mode panel drivers
>>>>   drm/panel/ili9341: Support mi0283qt
>>>>
>>>>  MAINTAINERS                                  |   6 +
>>>>  drivers/gpu/drm/drm_mipi_dbi.c               | 110 +++++
>>>>  drivers/gpu/drm/panel/Kconfig                |   9 +
>>>>  drivers/gpu/drm/panel/Makefile               |   1 +
>>>>  drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 452 +++++++++++++++++++
>>>>  include/drm/drm_mipi_dbi.h                   |   8 +
>>>>  6 files changed, 586 insertions(+)
>>>>  create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c
>>>>
>>>> --
>>>> 2.20.1
>>>>
>>>
>