Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp759266pxb; Tue, 14 Sep 2021 08:09:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrfiL/she9IrGDs912wAZ3GodWbeK1y1Lrj+tcsx5eYeiGQgZKqTYf7FKfhDJ0W1SVraYN X-Received: by 2002:a05:6512:695:: with SMTP id t21mr13313316lfe.157.1631632188273; Tue, 14 Sep 2021 08:09:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631632188; cv=none; d=google.com; s=arc-20160816; b=RUvIU5s/gVduMA4tjIUV5E1L0TKlikuP/rwaakzkEfw4a2PW1YTyD90cVSbXntEaL7 LCyN2Jn6fJM4xnCKRs3sNOnRyonCsV/ZQZTQoe5jzKVt525y2EjReOI71U2ugNU4htEB UizowLLv9NXwIX/uzapzQqc5c1urQiCA0jA98JKwVXkfJPEXv3gkpG0KWXCV2cr//83E OGBqtcYBwvyLpKXdN/owidWxa8uqh3KxeKDE6P0bqNS7ltU/F0skwln4SOXaaeFtQFeO YkkFX2cUp/Zek8kHeAh0cNlzoKhfT/wRtMIy8mMWxTuta81ord0XladjCYvDT56ZF3Nc giuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature :dkim-signature; bh=rnQbpsTt6i5vx40awBDFenSY/gcrAOQUGKmQtJF7l2k=; b=xYq4SY4LP3ac5eepr1hpnXKwzwlakkvKFEegY2ZMMLNdmMDD8IQMF0KhfCgsDf0fiu jVc2TdUxBHswVKNseFRVwJ2ER5qoVn9AD2ebM09F2ayW0Bs8r57X694lqPwnxotd1eEn ekkuRSHS38pMqyAgQCaKd65x5D2ZOrO8k+hSDTKBYOat9LyRr5P1xX1xgnfok5K+8ZOw W7nJROh0Gzn76neTPxP/U7PDqufehLsmU1Nn6a6qCXoOsk/ik/smLS2C0+zamO1bEMhi hGacNHuGiEUksY92jJ3axyxzyr5YB6EJzpZQdQGmw02EC5aKn8Q58k+giSTMoM1acE9z yTMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=O4FE7+5b; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Jp9VAmcb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f26si17230538lfs.18.2021.09.14.08.09.19; Tue, 14 Sep 2021 08:09:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=O4FE7+5b; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Jp9VAmcb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234721AbhINPFQ (ORCPT + 99 others); Tue, 14 Sep 2021 11:05:16 -0400 Received: from wnew2-smtp.messagingengine.com ([64.147.123.27]:47431 "EHLO wnew2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234522AbhINPFN (ORCPT ); Tue, 14 Sep 2021 11:05:13 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id 6D5542B01251; Tue, 14 Sep 2021 11:03:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 14 Sep 2021 11:03:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=rnQbpsTt6i5vx40awBDFenSY/gc rAOQUGKmQtJF7l2k=; b=O4FE7+5bP6FUgUr3ttXG1/yNC+52kCHOOkeWgRCCdK2 GjPdCqN9ybUEbBNX0HCZi9aJMi3a9BIhnVb10bEV3yS4S8AaQHpEl6M2LSlXFi4N h4NMbcvfojPV2Ml3nF7nDoI+7JH5fpaGPqwgDhIeR/E10KRiDptQULY4vJWOsdUO wkPLIIX3pxAjdnJtyZlh+G93HWCpriDy4XORMk0f99S+oGiSCV6QvKx4jLkOLOLG Tp5kFSYJUZIUk63nJFL68tv6U0pMRoSl0xSjTbWO47zKQrg4nFCcdbZuaPLJlLnb N1aZXBblt/VVXCDGcn1U2PBuzfxgrMm+hv2bjmXmoAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type: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=fm3; bh=rnQbps Tt6i5vx40awBDFenSY/gcrAOQUGKmQtJF7l2k=; b=Jp9VAmcbFMPJC7M8rcw/DV Nn32peqoZCOCZFFEG7u+A9SYdfVBCx0SrYdfSXPveiN0I3BqskXcdOqLuzAwGk3z 0A0l7MZ+k93o5InxIU3v5LV7GKNkRnevheOqU12TQ2v5NgjOffwB6XDqckvYwOWY hvqEr9KxePcH+nWc48JVB2oJtduDpHjEfTRMevotvilwvFjhHVWirEVjedteEqto AvKj1ge+dVhwjlVZSaefNCRF6uEUvpNRCUH0H8yV9AHOBLyPIsUc4i8Ri6Kuqj8b 3z/1dragLz7Hkbr2nuWVWreuygUSynRhMEZPr2AFRAshf60LSHCjF9R0tUJBP5Kg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudegledgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleekgeehhfdutdeljefgleejffehfffgieejhffgueefhfdtveetgeehieeh gedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Sep 2021 11:03:52 -0400 (EDT) Date: Tue, 14 Sep 2021 17:03:50 +0200 From: Maxime Ripard To: dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Emma Anholt , linux-rpi-kernel@lists.infradead.org, Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , Sam Ravnborg , Nicolas Saenz Julienne , bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/3] drm/vc4: hdmi: Actually check for the connector status in hotplug Message-ID: <20210914150350.b6357jq2azalme4w@gilmour> References: <20210914101724.266570-1-maxime@cerno.tech> <20210914101724.266570-3-maxime@cerno.tech> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="omqsbnjfiweckfg7" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --omqsbnjfiweckfg7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Daniel, On Tue, Sep 14, 2021 at 04:34:08PM +0200, Daniel Vetter wrote: > On Tue, Sep 14, 2021 at 12:17:24PM +0200, Maxime Ripard wrote: > > The drm_helper_hpd_irq_event() documentation states that this function > > is "useful for drivers which can't or don't track hotplug interrupts for > > each connector." and that "Drivers which support hotplug interrupts for > > each connector individually and which have a more fine-grained detect > > logic should bypass this code and directly call > > drm_kms_helper_hotplug_event()". This is thus what we ended-up doing. > >=20 > > However, what this actually means, and is further explained in the > > drm_kms_helper_hotplug_event() documentation, is that > > drm_kms_helper_hotplug_event() should be called by drivers that can > > track the connection status change, and if it has changed we should call > > that function. > >=20 > > This underlying expectation we failed to provide is that the caller of > > drm_kms_helper_hotplug_event() should call drm_helper_probe_detect() to > > probe the new status of the connector. > >=20 > > Since we didn't do it, it meant that even though we were sending the > > notification to user-space and the DRM clients that something changed we > > never probed or updated our internal connector status ourselves. > >=20 > > This went mostly unnoticed since the detect callback usually doesn't > > have any side-effect. Also, if we were using the DRM fbdev emulation > > (which is a DRM client), or any user-space application that can deal > > with hotplug events, chances are they would react to the hotplug event > > by probing the connector status eventually. > >=20 > > However, now that we have to enable the scrambler in detect() if it was > > enabled it has a side effect, and an application such as Kodi or > > modetest doesn't deal with hotplug events. This resulted with a black > > screen when Kodi or modetest was running when a screen was disconnected > > and then reconnected, or switched off and on. >=20 > Uh, why are you running this scrambler restore in your probe function? I > guess it works, but most drivers that do expensive hotplug restore to > handle the "no black screen for replug" use-case handle that in their own > dedicated code. That's what I got from our discussion back in June (I think?). The discussion was about an issue we were having back then where one would disconnect / reconnect the display while it had been setup through SCDC to use the scrambler and higher bit ratio. During that power cycle (that also happens when you turn a TV off and on), the display would obviously reset its SCDC status. But if there's nothing to handle the uevent, then the same mode remains applied resulting in a blank screen. If we're not supposed to set the SCDC status again in detect(), how would we deal with this? > But those also tend to have per-output hpd interrupt sources, so maybe > that's why? We do have an per-output HPD interrupt here Maximey --omqsbnjfiweckfg7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYUC51gAKCRDj7w1vZxhR xcwiAPwOelbHH/acgSu/HJHnxZj2wwWMcLHTWegRB50IMyBHDwD/ZfXzZGwXujvG F98415jDZnBjFchPKB9vJkeHXlCeegk= =LDfj -----END PGP SIGNATURE----- --omqsbnjfiweckfg7--