mbox series

[0/6] omapdrm: drm_bridge and drm_panel support

Message ID 20181210010623.3233-1-laurent.pinchart@ideasonboard.com (mailing list archive)
Headers show
Series omapdrm: drm_bridge and drm_panel support | expand

Message

Laurent Pinchart Dec. 10, 2018, 1:06 a.m. UTC
Hello everybody,

This patch series hooks up support for drm_bridge and drm_panel in the omapdrm
driver.

Before anyone rejoices too fast, I have to warn that removal of the omapdrm
internal display drivers will still require a significant effort, even without
considering DSI:

- The omapdrm internal display drivers need to be ported to drm_bridge and
  drm_panel. This is the easy part of remaining transition, with 6 non-trivial
  panels, 2 simple bridges, and 2 connectors.

- Several OMAP-based system split tasks associated with connectors across
  multiple hardware components. For instance an HDMI can have modes retrieval
  (from EDID) implemented by the HDMI encoder bridge, while hot-plug detection
  is implemented through a signal of the HDMI companion chip connected to a
  GPIO of the SoC. The drm_bridge infrastructure doesn't support this, and
  will need to be extended.

- DRM doesn't have connector drivers to handle the connector DT nodes. While
  connectors are mostly passive components, the DDC and HPD signals can be
  wired directly from the connector to the SoC, in which case they're
  described in connector DT node. Several bridge drivers look up the DDC bus
  from the linked connector DT node, but this is a layering violation and
  should be implemented properly using connector drivers.

These limitations aside, the series still removes three omapdrm-specific
drivers.

The series start with adding support for the OSD070T1718-19TS panel to the
panel-simple driver (1/6). The panel is used by the AM57xx EVM. The
corresponding DT node contains panel timings, and I still believe that we
should parse those timings instead of hardcoding them in C code, but I've set
that issue aside for now to move forward.

The next two patches hook up support for drm_bridge (2/6) and drm_panel (3/6)
in the omapdrm driver. This is the bulk of the changes from this series,
please refer to individual patches for more information.

The next patch (4/6) then adds a whitelist mechanism to control addition of
the "omapdss," prefix to the compatible string of the omapdrm encoders, panels
and connectors. This is used to selectively switch components from the
omap_dss_device framework to drm_panel and drm_bridge.

Finally the last two patches remove the omapdrm-specific TFP410 encoder and
DVI connector drivers (5/6) and DPI panel driver (6/6), replaced
respectively by the ti-tftp410 drm_bridge driver and the panel-simple
drm_panel driver.

The series is based on the "[PATCH 0/5] drm: ti-tfp410 improvements" series,
itself based on top of the "[PATCH v2 0/2] Clarify display info PIXDATA bus
flags" series. For convenience I have pushed the result to

	git://linuxtv.org/pinchartl/media.git omapdrm/bridge/next

All patches have been tested on the OMAP3 Beagleboard-xM (for TFP410), the
OMAP4 Pandaboard (for regressions) and the AM57xx EVM (for the panel).

Laurent Pinchart (6):
  drm/panel: simple: Add OSD070T1718-19TS panel support
  drm/omap: Add support for drm_bridge
  drm/omap: Add support for drm_panel
  drm/omap: Whitelist DT nodes to fixup with omapdss, prefix
  drm/omap: Remove TFP410 and DVI connector drivers
  drm/omap: Remove panel-dpi driver

 drivers/gpu/drm/omapdrm/displays/Kconfig      |  17 -
 drivers/gpu/drm/omapdrm/displays/Makefile     |   3 -
 .../gpu/drm/omapdrm/displays/connector-dvi.c  | 292 ------------------
 .../gpu/drm/omapdrm/displays/encoder-tfp410.c | 141 ---------
 drivers/gpu/drm/omapdrm/displays/panel-dpi.c  | 197 ------------
 drivers/gpu/drm/omapdrm/dss/base.c            |  49 ++-
 .../gpu/drm/omapdrm/dss/omapdss-boot-init.c   |  18 +-
 drivers/gpu/drm/omapdrm/dss/omapdss.h         |   2 +
 drivers/gpu/drm/omapdrm/dss/output.c          |  26 +-
 drivers/gpu/drm/omapdrm/omap_connector.c      |  25 +-
 drivers/gpu/drm/omapdrm/omap_connector.h      |   1 -
 drivers/gpu/drm/omapdrm/omap_crtc.c           |   2 +-
 drivers/gpu/drm/omapdrm/omap_drv.c            |  82 +++--
 drivers/gpu/drm/omapdrm/omap_encoder.c        | 109 ++++---
 drivers/gpu/drm/panel/panel-simple.c          |  29 ++
 15 files changed, 260 insertions(+), 733 deletions(-)
 delete mode 100644 drivers/gpu/drm/omapdrm/displays/connector-dvi.c
 delete mode 100644 drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
 delete mode 100644 drivers/gpu/drm/omapdrm/displays/panel-dpi.c

Comments

Sebastian Reichel Dec. 20, 2018, 12:17 p.m. UTC | #1
Hi,

On Mon, Dec 10, 2018 at 03:06:17AM +0200, Laurent Pinchart wrote:
> This patch series hooks up support for drm_bridge and drm_panel in the omapdrm
> driver.
>
> [...]

The series is

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>

At the same time it is tested to break display on Droid 4. I don't
know the exact reason yet. Debugging this is annoyingly hard, since
the patches for manual display update still have not been merged
making the testing process cumbersome.

-- Sebastian
Tomi Valkeinen Dec. 20, 2018, 12:49 p.m. UTC | #2
Hi,

On 20/12/18 14:17, Sebastian Reichel wrote:
> Hi,
> 
> On Mon, Dec 10, 2018 at 03:06:17AM +0200, Laurent Pinchart wrote:
>> This patch series hooks up support for drm_bridge and drm_panel in the omapdrm
>> driver.
>>
>> [...]
> 
> The series is
> 
> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> 
> At the same time it is tested to break display on Droid 4. I don't
> know the exact reason yet. Debugging this is annoyingly hard, since
> the patches for manual display update still have not been merged
> making the testing process cumbersome.

I found a few issues while trying to get a DSI video mode panel working.
Attached WIP patches.

 Tomi
Laurent Pinchart Jan. 11, 2019, 1:34 a.m. UTC | #3
Hi Sebastian,

On Thursday, 20 December 2018 14:17:27 EET Sebastian Reichel wrote:
> Hi,
> 
> On Mon, Dec 10, 2018 at 03:06:17AM +0200, Laurent Pinchart wrote:
> > This patch series hooks up support for drm_bridge and drm_panel in the
> > omapdrm driver.
> > 
> > [...]
> 
> The series is
> 
> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> 
> At the same time it is tested to break display on Droid 4. I don't
> know the exact reason yet. Debugging this is annoyingly hard, since
> the patches for manual display update still have not been merged
> making the testing process cumbersome.

Is it this series that breaks display on Droid 4, or was it broken already ? 
I've pushed all pending omapdrm patches to

	git://linuxtv.org/pinchartl/media.git omapdrm/bridge/next

with the three fixes from Tomi at the bottom of the branch, and this series at 
the top.

I think the omapdrm/dss drivers are now in a shape that can let us consider 
upstreaming DSI support. The real challenge will be to do so in a way 
compatible with drm_bridge and drm_panel.
Sebastian Reichel Feb. 9, 2019, 12:05 p.m. UTC | #4
Hi,

On Fri, Jan 11, 2019 at 03:34:19AM +0200, Laurent Pinchart wrote:
> Hi Sebastian,
> 
> On Thursday, 20 December 2018 14:17:27 EET Sebastian Reichel wrote:
> > Hi,
> > 
> > On Mon, Dec 10, 2018 at 03:06:17AM +0200, Laurent Pinchart wrote:
> > > This patch series hooks up support for drm_bridge and drm_panel in the
> > > omapdrm driver.
> > > 
> > > [...]
> > 
> > The series is
> > 
> > Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> > 
> > At the same time it is tested to break display on Droid 4. I don't
> > know the exact reason yet. Debugging this is annoyingly hard, since
> > the patches for manual display update still have not been merged
> > making the testing process cumbersome.
> 
> Is it this series that breaks display on Droid 4, or was it broken already ? 
> I've pushed all pending omapdrm patches to
> 
> 	git://linuxtv.org/pinchartl/media.git omapdrm/bridge/next
> 
> with the three fixes from Tomi at the bottom of the branch, and this series at 
> the top.
> 
> I think the omapdrm/dss drivers are now in a shape that can let us consider 
> upstreaming DSI support. The real challenge will be to do so in a way 
> compatible with drm_bridge and drm_panel.

The main issue was the removal of pipe->display in this patchset.
I suggest to remove the entry to avoid accidental usage.

-- Sebastian
Laurent Pinchart Feb. 11, 2019, 7:46 a.m. UTC | #5
Hi Sebastian,

On Sat, Feb 09, 2019 at 01:05:14PM +0100, Sebastian Reichel wrote:
> On Fri, Jan 11, 2019 at 03:34:19AM +0200, Laurent Pinchart wrote:
> > On Thursday, 20 December 2018 14:17:27 EET Sebastian Reichel wrote:
> >> On Mon, Dec 10, 2018 at 03:06:17AM +0200, Laurent Pinchart wrote:
> >>> This patch series hooks up support for drm_bridge and drm_panel in the
> >>> omapdrm driver.
> >>> 
> >>> [...]
> >> 
> >> The series is
> >> 
> >> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> >> 
> >> At the same time it is tested to break display on Droid 4. I don't
> >> know the exact reason yet. Debugging this is annoyingly hard, since
> >> the patches for manual display update still have not been merged
> >> making the testing process cumbersome.
> > 
> > Is it this series that breaks display on Droid 4, or was it broken already ? 
> > I've pushed all pending omapdrm patches to
> > 
> > 	git://linuxtv.org/pinchartl/media.git omapdrm/bridge/next
> > 
> > with the three fixes from Tomi at the bottom of the branch, and this series at 
> > the top.
> > 
> > I think the omapdrm/dss drivers are now in a shape that can let us consider 
> > upstreaming DSI support. The real challenge will be to do so in a way 
> > compatible with drm_bridge and drm_panel.
> 
> The main issue was the removal of pipe->display in this patchset.
> I suggest to remove the entry to avoid accidental usage.

Very good point. New patch on its way.