[PATCH v2 0/4] drm/panel: Extend panels to report their types

Laurent Pinchart laurent.pinchart at ideasonboard.com
Fri Aug 23 19:32:41 UTC 2019


Hello,

This series is the second version of a previously unnamed series that
contained

[PATCH 1/2] drm/panel: Add and fill drm_panel type field
[PATCH 2/2] drm/bridge: panel: Use drm_panel.type instead of explicit connector_type

The purpose of the change is to allow panels to report their type, in
order to create drm_connector instances with appropriate types in the
upper layers.

Patch 1/4 fixes two panel drivers to add missing drm_panel_init() calls.
Patch 2/4 then refactors the panel drivers to initialise the dev and
funcs field through the drm_panel_init() function instead of doing so
manually.

In patch 3/4 the drm_panel structure receives a new connector_type field
to report its type, set through drm_panel_init(), and all connector
drivers are updated accordingly. The panel-simple driver however only
reports the LVDS connector type for known-to-be-LVDS panels, while all
other leave the field initialised to 0, corresponding to
DRM_MODE_CONNECTOR_Unknown. Panels supported by that driver will need to
be reviewed one by one and their type updated. This was done to avoid
reporting an incorrect type, allowing upper layers to catch
DRM_MODE_CONNECTOR_Unknown and WARN() to trigger an update of the
corresponding panel.

Patch 4/4 finally modifies drm_panel_bridge_add() and its devm_
counterpart to replace the connector type argument with the type
reported by the panel. This can't unfortunately be forced upon all
drivers as several of them hardcode a DRM_MODE_CONNECTOR_Unknown type,
and would then change the connector type reported to userspace, leading
to possible breakages. A new function, drm_panel_bridge_add_typed(), is
added with the existing behaviour of drm_panel_bridge_add() to create a
panel bridge with a forced connector type, and drivers are switched to
using that function. They should then be switched back one by one to
drm_panel_bridge_add() after careful review (and clever handling of the
connector type change issue). The drm_panel_bridge_add_typed() function
is marked as deprecated and should not be used in new code.

The patches are available at

	git://linuxtv.org/pinchartl/media.git omapdrm/panels

Laurent Pinchart (4):
  drm/panel: Add missing drm_panel_init() in panel drivers
  drm/panel: Initialise panel dev and funcs through drm_panel_init()
  drm/panel: Add and fill drm_panel type field
  drm/bridge: panel: Infer connector type from panel by default

 .../gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c  |  3 +-
 drivers/gpu/drm/bridge/cdns-dsi.c             |  3 +-
 drivers/gpu/drm/bridge/lvds-encoder.c         |  3 +-
 drivers/gpu/drm/bridge/panel.c                | 69 ++++++++++++++++---
 drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c |  3 +-
 drivers/gpu/drm/drm_panel.c                   | 14 +++-
 drivers/gpu/drm/ingenic/ingenic-drm.c         |  4 +-
 drivers/gpu/drm/mcde/mcde_dsi.c               |  4 +-
 drivers/gpu/drm/panel/panel-arm-versatile.c   |  5 +-
 .../drm/panel/panel-feiyang-fy07024di26a30d.c |  5 +-
 drivers/gpu/drm/panel/panel-ilitek-ili9322.c  |  5 +-
 drivers/gpu/drm/panel/panel-ilitek-ili9881c.c |  5 +-
 drivers/gpu/drm/panel/panel-innolux-p079zca.c |  5 +-
 .../gpu/drm/panel/panel-jdi-lt070me05000.c    |  5 +-
 .../drm/panel/panel-kingdisplay-kd097d04.c    |  5 +-
 drivers/gpu/drm/panel/panel-lg-lb035q02.c     |  5 +-
 drivers/gpu/drm/panel/panel-lg-lg4573.c       |  5 +-
 drivers/gpu/drm/panel/panel-lvds.c            |  5 +-
 drivers/gpu/drm/panel/panel-nec-nl8048hl11.c  |  5 +-
 drivers/gpu/drm/panel/panel-novatek-nt39016.c |  5 +-
 .../drm/panel/panel-olimex-lcd-olinuxino.c    |  5 +-
 .../gpu/drm/panel/panel-orisetech-otm8009a.c  |  5 +-
 .../drm/panel/panel-osd-osd101t2587-53ts.c    |  5 +-
 .../drm/panel/panel-panasonic-vvx10f034n00.c  |  5 +-
 .../drm/panel/panel-raspberrypi-touchscreen.c |  4 +-
 drivers/gpu/drm/panel/panel-raydium-rm67191.c |  5 +-
 drivers/gpu/drm/panel/panel-raydium-rm68200.c |  5 +-
 .../drm/panel/panel-rocktech-jh057n00900.c    |  5 +-
 drivers/gpu/drm/panel/panel-ronbo-rb070d30.c  |  5 +-
 drivers/gpu/drm/panel/panel-samsung-ld9040.c  |  5 +-
 drivers/gpu/drm/panel/panel-samsung-s6d16d0.c |  5 +-
 drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c |  5 +-
 .../gpu/drm/panel/panel-samsung-s6e63j0x03.c  |  5 +-
 drivers/gpu/drm/panel/panel-samsung-s6e63m0.c |  5 +-
 drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c |  5 +-
 drivers/gpu/drm/panel/panel-seiko-43wvf1g.c   |  5 +-
 .../gpu/drm/panel/panel-sharp-lq101r1sx01.c   |  5 +-
 .../gpu/drm/panel/panel-sharp-ls037v7dw01.c   |  5 +-
 .../gpu/drm/panel/panel-sharp-ls043t1le01.c   |  5 +-
 drivers/gpu/drm/panel/panel-simple.c          | 28 +++++++-
 drivers/gpu/drm/panel/panel-sitronix-st7701.c |  5 +-
 .../gpu/drm/panel/panel-sitronix-st7789v.c    |  4 +-
 drivers/gpu/drm/panel/panel-sony-acx565akm.c  |  5 +-
 drivers/gpu/drm/panel/panel-tpo-td028ttec1.c  |  5 +-
 drivers/gpu/drm/panel/panel-tpo-td043mtea1.c  |  5 +-
 drivers/gpu/drm/panel/panel-tpo-tpg110.c      |  5 +-
 drivers/gpu/drm/panel/panel-truly-nt35597.c   |  5 +-
 drivers/gpu/drm/pl111/pl111_drv.c             |  4 +-
 drivers/gpu/drm/rcar-du/rcar_du_encoder.c     |  4 +-
 drivers/gpu/drm/rockchip/rockchip_rgb.c       |  3 +-
 drivers/gpu/drm/stm/ltdc.c                    |  4 +-
 drivers/gpu/drm/tilcdc/tilcdc_external.c      |  4 +-
 drivers/gpu/drm/tve200/tve200_drv.c           |  4 +-
 drivers/gpu/drm/vc4/vc4_dpi.c                 |  3 +-
 drivers/gpu/drm/vc4/vc4_dsi.c                 |  4 +-
 include/drm/drm_bridge.h                      | 11 +--
 include/drm/drm_panel.h                       | 13 +++-
 57 files changed, 217 insertions(+), 156 deletions(-)

-- 
Regards,

Laurent Pinchart



More information about the dri-devel mailing list