LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Maxime Ripard <maxime@cerno.tech>
To: Jonas Karlman <jonas@kwiboo.se>, Sam Ravnborg <sam@ravnborg.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@linux.ie>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Maxime Ripard <maxime@cerno.tech>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Robert Foss <robert.foss@linaro.org>,
	Andrzej Hajda <a.hajda@samsung.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH v3 0/8] drm/bridge: Make panel and bridge probe order consistent
Date: Mon, 23 Aug 2021 10:47:15 +0200	[thread overview]
Message-ID: <20210823084723.1493908-1-maxime@cerno.tech> (raw)

Hi,\r
\r
We've encountered an issue with the RaspberryPi DSI panel that prevented the\r
whole display driver from probing.\r
\r
The issue is described in detail in the commit 7213246a803f ("drm/vc4: dsi:\r
Only register our component once a DSI device is attached"), but the basic idea\r
is that since the panel is probed through i2c, there's no synchronization\r
between its probe and the registration of the MIPI-DSI host it's attached to.\r
\r
We initially moved the component framework registration to the MIPI-DSI Host\r
attach hook to make sure we register our component only when we have a DSI\r
device attached to our MIPI-DSI host, and then use lookup our DSI device in our\r
bind hook.\r
\r
However, all the DSI bridges controlled through i2c are only registering their\r
associated DSI device in their bridge attach hook, meaning with our change\r
above, we never got that far, and therefore ended up in the same situation than\r
the one we were trying to fix for panels.\r
\r
The best practice to avoid those issues is to register its functions only after\r
all its dependencies are live. We also shouldn't wait any longer than we should\r
to play nice with the other components that are waiting for us, so in our case\r
that would mean moving the DSI device registration to the bridge probe.\r
\r
If the general approach is agreed upon, other bridge drivers will obviously be\r
converted.\r
\r
Let me know what you think,\r
Maxime\r
\r
---\r
\r
Changes from v2:\r
  - Changed the approach as suggested by Andrzej, and aligned the bridge on the\r
    panel this time.\r
  - Fixed some typos\r
\r
Changes from v1:\r
  - Change the name of drm_of_get_next function to drm_of_get_bridge\r
  - Mention the revert of 87154ff86bf6 and squash the two patches that were\r
    reverting that commit\r
  - Add some documentation\r
  - Make drm_panel_attach and _detach succeed when no callback is there\r
\r
Maxime Ripard (8):\r
  drm/bridge: Add documentation sections\r
  drm/bridge: Document the probe issue with MIPI-DSI bridges\r
  drm/mipi-dsi: Create devm device registration\r
  drm/mipi-dsi: Create devm device attachment\r
  drm/bridge: ps8640: Switch to devm MIPI-DSI helpers\r
  drm/bridge: ps8640: Register and attach our DSI device at probe\r
  drm/bridge: sn65dsi83: Switch to devm MIPI-DSI helpers\r
  drm/bridge: sn65dsi83: Register and attach our DSI device at probe\r
\r
 Documentation/gpu/drm-kms-helpers.rst  | 12 ++++\r
 drivers/gpu/drm/bridge/parade-ps8640.c | 97 ++++++++++++++------------\r
 drivers/gpu/drm/bridge/ti-sn65dsi83.c  | 82 +++++++++++-----------\r
 drivers/gpu/drm/drm_bridge.c           | 70 +++++++++++++++++--\r
 drivers/gpu/drm/drm_mipi_dsi.c         | 81 +++++++++++++++++++++\r
 include/drm/drm_mipi_dsi.h             |  4 ++\r
 6 files changed, 256 insertions(+), 90 deletions(-)\r
\r
-- \r
2.31.1\r
\r

             reply	other threads:[~2021-08-23  8:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23  8:47 Maxime Ripard [this message]
2021-08-23  8:47 ` [PATCH v3 1/8] drm/bridge: Add documentation sections Maxime Ripard
2021-08-24  8:06   ` Andrzej Hajda
2021-08-23  8:47 ` [PATCH v3 2/8] drm/bridge: Document the probe issue with MIPI-DSI bridges Maxime Ripard
2021-08-23 16:32   ` Andrzej Hajda
2021-08-26  8:56     ` Maxime Ripard
2021-08-23  8:47 ` [PATCH v3 3/8] drm/mipi-dsi: Create devm device registration Maxime Ripard
2021-08-24 13:03   ` Andrzej Hajda
2021-08-23  8:47 ` [PATCH v3 4/8] drm/mipi-dsi: Create devm device attachment Maxime Ripard
2021-08-24 13:04   ` Andrzej Hajda
2021-08-23  8:47 ` [PATCH v3 5/8] drm/bridge: ps8640: Switch to devm MIPI-DSI helpers Maxime Ripard
2021-08-23  8:47 ` [PATCH v3 6/8] drm/bridge: ps8640: Register and attach our DSI device at probe Maxime Ripard
2021-08-24 13:14   ` Andrzej Hajda
2021-08-23  8:47 ` [PATCH v3 7/8] drm/bridge: sn65dsi83: Switch to devm MIPI-DSI helpers Maxime Ripard
2021-08-23  8:47 ` [PATCH v3 8/8] drm/bridge: sn65dsi83: Register and attach our DSI device at probe Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210823084723.1493908-1-maxime@cerno.tech \
    --to=maxime@cerno.tech \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=narmstrong@baylibre.com \
    --cc=robert.foss@linaro.org \
    --cc=sam@ravnborg.org \
    --cc=thierry.reding@gmail.com \
    --cc=tzimmermann@suse.de \
    --subject='Re: [PATCH v3 0/8] drm/bridge: Make panel and bridge probe order consistent' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).