From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4226FC4332F for ; Tue, 2 Nov 2021 15:00:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 11832608FE for ; Tue, 2 Nov 2021 15:00:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 11832608FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6B84772E73; Tue, 2 Nov 2021 15:00:05 +0000 (UTC) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5AB1A72E73 for ; Tue, 2 Nov 2021 15:00:02 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id AD48458073F; Tue, 2 Nov 2021 11:00:01 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 02 Nov 2021 11:00:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=OU2HD3rgFjPFq FMFWQFE8De0dM5d23O32iZXA/DHX5A=; b=Wc1jMORhtveulRCnB2X4/L4YpfVc0 UcwtzSeRJ+ekutCmPJrdn8yPj/iBOr1yqpUML/Y7hns+UcXGSgeYYMj5H4Zy+gAr UM6UISYB+k/oUAD3k4HLEhEiKaOhawrAGumwjdVzVNk9Za93f6tgMGfrN9XqTdNg /uuM+ejSDuyeUiRE1HiuTlrw4uiGQ+M6B8Z8gVwZdWkNILmfisW3uegrup4ONsP7 /dE+KHTLKfTq91iwpGmrCgGlX82PQoDxm6jiRRgzgh3bOf1rUu++Xg23WgDsaaps UXkdtsEGe85M+S4uqK+4issbdzx6UvgXKIiMpgHoMmVl821eyvHLJgTGw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=OU2HD3rgFjPFqFMFWQFE8De0dM5d23O32iZXA/DHX5A=; b=OjLsTFjS ChbTsK8OFxcRA3R81xWZjvEmbsWSuFVL2TdHvnAiM2ShoJVdA9zS83zm0DTR6m1Q 4YZyxjrolZfTDTH7N3H9vCmxrZ6UedeDuQF5vddG/3ZhaYag8gmbCLHFd5uYVYU/ UfRtCndy2ptiEVS466614rTRxO590cXwrZJuJSvceHZ88SfvBzLV54iZlOrO0ul4 zgBy+yTCg/K5hq6CMie1UzIy5AqUwNizStiXMPyIU1Xs26SRmZ8NUOu76KGmZlny 4rP7IMobPh7Y2nwAqXSsY4Oim3Bj4on0qrDhiN9Re1TFzsPTNx1SjMwamqtrsSu4 MhtMKgaQtkEJqw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrtddtgdegiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 2 Nov 2021 11:00:01 -0400 (EDT) From: Maxime Ripard To: Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Subject: [PATCH 05/13] drm/scdc: Document hotplug gotchas Date: Tue, 2 Nov 2021 15:59:36 +0100 Message-Id: <20211102145944.259181-6-maxime@cerno.tech> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211102145944.259181-1-maxime@cerno.tech> References: <20211102145944.259181-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dom Cobley , Tim Gover , Dave Stevenson , dri-devel@lists.freedesktop.org, Phil Elwell Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- drivers/gpu/drm/drm_scdc_helper.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/drm_scdc_helper.c b/drivers/gpu/drm/drm_scdc_helper.c index 48a382464d54..033a9e407acb 100644 --- a/drivers/gpu/drm/drm_scdc_helper.c +++ b/drivers/gpu/drm/drm_scdc_helper.c @@ -34,6 +34,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 call + * drm_atomic_helper_connector_hdmi_reset_link() in + * drm_connector_helper_funcs.detect_ctx(). */ #define SCDC_I2C_SLAVE_ADDRESS 0x54 -- 2.32.0