dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime@cerno.tech>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Maxime Ripard <maxime@cerno.tech>,
	Daniel Vetter <daniel.vetter@intel.com>,
	David Airlie <airlied@linux.ie>
Cc: Dom Cobley <dom@raspberrypi.com>,
	Tim Gover <tim.gover@raspberrypi.com>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	dri-devel@lists.freedesktop.org,
	Phil Elwell <phil@raspberrypi.com>
Subject: [PATCH v4 8/8] drm/scdc: Document hotplug gotchas
Date: Mon, 29 Aug 2022 15:47:31 +0200	[thread overview]
Message-ID: <20220829134731.213478-9-maxime@cerno.tech> (raw)
In-Reply-To: <20220829134731.213478-1-maxime@cerno.tech>

There's some interactions between the SCDC setup and the disconnection /
reconnection of displays. Let's document it and a solution.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 drivers/gpu/drm/display/drm_scdc_helper.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/display/drm_scdc_helper.c b/drivers/gpu/drm/display/drm_scdc_helper.c
index 81881e81ceae..c3ad4ab2b456 100644
--- a/drivers/gpu/drm/display/drm_scdc_helper.c
+++ b/drivers/gpu/drm/display/drm_scdc_helper.c
@@ -35,6 +35,19 @@
  * HDMI 2.0 specification. It is a point-to-point protocol that allows the
  * HDMI source and HDMI sink to exchange data. The same I2C interface that
  * is used to access EDID serves as the transport mechanism for SCDC.
+ *
+ * Note: The SCDC status is going to be lost when the display is
+ * disconnected. This can happen physically when the user disconnects
+ * the cable, but also when a display is switched on (such as waking up
+ * a TV).
+ *
+ * This is further complicated by the fact that, upon a disconnection /
+ * reconnection, KMS won't change the mode on its own. This means that
+ * one can't just rely on setting the SCDC status on enable, but also
+ * has to track the connector status changes using interrupts and
+ * restore the SCDC status. The typical solution for this is to trigger an
+ * empty modeset in drm_connector_helper_funcs.detect_ctx(), like what vc4 does
+ * in vc4_hdmi_reset_link().
  */
 
 #define SCDC_I2C_SLAVE_ADDRESS 0x54
-- 
2.37.1


  parent reply	other threads:[~2022-08-29 13:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29 13:47 [PATCH v4 0/8] drm/vc4: Reset HDMI link at hotplug Maxime Ripard
2022-08-29 13:47 ` [PATCH v4 1/8] drm/vc4: hdmi: Constify drm_display_mode Maxime Ripard
2022-08-29 13:47 ` [PATCH v4 2/8] drm/vc4: hdmi: Remove unused argument in vc4_hdmi_supports_scrambling Maxime Ripard
2022-08-29 13:47 ` [PATCH v4 3/8] drm/vc4: hdmi: Remove mutex in detect Maxime Ripard
2022-08-29 13:47 ` [PATCH v4 4/8] drm/vc4: hdmi: Simplify the hotplug handling Maxime Ripard
2022-09-05 17:38   ` Ville Syrjälä
2022-09-09 14:36     ` Maxime Ripard
2022-09-09 14:49       ` Ville Syrjälä
2022-08-29 13:47 ` [PATCH v4 5/8] drm/vc4: hdmi: Switch to detect_ctx Maxime Ripard
2022-08-29 13:47 ` [PATCH v4 6/8] drm/vc4: hdmi: Move vc4_hdmi_supports_scrambling() around Maxime Ripard
2022-08-29 13:47 ` [PATCH v4 7/8] drm/vc4: hdmi: Reset link on hotplug Maxime Ripard
2022-08-29 13:47 ` Maxime Ripard [this message]
2022-09-13 15:25 ` [PATCH v4 0/8] drm/vc4: Reset HDMI link at hotplug 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=20220829134731.213478-9-maxime@cerno.tech \
    --to=maxime@cerno.tech \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dom@raspberrypi.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=phil@raspberrypi.com \
    --cc=tim.gover@raspberrypi.com \
    --cc=tzimmermann@suse.de \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox