mbox series

[v2,00/50] drm/omap: Replace custom display drivers with drm_bridge and drm_panel

Message ID 20190820011721.30136-1-laurent.pinchart@ideasonboard.com (mailing list archive)
Headers show
Series drm/omap: Replace custom display drivers with drm_bridge and drm_panel | expand

Message

Laurent Pinchart Aug. 20, 2019, 1:16 a.m. UTC
Hello,

This patch series (nearly, see [1]) completes the rework of the omapdrm
driver to move to drm_bridge and drm_panel.

Let's start with some context (copied from v1) to understand the
problem. omapdrm contains custom drivers for external encoders, panels
and connectors (collectively referred to as display drivers). It
combines them to create output pipelines abstracted by a drm_encoder and
a drm_connector, with the ability to delegate the encoder and connector
operations to the component in the pipeline that implements them. For
instance, for an HDMI output pipeline, the hot plug detection and the
EDID read can be implemented by two different components, when they are
handled by two different devices at the hardware level.

DRM/KMS uses drm_bridge and drm_panel to abstract external encoders and
panels. The model is however simpler than what omapdrm provides, as
bridges were designed to be simple add-ons at the output of a
drm_encoder. The ability to chain bridges exists, but a bridge driver
hardcodes in its design its position in the pipeline : bridges that
expect to terminate the pipeline create a drm_connector, while bridges
that expect to be an intermediate component in the pipeline do not
create a connector. In addition to not supporting bridges that can be
either internal or a termination point in the pipeline depending on the
hardware design, implementing the drm_connector inside a bridge driver
makes it impossible to support hardware where bridge operations are
handled by different hardware components, as explained above.

The omapdrm driver has received support for drm_bridge and drm_panel,
but these issues prevented completely moving away from the omapdrm
custom display drivers. This patch series thus first reworks the
drm_bridge infrastructure to support the omapdrm use cases, and then
transitions the omapdrm driver.

The series starts with a small drive-by cleanup (01/50), followed by a
new helper (02/50) that leverages data from drm_connector.c to convert a
connector type to a string. Patch 03/50 then adds a new flag to the
drm_display_info structure to identify HDMI sinks. This is a feature
needed by the OMAP4 and OMAP5 HDMI encoders, and I believe it can be
useful to other HDMI encoders as well.

The next two patches address the drm_bridge issues explained above.
Patch 04/50 adds connector-related operations to drm_bridge, and patch
05/50 makes it possible to attach to a bridge without having the bridge
create a connector. The connector is expected to be created by the
display controller driver.

The approach taken here is slightly intrusive as path 05/50 adds a
parameter to the bridge .attach() operation, and thus touches all bridge
drivers, even if the changes are very simple (as a consequence I haven't
CC'ed all the individual bridge maintainers as the CC list was too
large). Other options may be possible, what matters most to me is the
feature, not so much its implementation. Please note that compared to v1
this version uses a flag bitmask instead of a boolean on Andrzej's
request, as he expects the parameter to be useful for other purposes.

The first sizeable change follows with the rename of the dumb-vga-dac
driver to simple-bridge (06/50 and 07/50) and support for non-VGA
bridges (08/50). This doesn't change the spirit of the driver that still
focusses on transparent bridges, but prepares it to support an analog
video amplifier. Patches 09/50 then add support for an enable GPIO, and
10/50 support for the OPA362 video amplifier itself.

The next six patches make use of these new features: patches 11/50 and
12/50 add new bridge drivers for display connectors and for the TI
TPD12S015 HDMI level shifter respectively, patch 13/50 supports the new
API in the panel bridge driver, and patches 15/50 to 16/50 do the same
in the ti-tfp410 driver.

Patch 17/50 is possibly the most remarkable one in the series, with the
drm_bridge operations extension, as it provides a helper for display
controller drivers to construct a drm_connector entirerly backed by a
chain of bridges. This offsets the complexity of the additional bridge
operations by handling it all in a single place. An example usage for
omapdrm can be found in patch 34/50. Don't let its diffstat mislead you,
usage of the helper would remove lots of code if it wasn't for the fact
that the legacy implementation still has to be kept for the DSI panel
(see [1]). Down the road this helper and the new operation paradigm
should remove code from both display controller and bridge drivers.

The rest of the series is omapdrm-focussed, slowly preparing the driver
for the switch to drm_bridge drivers using the new helper (34/50), the
removal of the omapdrm-specific display drivers (35/50), and lots of
simplification and code removal in the other patches.

Compared to v1, many review comments have been taken into account, please
see individual patches for details. Please note that some issues are
still being discussed and have thus not been addressed yet. This
includes HPD handling and removal of the drm_connector argument from the
drm_bridge .get_edid() operation.

The patches can be found at

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

[1] The only notable exception is the omapdrm-specific DSI panel driver
that implements a large number of custom operations. This should be
addressed separately.

Laurent Pinchart (50):
  video: hdmi: Change return type of hdmi_avi_infoframe_init() to void
  drm/connector: Add helper to get a connector type name
  drm/edid: Add flag to drm_display_info to identify HDMI sinks
  drm/bridge: Add connector-related bridge operations and data
  drm/bridge: Extend bridge API to disable connector creation
  drm/bridge: dumb-vga-dac: Rename internal symbols to simple-bridge
  drm/bridge: dumb-vga-dac: Rename driver to simple-bridge
  drm/bridge: simple-bridge: Add support for non-VGA bridges
  drm/bridge: simple-bridge: Add support for enable GPIO
  drm/bridge: simple-bridge: Add support for the TI OP362
  drm/bridge: Add bridge driver for display connectors
  drm/bridge: Add driver for the TI TPD12S015 HDMI level shifter
  drm/bridge: panel: Implement bridge connector operations
  drm/bridge: tfp410: Don't include drmP.h
  drm/bridge: tfp410: Replace manual connector handling with bridge
  drm/bridge: tfp410: Allow operation without drm_connector
  drm: Add helper to create a connector for a chain of bridges
  drm/omap: Simplify HDMI mode and infoframe configuration
  drm/omap: Factor out display type to connector type conversion
  drm/omap: Use the drm_panel_bridge API
  drm/omap: dss: Fix output next device lookup in DT
  drm/omap: Add infrastructure to support drm_bridge local to DSS
    outputs
  drm/omap: dss: Make omap_dss_device_ops optional
  drm/omap: hdmi: Allocate EDID in the .read_edid() operation
  drm/omap: hdmi4: Rework EDID read to isolate data read
  drm/omap: hdmi5: Rework EDID read to isolate data read
  drm/omap: hdmi4: Register a drm_bridge for EDID read
  drm/omap: hdmi5: Register a drm_bridge for EDID read
  drm/omap: hdmi4: Move mode set, enable and disable operations to
    bridge
  drm/omap: hdmi5: Move mode set, enable and disable operations to
    bridge
  drm/omap: hdmi4: Implement drm_bridge .hpd_notify() operation
  drm/omap: dss: Remove .set_hdmi_mode() and .set_infoframe() operations
  drm/omap: venc: Register a drm_bridge
  drm/omap: Create connector for bridges
  drm/omap: Switch the HDMI and VENC outputs to drm_bridge
  drm/omap: Remove HPD, detect and EDID omapdss operations
  drm/omap: hdmi: Remove omap_dss_device operations
  drm/omap: venc: Remove omap_dss_device operations
  drm/omap: hdmi4: Simplify EDID read
  drm/omap: hdmi5: Simplify EDID read
  drm/omap: dpi: Sort includes alphabetically
  drm/omap: dpi: Reorder functions in sections
  drm/omap: dpi: Simplify clock setting API
  drm/omap: dpi: Register a drm_bridge
  drm/omap: sdi: Sort includes alphabetically
  drm/omap: sdi: Register a drm_bridge
  drm/omap: Simplify connector implementation
  drm/omap: dss: Remove unused omap_dss_device operations
  drm/omap: dss: Inline the omapdss_display_get() function
  drm/omap: dss: Remove unused omapdss_of_find_connected_device()
    function

 Documentation/gpu/todo.rst                    |  12 +
 arch/arm/configs/davinci_all_defconfig        |   2 +-
 arch/arm/configs/integrator_defconfig         |   2 +-
 arch/arm/configs/multi_v7_defconfig           |   2 +-
 arch/arm/configs/shmobile_defconfig           |   2 +-
 arch/arm/configs/sunxi_defconfig              |   2 +-
 arch/arm/configs/versatile_defconfig          |   2 +-
 drivers/gpu/drm/Makefile                      |   3 +-
 drivers/gpu/drm/arc/arcpgu_hdmi.c             |   2 +-
 .../gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c  |   2 +-
 drivers/gpu/drm/bridge/Kconfig                |  29 +-
 drivers/gpu/drm/bridge/Makefile               |   4 +-
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c  |   6 +-
 drivers/gpu/drm/bridge/analogix-anx78xx.c     |   6 +-
 .../drm/bridge/analogix/analogix_dp_core.c    |   8 +-
 drivers/gpu/drm/bridge/cdns-dsi.c             |   6 +-
 drivers/gpu/drm/bridge/display-connector.c    | 292 ++++++++++++++
 drivers/gpu/drm/bridge/dumb-vga-dac.c         | 299 --------------
 drivers/gpu/drm/bridge/lvds-encoder.c         |   5 +-
 .../bridge/megachips-stdpxxxx-ge-b850v3-fw.c  |   6 +-
 drivers/gpu/drm/bridge/nxp-ptn3460.c          |   6 +-
 drivers/gpu/drm/bridge/panel.c                |  22 +-
 drivers/gpu/drm/bridge/parade-ps8622.c        |   6 +-
 drivers/gpu/drm/bridge/sii902x.c              |   6 +-
 drivers/gpu/drm/bridge/sil-sii8620.c          |   3 +-
 drivers/gpu/drm/bridge/simple-bridge.c        | 339 ++++++++++++++++
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c     |   8 +-
 drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c |   8 +-
 drivers/gpu/drm/bridge/tc358764.c             |   6 +-
 drivers/gpu/drm/bridge/tc358767.c             |   6 +-
 drivers/gpu/drm/bridge/thc63lvd1024.c         |   5 +-
 drivers/gpu/drm/bridge/ti-sn65dsi86.c         |   6 +-
 drivers/gpu/drm/bridge/ti-tfp410.c            | 205 ++++------
 drivers/gpu/drm/bridge/ti-tpd12s015.c         | 195 +++++++++
 drivers/gpu/drm/drm_bridge.c                  | 100 ++++-
 drivers/gpu/drm/drm_bridge_connector.c        | 372 ++++++++++++++++++
 drivers/gpu/drm/drm_connector.c               |  15 +
 drivers/gpu/drm/drm_edid.c                    |  11 +-
 drivers/gpu/drm/drm_simple_kms_helper.c       |   2 +-
 drivers/gpu/drm/exynos/exynos_dp.c            |   3 +-
 drivers/gpu/drm/exynos/exynos_drm_dsi.c       |   4 +-
 drivers/gpu/drm/exynos/exynos_hdmi.c          |   2 +-
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c     |   2 +-
 drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c  |   2 +-
 drivers/gpu/drm/i2c/tda998x_drv.c             |   8 +-
 drivers/gpu/drm/imx/imx-ldb.c                 |   2 +-
 drivers/gpu/drm/imx/parallel-display.c        |   2 +-
 drivers/gpu/drm/ingenic/ingenic-drm.c         |   2 +-
 drivers/gpu/drm/mcde/mcde_dsi.c               |   8 +-
 drivers/gpu/drm/mediatek/mtk_dpi.c            |   2 +-
 drivers/gpu/drm/mediatek/mtk_dsi.c            |   2 +-
 drivers/gpu/drm/mediatek/mtk_hdmi.c           |   8 +-
 drivers/gpu/drm/msm/dsi/dsi_manager.c         |   4 +-
 drivers/gpu/drm/msm/edp/edp_bridge.c          |   2 +-
 drivers/gpu/drm/msm/hdmi/hdmi_bridge.c        |   2 +-
 drivers/gpu/drm/omapdrm/displays/Kconfig      |  22 --
 drivers/gpu/drm/omapdrm/displays/Makefile     |   4 -
 .../omapdrm/displays/connector-analog-tv.c    |  97 -----
 .../gpu/drm/omapdrm/displays/connector-hdmi.c | 183 ---------
 .../gpu/drm/omapdrm/displays/encoder-opa362.c | 137 -------
 .../drm/omapdrm/displays/encoder-tpd12s015.c  | 217 ----------
 .../gpu/drm/omapdrm/displays/panel-dsi-cm.c   |   2 +-
 drivers/gpu/drm/omapdrm/dss/Makefile          |   2 +-
 drivers/gpu/drm/omapdrm/dss/base.c            |  71 ++--
 drivers/gpu/drm/omapdrm/dss/display.c         |   9 -
 drivers/gpu/drm/omapdrm/dss/dpi.c             | 337 +++++++++-------
 drivers/gpu/drm/omapdrm/dss/dsi.c             |   4 +-
 drivers/gpu/drm/omapdrm/dss/dss-of.c          |  28 --
 drivers/gpu/drm/omapdrm/dss/dss.c             |   3 +-
 drivers/gpu/drm/omapdrm/dss/hdmi.h            |   4 +-
 drivers/gpu/drm/omapdrm/dss/hdmi4.c           | 324 ++++++++-------
 drivers/gpu/drm/omapdrm/dss/hdmi4_core.c      |  59 +--
 drivers/gpu/drm/omapdrm/dss/hdmi4_core.h      |   4 +-
 drivers/gpu/drm/omapdrm/dss/hdmi5.c           | 304 +++++++-------
 drivers/gpu/drm/omapdrm/dss/hdmi5_core.c      |  48 +--
 drivers/gpu/drm/omapdrm/dss/hdmi5_core.h      |   5 +-
 .../gpu/drm/omapdrm/dss/omapdss-boot-init.c   |   5 -
 drivers/gpu/drm/omapdrm/dss/omapdss.h         |  47 +--
 drivers/gpu/drm/omapdrm/dss/output.c          |  55 ++-
 drivers/gpu/drm/omapdrm/dss/sdi.c             | 188 +++++----
 drivers/gpu/drm/omapdrm/dss/venc.c            | 270 +++++++------
 drivers/gpu/drm/omapdrm/omap_connector.c      | 246 +-----------
 drivers/gpu/drm/omapdrm/omap_connector.h      |   3 -
 drivers/gpu/drm/omapdrm/omap_drv.c            |  96 +++--
 drivers/gpu/drm/omapdrm/omap_encoder.c        |  83 +---
 drivers/gpu/drm/rcar-du/rcar_du_encoder.c     |   2 +-
 drivers/gpu/drm/rcar-du/rcar_lvds.c           |   8 +-
 drivers/gpu/drm/rockchip/rockchip_lvds.c      |   2 +-
 drivers/gpu/drm/rockchip/rockchip_rgb.c       |   2 +-
 drivers/gpu/drm/sti/sti_dvo.c                 |   2 +-
 drivers/gpu/drm/sti/sti_hda.c                 |   2 +-
 drivers/gpu/drm/sti/sti_hdmi.c                |   2 +-
 drivers/gpu/drm/stm/ltdc.c                    |   2 +-
 drivers/gpu/drm/sun4i/sun4i_lvds.c            |   2 +-
 drivers/gpu/drm/sun4i/sun4i_rgb.c             |   2 +-
 drivers/gpu/drm/tilcdc/tilcdc_external.c      |   2 +-
 drivers/gpu/drm/vc4/vc4_dpi.c                 |   2 +-
 drivers/gpu/drm/vc4/vc4_dsi.c                 |   2 +-
 drivers/video/hdmi.c                          |  11 +-
 include/drm/drm_bridge.h                      | 197 +++++++++-
 include/drm/drm_bridge_connector.h            |  18 +
 include/drm/drm_connector.h                   |   9 +
 include/linux/hdmi.h                          |   2 +-
 103 files changed, 2819 insertions(+), 2375 deletions(-)
 create mode 100644 drivers/gpu/drm/bridge/display-connector.c
 delete mode 100644 drivers/gpu/drm/bridge/dumb-vga-dac.c
 create mode 100644 drivers/gpu/drm/bridge/simple-bridge.c
 create mode 100644 drivers/gpu/drm/bridge/ti-tpd12s015.c
 create mode 100644 drivers/gpu/drm/drm_bridge_connector.c
 delete mode 100644 drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c
 delete mode 100644 drivers/gpu/drm/omapdrm/displays/connector-hdmi.c
 delete mode 100644 drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
 delete mode 100644 drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
 delete mode 100644 drivers/gpu/drm/omapdrm/dss/dss-of.c
 create mode 100644 include/drm/drm_bridge_connector.h

Comments

Tomi Valkeinen Aug. 26, 2019, 12:15 p.m. UTC | #1
Hi Laurent,

On 20/08/2019 04:16, Laurent Pinchart wrote:

> The patches can be found at
> 
> 	git://linuxtv.org/pinchartl/media.git omapdrm/bridge/devel

I took your branch, booted AM5 EVM (I see you had the hack dts patch in your branch), and:

insmod nfs/work/linux/drivers/media/cec/cec.ko
insmod nfs/work/linux/drivers/video/fbdev/core/cfbcopyarea.ko
insmod nfs/work/linux/drivers/video/fbdev/core/cfbimgblt.ko
insmod nfs/work/linux/drivers/video/fbdev/core/cfbfillrect.ko
insmod nfs/work/linux/drivers/gpu/drm/drm_panel_orientation_quirks.ko
insmod nfs/work/linux/drivers/gpu/drm/drm.ko
insmod nfs/work/linux/drivers/gpu/drm/drm_kms_helper.ko
insmod nfs/work/linux/drivers/gpu/drm/bridge/ti-tfp410.ko
insmod nfs/work/linux/drivers/gpu/drm/bridge/sii902x.ko
insmod nfs/work/linux/drivers/gpu/drm/bridge/tc358767.ko
insmod nfs/work/linux/drivers/gpu/drm/panel/panel-simple.ko
[   25.487002] panel-simple display: display supply power not found, using dummy regulator
[   25.495241] ------------[ cut here ]------------
[   25.499900] WARNING: CPU: 0 PID: 303 at drivers/gpu/drm/panel/panel-simple.c:378 panel_simple_probe+0x34c/0x3b4 [panel_simple]
[   25.511691] Modules linked in: panel_simple(+) tc358767 sii902x ti_tfp410 drm_kms_helper drm drm_panel_orientation_quirks cfbfillrect cfbimgblt cfbcopyarea cec
[   25.526341] CPU: 0 PID: 303 Comm: insmod Tainted: G        W         5.3.0-rc3-01400-g27515343445e #1
[   25.535602] Hardware name: Generic DRA74X (Flattened Device Tree)
[   25.541740] [<c01139b4>] (unwind_backtrace) from [<c010da68>] (show_stack+0x10/0x14)
[   25.549526] [<c010da68>] (show_stack) from [<c0941138>] (dump_stack+0xa8/0xc4)
[   25.556789] [<c0941138>] (dump_stack) from [<c013a57c>] (__warn.part.3+0xa8/0xd4)
[   25.564309] [<c013a57c>] (__warn.part.3) from [<c013a700>] (warn_slowpath_null+0x40/0x4c)
[   25.572540] [<c013a700>] (warn_slowpath_null) from [<bf0b86f0>] (panel_simple_probe+0x34c/0x3b4 [panel_simple])
[   25.582699] [<bf0b86f0>] (panel_simple_probe [panel_simple]) from [<c05f845c>] (platform_drv_probe+0x48/0x98)
[   25.592664] [<c05f845c>] (platform_drv_probe) from [<c05f5f4c>] (really_probe+0x100/0x410)
[   25.600969] [<c05f5f4c>] (really_probe) from [<c05f6428>] (driver_probe_device+0x6c/0x1b4)
[   25.609273] [<c05f6428>] (driver_probe_device) from [<c05f67c0>] (device_driver_attach+0x58/0x60)
[   25.618188] [<c05f67c0>] (device_driver_attach) from [<c05f686c>] (__driver_attach+0xa4/0x148)
[   25.626843] [<c05f686c>] (__driver_attach) from [<c05f3f24>] (bus_for_each_dev+0x70/0xb4)
[   25.635060] [<c05f3f24>] (bus_for_each_dev) from [<c05f5268>] (bus_add_driver+0x1a8/0x200)
[   25.643365] [<c05f5268>] (bus_add_driver) from [<c05f7414>] (driver_register+0x74/0x108)
[   25.651506] [<c05f7414>] (driver_register) from [<bf0aa010>] (panel_simple_init+0x10/0x1000 [panel_simple])
[   25.661634] ---[ end trace 1bb774fc77a9c1a2 ]---
[   25.666414] panel-simple display: Reject override mode: panel has a fixed mode
insmod nfs/work/linux/drivers/gpu/drm/omapdrm/dss/omapdss-base.ko
insmod nfs/work/linux/drivers/gpu/drm/omapdrm/dss/omapdss.ko
[   25.846736] DSS: OMAP DSS rev 6.1
insmod nfs/work/linux/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.ko
insmod nfs/work/linux/drivers/gpu/drm/omapdrm/omapdrm.ko
[   26.274382] dmm 4e000000.dmm: workaround for errata i878 in use
[   26.281981] dmm 4e000000.dmm: initialized all PAT entries
[   26.289408] ------------[ cut here ]------------
[   26.294298] WARNING: CPU: 1 PID: 64 at lib/list_debug.c:28 __list_add_valid+0x74/0xb0
[   26.302166] list_add corruption. prev->next should be next (bf0692bc), but was 6b6b6b6b. (prev=eadcd384).
[   26.314711] Modules linked in: omapdrm panel_dsi_cm omapdss omapdss_base panel_simple tc358767 sii902x ti_tfp410 drm_kms_helper drm drm_panel_orientation_quirks cfbf
illrect cfbimgblt cfbcopyarea cec
# [   26.332661] CPU: 1 PID: 64 Comm: kworker/1:1 Tainted: G        W         5.3.0-rc3-01400-g27515343445e #1
[   26.342354] Hardware name: Generic DRA74X (Flattened Device Tree)
[   26.348483] Workqueue: events deferred_probe_work_func
[   26.353658] [<c01139b4>] (unwind_backtrace) from [<c010da68>] (show_stack+0x10/0x14)
[   26.361445] [<c010da68>] (show_stack) from [<c0941138>] (dump_stack+0xa8/0xc4)
[   26.368707] [<c0941138>] (dump_stack) from [<c013a57c>] (__warn.part.3+0xa8/0xd4)
[   26.376229] [<c013a57c>] (__warn.part.3) from [<c013a604>] (warn_slowpath_fmt+0x5c/0x88)
[   26.384360] [<c013a604>] (warn_slowpath_fmt) from [<c04e5ef4>] (__list_add_valid+0x74/0xb0)
[   26.392806] [<c04e5ef4>] (__list_add_valid) from [<bf037c34>] (drm_bridge_add+0x40/0x6c [drm])
[   26.401545] [<bf037c34>] (drm_bridge_add [drm]) from [<bf0e2a0c>] (hdmi5_probe+0x17c/0x264 [omapdss])
[   26.410845] [<bf0e2a0c>] (hdmi5_probe [omapdss]) from [<c05f845c>] (platform_drv_probe+0x48/0x98)
[   26.419762] [<c05f845c>] (platform_drv_probe) from [<c05f5f4c>] (really_probe+0x100/0x410)
[   26.428068] [<c05f5f4c>] (really_probe) from [<c05f6428>] (driver_probe_device+0x6c/0x1b4)
[   26.436373] [<c05f6428>] (driver_probe_device) from [<c05f3ff8>] (bus_for_each_drv+0x7c/0xc4)
[   26.444938] [<c05f3ff8>] (bus_for_each_drv) from [<c05f5da4>] (__device_attach+0xc8/0x168)
[   26.453243] [<c05f5da4>] (__device_attach) from [<c05f4f80>] (bus_probe_device+0x84/0x8c)
[   26.461458] [<c05f4f80>] (bus_probe_device) from [<c05f54cc>] (deferred_probe_work_func+0x84/0xcc)
[   26.470463] [<c05f54cc>] (deferred_probe_work_func) from [<c0155c98>] (process_one_work+0x184/0x504)
[   26.479641] [<c0155c98>] (process_one_work) from [<c015691c>] (worker_thread+0x2c/0x51c)
[   26.487773] [<c015691c>] (worker_thread) from [<c015bd04>] (kthread+0x140/0x158)
[   26.495205] [<c015bd04>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[   26.502461] Exception stack(0xeaba3fb0 to 0xeaba3ff8)
[   26.507536] 3fa0:                                     00000000 00000000 00000000 00000000
[   26.515750] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   26.523964] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   26.531766] ---[ end trace 1bb774fc77a9c1a3 ]---
[   26.536482] 8<--- cut here ---
[   26.539550] Unable to handle kernel paging request at virtual address 6b6b6b67
[   26.546845] pgd = e9e66080
[   26.549651] [6b6b6b67] *pgd=00000000
[   26.553249] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[   26.558584] Modules linked in: omapdrm panel_dsi_cm omapdss omapdss_base panel_simple tc358767 sii902x ti_tfp410 drm_kms_helper drm drm_panel_orientation_quirks cfbf
illrect cfbimgblt cfbcopyarea cec
[   26.576327] CPU: 1 PID: 64 Comm: kworker/1:1 Tainted: G        W         5.3.0-rc3-01400-g27515343445e #1
[   26.585933] Hardware name: Generic DRA74X (Flattened Device Tree)
[   26.592057] Workqueue: events deferred_probe_work_func
[   26.597270] PC is at of_drm_find_bridge+0x38/0x7c [drm]
[   26.602519] LR is at 0x0
[   26.605063] pc : [<bf037bb0>]    lr : [<00000000>]    psr: 900b0013
[   26.611356] sp : eaba3de0  ip : eaba2000  fp : 00000013
[   26.616604] r10: c0ebcc98  r9 : bf0e83c8  r8 : eaf69120
[   26.621852] r7 : eaf69174  r6 : eaf69174  r5 : efde6760  r4 : 6b6b6b5b
[   26.628406] r3 : 6b6b6b6b  r2 : 00000000  r1 : 00000000  r0 : bf0692bc
[   26.634964] Flags: NzcV  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[   26.642132] Control: 10c5387d  Table: aafa806a  DAC: 00000051
[   26.647904] Process kworker/1:1 (pid: 64, stack limit = 0xef0d19b6)
[   26.654195] Stack: (0xeaba3de0 to 0xeaba4000)
[   26.658575] 3de0: eaf69120 efde6760 eaf69174 bf0aab64 eaf69000 ea0e8810 00000000 bf0e2a54
[   26.666790] 3e00: 00002000 bf0f02fc eaf69000 ea0e8810 c0f13054 ea0e8810 00000000 bf0f2220
[   26.675005] 3e20: 00000000 00000000 bf0f2220 c05f845c ea0e8810 c0f13054 c0f13058 00000000
[   26.683219] 3e40: 00000000 c05f5f4c c05f666c ea0e8810 c0b95478 ea0e8810 bf0f2220 c05f666c
[   26.691432] 3e60: c0e05148 00000001 c0ebcc98 c0ebcc98 c0b95478 c05f6428 00000001 c05f6638
[   26.699647] 3e80: bf0f2220 00000000 eaba3ecc c05f666c c0e05148 00000001 c0ebcc98 c05f3ff8
[   26.707862] 3ea0: c0b95478 eb8e0b6c eafda3b8 db20362b ea0e8810 ea0e8810 ea0e8854 c0e05148
[   26.716076] 3ec0: c0e88e78 c05f5da4 ea0e8810 ea0e8810 00000001 db20362b eafda2d4 ea0e8810
[   26.724291] 3ee0: c0e89100 c0e88e78 c0e88e8c c05f4f80 eafda2d4 ea0e8810 c0e88e78 c05f54cc
[   26.732505] 3f00: c05f5448 c0e88ea0 ea884780 efd8ef80 efd92300 00000000 c0eb30b0 00000000
[   26.740719] 3f20: ffffe000 c0155c98 ea869800 efd8ef80 00000008 ea884780 ea884794 efd8ef80
[   26.748934] 3f40: 00000008 efd8ef98 c0e03d00 efd8ef80 ffffe000 c015691c eaaeca9c c095f020
[   26.757150] 3f60: eaaeca9c 00000000 eaaeca80 eaaecac0 eaba2000 ea884780 c01568f0 eb91feb4
[   26.765365] 3f80: eaaeca9c c015bd04 00000000 eaaecac0 c015bbc4 00000000 00000000 00000000
[   26.773580] 3fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
[   26.781794] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   26.790009] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[   26.798278] [<bf037bb0>] (of_drm_find_bridge [drm]) from [<bf0aab64>] (omapdss_device_init_output+0x38/0x4d4 [omapdss_base])
[   26.809583] [<bf0aab64>] (omapdss_device_init_output [omapdss_base]) from [<bf0e2a54>] (hdmi5_probe+0x1c4/0x264 [omapdss])
[   26.820709] [<bf0e2a54>] (hdmi5_probe [omapdss]) from [<c05f845c>] (platform_drv_probe+0x48/0x98)
[   26.829627] [<c05f845c>] (platform_drv_probe) from [<c05f5f4c>] (really_probe+0x100/0x410)
[   26.837932] [<c05f5f4c>] (really_probe) from [<c05f6428>] (driver_probe_device+0x6c/0x1b4)
[   26.846236] [<c05f6428>] (driver_probe_device) from [<c05f3ff8>] (bus_for_each_drv+0x7c/0xc4)
[   26.854802] [<c05f3ff8>] (bus_for_each_drv) from [<c05f5da4>] (__device_attach+0xc8/0x168)
[   26.863106] [<c05f5da4>] (__device_attach) from [<c05f4f80>] (bus_probe_device+0x84/0x8c)
[   26.871323] [<c05f4f80>] (bus_probe_device) from [<c05f54cc>] (deferred_probe_work_func+0x84/0xcc)
[   26.880326] [<c05f54cc>] (deferred_probe_work_func) from [<c0155c98>] (process_one_work+0x184/0x504)
[   26.889503] [<c0155c98>] (process_one_work) from [<c015691c>] (worker_thread+0x2c/0x51c)
[   26.897634] [<c015691c>] (worker_thread) from [<c015bd04>] (kthread+0x140/0x158)
[   26.905065] [<c015bd04>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[   26.912318] Exception stack(0xeaba3fb0 to 0xeaba3ff8)
[   26.917393] 3fa0:                                     00000000 00000000 00000000 00000000
[   26.925607] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   26.933821] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   26.940469] Code: e5133004 e1550003 1a000003 ea00000b (e5133004) 
[   26.946649] ---[ end trace 1bb774fc77a9c1a4 ]---
Laurent Pinchart Aug. 26, 2019, 1:51 p.m. UTC | #2
Hi Tomi,

On Mon, Aug 26, 2019 at 03:15:23PM +0300, Tomi Valkeinen wrote:
> On 20/08/2019 04:16, Laurent Pinchart wrote:
> 
> > The patches can be found at
> > 
> > 	git://linuxtv.org/pinchartl/media.git omapdrm/bridge/devel
> 
> I took your branch, booted AM5 EVM (I see you had the hack dts patch in your branch), and:
> 
> insmod nfs/work/linux/drivers/media/cec/cec.ko
> insmod nfs/work/linux/drivers/video/fbdev/core/cfbcopyarea.ko
> insmod nfs/work/linux/drivers/video/fbdev/core/cfbimgblt.ko
> insmod nfs/work/linux/drivers/video/fbdev/core/cfbfillrect.ko
> insmod nfs/work/linux/drivers/gpu/drm/drm_panel_orientation_quirks.ko
> insmod nfs/work/linux/drivers/gpu/drm/drm.ko
> insmod nfs/work/linux/drivers/gpu/drm/drm_kms_helper.ko
> insmod nfs/work/linux/drivers/gpu/drm/bridge/ti-tfp410.ko
> insmod nfs/work/linux/drivers/gpu/drm/bridge/sii902x.ko
> insmod nfs/work/linux/drivers/gpu/drm/bridge/tc358767.ko
> insmod nfs/work/linux/drivers/gpu/drm/panel/panel-simple.ko
> [   25.487002] panel-simple display: display supply power not found, using dummy regulator
> [   25.495241] ------------[ cut here ]------------
> [   25.499900] WARNING: CPU: 0 PID: 303 at drivers/gpu/drm/panel/panel-simple.c:378 panel_simple_probe+0x34c/0x3b4 [panel_simple]

How am I expected to sneak patches in if you test them ? :-)

This has been introduced by a recent rebase, and I've only tested the
series on the pandaboard since then. It looks like the problem comes
from

commit b8a2948fa2b3a5a6da67fd57aa01c7318d795125
Author: Sean Paul <seanpaul@chromium.org>
Date:   Thu Jul 11 13:34:53 2019 -0700

    drm/panel: simple: Add ability to override typical timing

which breaks our out-of-tree DT. As a short term fix I can simply drop
the panel timings from DT, but I think this issue can affect more
boards, and should thus probably be addressed on the kernel side.

One option is to patch osddisplays_osd070t1718_19ts to specify timings
instead of a fixed mode, but I don't have access to the panel's
datasheet. I'm also concerned this wouldn't scale.

Another option is to avoid the WARN_ON() if the timings parsed from DT
are identifical to the timings in the panel-simple driver. Sean, what's
your opinion ?

> [   25.511691] Modules linked in: panel_simple(+) tc358767 sii902x ti_tfp410 drm_kms_helper drm drm_panel_orientation_quirks cfbfillrect cfbimgblt cfbcopyarea cec
> [   25.526341] CPU: 0 PID: 303 Comm: insmod Tainted: G        W         5.3.0-rc3-01400-g27515343445e #1
> [   25.535602] Hardware name: Generic DRA74X (Flattened Device Tree)
> [   25.541740] [<c01139b4>] (unwind_backtrace) from [<c010da68>] (show_stack+0x10/0x14)
> [   25.549526] [<c010da68>] (show_stack) from [<c0941138>] (dump_stack+0xa8/0xc4)
> [   25.556789] [<c0941138>] (dump_stack) from [<c013a57c>] (__warn.part.3+0xa8/0xd4)
> [   25.564309] [<c013a57c>] (__warn.part.3) from [<c013a700>] (warn_slowpath_null+0x40/0x4c)
> [   25.572540] [<c013a700>] (warn_slowpath_null) from [<bf0b86f0>] (panel_simple_probe+0x34c/0x3b4 [panel_simple])
> [   25.582699] [<bf0b86f0>] (panel_simple_probe [panel_simple]) from [<c05f845c>] (platform_drv_probe+0x48/0x98)
> [   25.592664] [<c05f845c>] (platform_drv_probe) from [<c05f5f4c>] (really_probe+0x100/0x410)
> [   25.600969] [<c05f5f4c>] (really_probe) from [<c05f6428>] (driver_probe_device+0x6c/0x1b4)
> [   25.609273] [<c05f6428>] (driver_probe_device) from [<c05f67c0>] (device_driver_attach+0x58/0x60)
> [   25.618188] [<c05f67c0>] (device_driver_attach) from [<c05f686c>] (__driver_attach+0xa4/0x148)
> [   25.626843] [<c05f686c>] (__driver_attach) from [<c05f3f24>] (bus_for_each_dev+0x70/0xb4)
> [   25.635060] [<c05f3f24>] (bus_for_each_dev) from [<c05f5268>] (bus_add_driver+0x1a8/0x200)
> [   25.643365] [<c05f5268>] (bus_add_driver) from [<c05f7414>] (driver_register+0x74/0x108)
> [   25.651506] [<c05f7414>] (driver_register) from [<bf0aa010>] (panel_simple_init+0x10/0x1000 [panel_simple])
> [   25.661634] ---[ end trace 1bb774fc77a9c1a2 ]---
> [   25.666414] panel-simple display: Reject override mode: panel has a fixed mode
> insmod nfs/work/linux/drivers/gpu/drm/omapdrm/dss/omapdss-base.ko
> insmod nfs/work/linux/drivers/gpu/drm/omapdrm/dss/omapdss.ko
> [   25.846736] DSS: OMAP DSS rev 6.1
> insmod nfs/work/linux/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.ko
> insmod nfs/work/linux/drivers/gpu/drm/omapdrm/omapdrm.ko
> [   26.274382] dmm 4e000000.dmm: workaround for errata i878 in use
> [   26.281981] dmm 4e000000.dmm: initialized all PAT entries
> [   26.289408] ------------[ cut here ]------------
> [   26.294298] WARNING: CPU: 1 PID: 64 at lib/list_debug.c:28 __list_add_valid+0x74/0xb0
> [   26.302166] list_add corruption. prev->next should be next (bf0692bc), but was 6b6b6b6b. (prev=eadcd384).
> [   26.314711] Modules linked in: omapdrm panel_dsi_cm omapdss omapdss_base panel_simple tc358767 sii902x ti_tfp410 drm_kms_helper drm drm_panel_orientation_quirks cfbf
> illrect cfbimgblt cfbcopyarea cec
> # [   26.332661] CPU: 1 PID: 64 Comm: kworker/1:1 Tainted: G        W         5.3.0-rc3-01400-g27515343445e #1
> [   26.342354] Hardware name: Generic DRA74X (Flattened Device Tree)
> [   26.348483] Workqueue: events deferred_probe_work_func
> [   26.353658] [<c01139b4>] (unwind_backtrace) from [<c010da68>] (show_stack+0x10/0x14)
> [   26.361445] [<c010da68>] (show_stack) from [<c0941138>] (dump_stack+0xa8/0xc4)
> [   26.368707] [<c0941138>] (dump_stack) from [<c013a57c>] (__warn.part.3+0xa8/0xd4)
> [   26.376229] [<c013a57c>] (__warn.part.3) from [<c013a604>] (warn_slowpath_fmt+0x5c/0x88)
> [   26.384360] [<c013a604>] (warn_slowpath_fmt) from [<c04e5ef4>] (__list_add_valid+0x74/0xb0)
> [   26.392806] [<c04e5ef4>] (__list_add_valid) from [<bf037c34>] (drm_bridge_add+0x40/0x6c [drm])
> [   26.401545] [<bf037c34>] (drm_bridge_add [drm]) from [<bf0e2a0c>] (hdmi5_probe+0x17c/0x264 [omapdss])
> [   26.410845] [<bf0e2a0c>] (hdmi5_probe [omapdss]) from [<c05f845c>] (platform_drv_probe+0x48/0x98)
> [   26.419762] [<c05f845c>] (platform_drv_probe) from [<c05f5f4c>] (really_probe+0x100/0x410)
> [   26.428068] [<c05f5f4c>] (really_probe) from [<c05f6428>] (driver_probe_device+0x6c/0x1b4)
> [   26.436373] [<c05f6428>] (driver_probe_device) from [<c05f3ff8>] (bus_for_each_drv+0x7c/0xc4)
> [   26.444938] [<c05f3ff8>] (bus_for_each_drv) from [<c05f5da4>] (__device_attach+0xc8/0x168)
> [   26.453243] [<c05f5da4>] (__device_attach) from [<c05f4f80>] (bus_probe_device+0x84/0x8c)
> [   26.461458] [<c05f4f80>] (bus_probe_device) from [<c05f54cc>] (deferred_probe_work_func+0x84/0xcc)
> [   26.470463] [<c05f54cc>] (deferred_probe_work_func) from [<c0155c98>] (process_one_work+0x184/0x504)
> [   26.479641] [<c0155c98>] (process_one_work) from [<c015691c>] (worker_thread+0x2c/0x51c)
> [   26.487773] [<c015691c>] (worker_thread) from [<c015bd04>] (kthread+0x140/0x158)
> [   26.495205] [<c015bd04>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
> [   26.502461] Exception stack(0xeaba3fb0 to 0xeaba3ff8)
> [   26.507536] 3fa0:                                     00000000 00000000 00000000 00000000
> [   26.515750] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> [   26.523964] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
> [   26.531766] ---[ end trace 1bb774fc77a9c1a3 ]---
> [   26.536482] 8<--- cut here ---
> [   26.539550] Unable to handle kernel paging request at virtual address 6b6b6b67
> [   26.546845] pgd = e9e66080
> [   26.549651] [6b6b6b67] *pgd=00000000
> [   26.553249] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
> [   26.558584] Modules linked in: omapdrm panel_dsi_cm omapdss omapdss_base panel_simple tc358767 sii902x ti_tfp410 drm_kms_helper drm drm_panel_orientation_quirks cfbf
> illrect cfbimgblt cfbcopyarea cec
> [   26.576327] CPU: 1 PID: 64 Comm: kworker/1:1 Tainted: G        W         5.3.0-rc3-01400-g27515343445e #1
> [   26.585933] Hardware name: Generic DRA74X (Flattened Device Tree)
> [   26.592057] Workqueue: events deferred_probe_work_func
> [   26.597270] PC is at of_drm_find_bridge+0x38/0x7c [drm]
> [   26.602519] LR is at 0x0
> [   26.605063] pc : [<bf037bb0>]    lr : [<00000000>]    psr: 900b0013
> [   26.611356] sp : eaba3de0  ip : eaba2000  fp : 00000013
> [   26.616604] r10: c0ebcc98  r9 : bf0e83c8  r8 : eaf69120
> [   26.621852] r7 : eaf69174  r6 : eaf69174  r5 : efde6760  r4 : 6b6b6b5b
> [   26.628406] r3 : 6b6b6b6b  r2 : 00000000  r1 : 00000000  r0 : bf0692bc
> [   26.634964] Flags: NzcV  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
> [   26.642132] Control: 10c5387d  Table: aafa806a  DAC: 00000051
> [   26.647904] Process kworker/1:1 (pid: 64, stack limit = 0xef0d19b6)
> [   26.654195] Stack: (0xeaba3de0 to 0xeaba4000)
> [   26.658575] 3de0: eaf69120 efde6760 eaf69174 bf0aab64 eaf69000 ea0e8810 00000000 bf0e2a54
> [   26.666790] 3e00: 00002000 bf0f02fc eaf69000 ea0e8810 c0f13054 ea0e8810 00000000 bf0f2220
> [   26.675005] 3e20: 00000000 00000000 bf0f2220 c05f845c ea0e8810 c0f13054 c0f13058 00000000
> [   26.683219] 3e40: 00000000 c05f5f4c c05f666c ea0e8810 c0b95478 ea0e8810 bf0f2220 c05f666c
> [   26.691432] 3e60: c0e05148 00000001 c0ebcc98 c0ebcc98 c0b95478 c05f6428 00000001 c05f6638
> [   26.699647] 3e80: bf0f2220 00000000 eaba3ecc c05f666c c0e05148 00000001 c0ebcc98 c05f3ff8
> [   26.707862] 3ea0: c0b95478 eb8e0b6c eafda3b8 db20362b ea0e8810 ea0e8810 ea0e8854 c0e05148
> [   26.716076] 3ec0: c0e88e78 c05f5da4 ea0e8810 ea0e8810 00000001 db20362b eafda2d4 ea0e8810
> [   26.724291] 3ee0: c0e89100 c0e88e78 c0e88e8c c05f4f80 eafda2d4 ea0e8810 c0e88e78 c05f54cc
> [   26.732505] 3f00: c05f5448 c0e88ea0 ea884780 efd8ef80 efd92300 00000000 c0eb30b0 00000000
> [   26.740719] 3f20: ffffe000 c0155c98 ea869800 efd8ef80 00000008 ea884780 ea884794 efd8ef80
> [   26.748934] 3f40: 00000008 efd8ef98 c0e03d00 efd8ef80 ffffe000 c015691c eaaeca9c c095f020
> [   26.757150] 3f60: eaaeca9c 00000000 eaaeca80 eaaecac0 eaba2000 ea884780 c01568f0 eb91feb4
> [   26.765365] 3f80: eaaeca9c c015bd04 00000000 eaaecac0 c015bbc4 00000000 00000000 00000000
> [   26.773580] 3fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
> [   26.781794] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> [   26.790009] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
> [   26.798278] [<bf037bb0>] (of_drm_find_bridge [drm]) from [<bf0aab64>] (omapdss_device_init_output+0x38/0x4d4 [omapdss_base])
> [   26.809583] [<bf0aab64>] (omapdss_device_init_output [omapdss_base]) from [<bf0e2a54>] (hdmi5_probe+0x1c4/0x264 [omapdss])
> [   26.820709] [<bf0e2a54>] (hdmi5_probe [omapdss]) from [<c05f845c>] (platform_drv_probe+0x48/0x98)
> [   26.829627] [<c05f845c>] (platform_drv_probe) from [<c05f5f4c>] (really_probe+0x100/0x410)
> [   26.837932] [<c05f5f4c>] (really_probe) from [<c05f6428>] (driver_probe_device+0x6c/0x1b4)
> [   26.846236] [<c05f6428>] (driver_probe_device) from [<c05f3ff8>] (bus_for_each_drv+0x7c/0xc4)
> [   26.854802] [<c05f3ff8>] (bus_for_each_drv) from [<c05f5da4>] (__device_attach+0xc8/0x168)
> [   26.863106] [<c05f5da4>] (__device_attach) from [<c05f4f80>] (bus_probe_device+0x84/0x8c)
> [   26.871323] [<c05f4f80>] (bus_probe_device) from [<c05f54cc>] (deferred_probe_work_func+0x84/0xcc)
> [   26.880326] [<c05f54cc>] (deferred_probe_work_func) from [<c0155c98>] (process_one_work+0x184/0x504)
> [   26.889503] [<c0155c98>] (process_one_work) from [<c015691c>] (worker_thread+0x2c/0x51c)
> [   26.897634] [<c015691c>] (worker_thread) from [<c015bd04>] (kthread+0x140/0x158)
> [   26.905065] [<c015bd04>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
> [   26.912318] Exception stack(0xeaba3fb0 to 0xeaba3ff8)
> [   26.917393] 3fa0:                                     00000000 00000000 00000000 00000000
> [   26.925607] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> [   26.933821] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
> [   26.940469] Code: e5133004 e1550003 1a000003 ea00000b (e5133004) 
> [   26.946649] ---[ end trace 1bb774fc77a9c1a4 ]---
Tomi Valkeinen Aug. 27, 2019, 7:34 a.m. UTC | #3
On 26/08/2019 16:51, Laurent Pinchart wrote:
> Hi Tomi,
> 
> On Mon, Aug 26, 2019 at 03:15:23PM +0300, Tomi Valkeinen wrote:
>> On 20/08/2019 04:16, Laurent Pinchart wrote:
>>
>>> The patches can be found at
>>>
>>> 	git://linuxtv.org/pinchartl/media.git omapdrm/bridge/devel
>>
>> I took your branch, booted AM5 EVM (I see you had the hack dts patch in your branch), and:
>>
>> insmod nfs/work/linux/drivers/media/cec/cec.ko
>> insmod nfs/work/linux/drivers/video/fbdev/core/cfbcopyarea.ko
>> insmod nfs/work/linux/drivers/video/fbdev/core/cfbimgblt.ko
>> insmod nfs/work/linux/drivers/video/fbdev/core/cfbfillrect.ko
>> insmod nfs/work/linux/drivers/gpu/drm/drm_panel_orientation_quirks.ko
>> insmod nfs/work/linux/drivers/gpu/drm/drm.ko
>> insmod nfs/work/linux/drivers/gpu/drm/drm_kms_helper.ko
>> insmod nfs/work/linux/drivers/gpu/drm/bridge/ti-tfp410.ko
>> insmod nfs/work/linux/drivers/gpu/drm/bridge/sii902x.ko
>> insmod nfs/work/linux/drivers/gpu/drm/bridge/tc358767.ko
>> insmod nfs/work/linux/drivers/gpu/drm/panel/panel-simple.ko
>> [   25.487002] panel-simple display: display supply power not found, using dummy regulator
>> [   25.495241] ------------[ cut here ]------------
>> [   25.499900] WARNING: CPU: 0 PID: 303 at drivers/gpu/drm/panel/panel-simple.c:378 panel_simple_probe+0x34c/0x3b4 [panel_simple]
> 
> How am I expected to sneak patches in if you test them ? :-)
> 
> This has been introduced by a recent rebase, and I've only tested the
> series on the pandaboard since then. It looks like the problem comes
> from
> 
> commit b8a2948fa2b3a5a6da67fd57aa01c7318d795125
> Author: Sean Paul <seanpaul@chromium.org>
> Date:   Thu Jul 11 13:34:53 2019 -0700
> 
>      drm/panel: simple: Add ability to override typical timing
> 
> which breaks our out-of-tree DT. As a short term fix I can simply drop
> the panel timings from DT, but I think this issue can affect more

So just removing the timings from the panel's node should be enough? 
Still crashing for me, although the panel warning goes away.

  Tomi
Laurent Pinchart Aug. 27, 2019, 9:29 a.m. UTC | #4
Hi Tomi,

On Tue, Aug 27, 2019 at 10:34:59AM +0300, Tomi Valkeinen wrote:
> On 26/08/2019 16:51, Laurent Pinchart wrote:
> > On Mon, Aug 26, 2019 at 03:15:23PM +0300, Tomi Valkeinen wrote:
> >> On 20/08/2019 04:16, Laurent Pinchart wrote:
> >>
> >>> The patches can be found at
> >>>
> >>> 	git://linuxtv.org/pinchartl/media.git omapdrm/bridge/devel
> >>
> >> I took your branch, booted AM5 EVM (I see you had the hack dts patch in your branch), and:
> >>
> >> insmod nfs/work/linux/drivers/media/cec/cec.ko
> >> insmod nfs/work/linux/drivers/video/fbdev/core/cfbcopyarea.ko
> >> insmod nfs/work/linux/drivers/video/fbdev/core/cfbimgblt.ko
> >> insmod nfs/work/linux/drivers/video/fbdev/core/cfbfillrect.ko
> >> insmod nfs/work/linux/drivers/gpu/drm/drm_panel_orientation_quirks.ko
> >> insmod nfs/work/linux/drivers/gpu/drm/drm.ko
> >> insmod nfs/work/linux/drivers/gpu/drm/drm_kms_helper.ko
> >> insmod nfs/work/linux/drivers/gpu/drm/bridge/ti-tfp410.ko
> >> insmod nfs/work/linux/drivers/gpu/drm/bridge/sii902x.ko
> >> insmod nfs/work/linux/drivers/gpu/drm/bridge/tc358767.ko
> >> insmod nfs/work/linux/drivers/gpu/drm/panel/panel-simple.ko
> >> [   25.487002] panel-simple display: display supply power not found, using dummy regulator
> >> [   25.495241] ------------[ cut here ]------------
> >> [   25.499900] WARNING: CPU: 0 PID: 303 at drivers/gpu/drm/panel/panel-simple.c:378 panel_simple_probe+0x34c/0x3b4 [panel_simple]
> > 
> > How am I expected to sneak patches in if you test them ? :-)
> > 
> > This has been introduced by a recent rebase, and I've only tested the
> > series on the pandaboard since then. It looks like the problem comes
> > from
> > 
> > commit b8a2948fa2b3a5a6da67fd57aa01c7318d795125
> > Author: Sean Paul <seanpaul@chromium.org>
> > Date:   Thu Jul 11 13:34:53 2019 -0700
> > 
> >      drm/panel: simple: Add ability to override typical timing
> > 
> > which breaks our out-of-tree DT. As a short term fix I can simply drop
> > the panel timings from DT, but I think this issue can affect more
> 
> So just removing the timings from the panel's node should be enough? 
> Still crashing for me, although the panel warning goes away.

My bad, you also need the following patch that I will include in v3.

From 9bbec803e9abbc650ca4884004b914f50e87cda0 Mon Sep 17 00:00:00 2001
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: Tue, 27 Aug 2019 12:18:24 +0300
Subject: [PATCH] drm/panel: panel-simple: Set OSD070T1718 panel type

The OSD070T1718 is a DPI panel, set its type accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/gpu/drm/panel/panel-simple.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 4b92b27eba86..5d487686d25c 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -2398,6 +2398,7 @@ static const struct panel_desc osddisplays_osd070t1718_19ts = {
 	},
 	.bus_format = MEDIA_BUS_FMT_RGB888_1X24,
 	.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
+	.connector_type = DRM_MODE_CONNECTOR_DPI,
 };

 static const struct drm_display_mode pda_91_00156_a0_mode = {
Tomi Valkeinen Aug. 27, 2019, 9:32 a.m. UTC | #5
On 27/08/2019 12:29, Laurent Pinchart wrote:
> Hi Tomi,
> 
> On Tue, Aug 27, 2019 at 10:34:59AM +0300, Tomi Valkeinen wrote:
>> On 26/08/2019 16:51, Laurent Pinchart wrote:
>>> On Mon, Aug 26, 2019 at 03:15:23PM +0300, Tomi Valkeinen wrote:
>>>> On 20/08/2019 04:16, Laurent Pinchart wrote:
>>>>
>>>>> The patches can be found at
>>>>>
>>>>> 	git://linuxtv.org/pinchartl/media.git omapdrm/bridge/devel
>>>>
>>>> I took your branch, booted AM5 EVM (I see you had the hack dts patch in your branch), and:
>>>>
>>>> insmod nfs/work/linux/drivers/media/cec/cec.ko
>>>> insmod nfs/work/linux/drivers/video/fbdev/core/cfbcopyarea.ko
>>>> insmod nfs/work/linux/drivers/video/fbdev/core/cfbimgblt.ko
>>>> insmod nfs/work/linux/drivers/video/fbdev/core/cfbfillrect.ko
>>>> insmod nfs/work/linux/drivers/gpu/drm/drm_panel_orientation_quirks.ko
>>>> insmod nfs/work/linux/drivers/gpu/drm/drm.ko
>>>> insmod nfs/work/linux/drivers/gpu/drm/drm_kms_helper.ko
>>>> insmod nfs/work/linux/drivers/gpu/drm/bridge/ti-tfp410.ko
>>>> insmod nfs/work/linux/drivers/gpu/drm/bridge/sii902x.ko
>>>> insmod nfs/work/linux/drivers/gpu/drm/bridge/tc358767.ko
>>>> insmod nfs/work/linux/drivers/gpu/drm/panel/panel-simple.ko
>>>> [   25.487002] panel-simple display: display supply power not found, using dummy regulator
>>>> [   25.495241] ------------[ cut here ]------------
>>>> [   25.499900] WARNING: CPU: 0 PID: 303 at drivers/gpu/drm/panel/panel-simple.c:378 panel_simple_probe+0x34c/0x3b4 [panel_simple]
>>>
>>> How am I expected to sneak patches in if you test them ? :-)
>>>
>>> This has been introduced by a recent rebase, and I've only tested the
>>> series on the pandaboard since then. It looks like the problem comes
>>> from
>>>
>>> commit b8a2948fa2b3a5a6da67fd57aa01c7318d795125
>>> Author: Sean Paul <seanpaul@chromium.org>
>>> Date:   Thu Jul 11 13:34:53 2019 -0700
>>>
>>>       drm/panel: simple: Add ability to override typical timing
>>>
>>> which breaks our out-of-tree DT. As a short term fix I can simply drop
>>> the panel timings from DT, but I think this issue can affect more
>>
>> So just removing the timings from the panel's node should be enough?
>> Still crashing for me, although the panel warning goes away.
> 
> My bad, you also need the following patch that I will include in v3.

Thanks, but I guess I need something more:

drivers/gpu/drm/panel/panel-simple.c:2384:3: error: ‘const struct 
panel_desc’ has no member named ‘connector_type’
   .connector_type = DRM_MODE_CONNECTOR_DPI,

  Tomi
Laurent Pinchart Aug. 27, 2019, 9:40 a.m. UTC | #6
Hi Tomi,

On Tue, Aug 27, 2019 at 12:32:46PM +0300, Tomi Valkeinen wrote:
> On 27/08/2019 12:29, Laurent Pinchart wrote:
> > On Tue, Aug 27, 2019 at 10:34:59AM +0300, Tomi Valkeinen wrote:
> >> On 26/08/2019 16:51, Laurent Pinchart wrote:
> >>> On Mon, Aug 26, 2019 at 03:15:23PM +0300, Tomi Valkeinen wrote:
> >>>> On 20/08/2019 04:16, Laurent Pinchart wrote:
> >>>>
> >>>>> The patches can be found at
> >>>>>
> >>>>> 	git://linuxtv.org/pinchartl/media.git omapdrm/bridge/devel
> >>>>
> >>>> I took your branch, booted AM5 EVM (I see you had the hack dts patch in your branch), and:
> >>>>
> >>>> insmod nfs/work/linux/drivers/media/cec/cec.ko
> >>>> insmod nfs/work/linux/drivers/video/fbdev/core/cfbcopyarea.ko
> >>>> insmod nfs/work/linux/drivers/video/fbdev/core/cfbimgblt.ko
> >>>> insmod nfs/work/linux/drivers/video/fbdev/core/cfbfillrect.ko
> >>>> insmod nfs/work/linux/drivers/gpu/drm/drm_panel_orientation_quirks.ko
> >>>> insmod nfs/work/linux/drivers/gpu/drm/drm.ko
> >>>> insmod nfs/work/linux/drivers/gpu/drm/drm_kms_helper.ko
> >>>> insmod nfs/work/linux/drivers/gpu/drm/bridge/ti-tfp410.ko
> >>>> insmod nfs/work/linux/drivers/gpu/drm/bridge/sii902x.ko
> >>>> insmod nfs/work/linux/drivers/gpu/drm/bridge/tc358767.ko
> >>>> insmod nfs/work/linux/drivers/gpu/drm/panel/panel-simple.ko
> >>>> [   25.487002] panel-simple display: display supply power not found, using dummy regulator
> >>>> [   25.495241] ------------[ cut here ]------------
> >>>> [   25.499900] WARNING: CPU: 0 PID: 303 at drivers/gpu/drm/panel/panel-simple.c:378 panel_simple_probe+0x34c/0x3b4 [panel_simple]
> >>>
> >>> How am I expected to sneak patches in if you test them ? :-)
> >>>
> >>> This has been introduced by a recent rebase, and I've only tested the
> >>> series on the pandaboard since then. It looks like the problem comes
> >>> from
> >>>
> >>> commit b8a2948fa2b3a5a6da67fd57aa01c7318d795125
> >>> Author: Sean Paul <seanpaul@chromium.org>
> >>> Date:   Thu Jul 11 13:34:53 2019 -0700
> >>>
> >>>       drm/panel: simple: Add ability to override typical timing
> >>>
> >>> which breaks our out-of-tree DT. As a short term fix I can simply drop
> >>> the panel timings from DT, but I think this issue can affect more
> >>
> >> So just removing the timings from the panel's node should be enough?
> >> Still crashing for me, although the panel warning goes away.
> > 
> > My bad, you also need the following patch that I will include in v3.
> 
> Thanks, but I guess I need something more:
> 
> drivers/gpu/drm/panel/panel-simple.c:2384:3: error: ‘const struct 
> panel_desc’ has no member named ‘connector_type’
>    .connector_type = DRM_MODE_CONNECTOR_DPI,

Yes, you also need to apply this on top of v3 which I haven't posted yet
:-) You can just fetch my omapdrm/bridge/devel branch, I've pushed the
latest version there.