Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1077833pxm; Wed, 23 Feb 2022 17:32:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3Um1ZS11GdAmMhJ3zOPkHviC54VCQMEbjlUjtZaVC6mX7TfBvdMykAujYU0hFTRrl73YE X-Received: by 2002:a17:902:cccf:b0:14e:eb44:40a1 with SMTP id z15-20020a170902cccf00b0014eeb4440a1mr231474ple.111.1645666358966; Wed, 23 Feb 2022 17:32:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645666358; cv=none; d=google.com; s=arc-20160816; b=ga9eXgaLmxmVv4G4pS2ciqIfr7GbRKqiXmOveQP89/NoFAvQ5f0PeynvyOSYTmb2IR 4Jc8Zy2/YYyFCKbuudj2XHXHKZdnEkUVyVz4UQF3i1FCvZ+GqWWaPviClY0+85T90EgP 73dyLp8vVJRqyiPybUahJRBMRMlHvoZrxmK9Xaga5gTJdaJ2tZ9dRDJuCGLnSiIFIT57 TrWfksWFU6URPoFq9UZrUCWL3r+nMNoTVB4pv/1n5yNje0uJxYZapUQIbStv5yVRQg7U wy5WczxqE5ANWaRddAwBNvPc69E3gPbS9UHYTKyPMraSTH3SCgrcRMAih7Bo0J2Pzt7q 3wsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=SStoIzsey4DeDGjthiaFQ4iCU3nB/5rL/KRO6DigtTI=; b=JxCrp+eRLRjZl8qlZZ1JbrjrCBYio0m7ZEce87D9+0d5AlHGbRElCOAgNe116vuTEV CkObfASfG20sxdamMOG4u9HaytpyRtDmhJIcfIPSOpUifT8H2ElAHC7mM9VavSvSW13v UdcaNrZh8edaw2PhHisnjFYPhQVCyfIjIzr89cMFUxKbzf4FAogJ8CI7lVtg/GUf4dYH HFwUDXuhO4kWi6FyA4MeKtX4gkwgD1MYvd/En7zYoG8UlqVtIxcKIFKFs7xhyv/IS+Hx ODARsfaZ/1dk8gQkk60B1+YfR/mvxoFhviW1FQrF1yR9js0Id7kHMCBQeBQB9ZFrvXUX cEZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=PDUabE6H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d3si1435479plh.437.2022.02.23.17.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 17:32:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=PDUabE6H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A978E33881; Wed, 23 Feb 2022 17:11:44 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243079AbiBWRDJ (ORCPT + 99 others); Wed, 23 Feb 2022 12:03:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237984AbiBWRDG (ORCPT ); Wed, 23 Feb 2022 12:03:06 -0500 X-Greylist: delayed 2711 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 23 Feb 2022 09:02:38 PST Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7107F4579D for ; Wed, 23 Feb 2022 09:02:38 -0800 (PST) Received: from pendragon.ideasonboard.com (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 99654DD; Wed, 23 Feb 2022 18:02:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1645635756; bh=SvlZHJRiZswjknEFYhFrfKWl4f8Xti/yiyOf1LPWSMk=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=PDUabE6HxtUCdOf5fNx+COIvK7IA9sWQZwerh/XD51hOKfLqOO/irzLdJ7hUsFGvP 5eZlKUn2b7ejHGcY3o658fGcZzq3h/Mk+k1/r/IRYzdFKQAFYmH7GwsrEqHvo6unxd fU1uG7d6MkuVVyQJ/htGIk0mUSbUPYQuWopMz15E= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20211225063151.2110878-1-nikita.yoush@cogentembedded.com> <164563304251.4066078.10022034509552549983@Monstersaurus> Subject: Re: [PATCH] drm/bridge_connector: enable HPD by default if supported From: Kieran Bingham Cc: Nikita Yushchenko , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Jacopo Mondi , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org To: Laurent Pinchart Date: Wed, 23 Feb 2022 17:02:33 +0000 Message-ID: <164563575394.4066078.17104997030535169083@Monstersaurus> User-Agent: alot/0.10 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Laurent Pinchart (2022-02-23 16:25:28) > Hello, >=20 > On Wed, Feb 23, 2022 at 04:17:22PM +0000, Kieran Bingham wrote: > > Quoting Laurent Pinchart (2021-12-29 23:44:29) > > > On Sat, Dec 25, 2021 at 09:31:51AM +0300, Nikita Yushchenko wrote: > > > > Hotplug events reported by bridge drivers over drm_bridge_hpd_notif= y() > > > > get ignored unless somebody calls drm_bridge_hpd_enable(). When the > > > > connector for the bridge is bridge_connector, such a call is done f= rom > > > > drm_bridge_connector_enable_hpd(). > > > >=20 > > > > However drm_bridge_connector_enable_hpd() is never called on init p= aths, > > > > documentation suggests that it is intended for suspend/resume paths. > > >=20 > > > Hmmmm... I'm in two minds about this. The problem description is > > > correct, but I wonder if HPD should be enabled unconditionally here, = or > > > if this should be left to display drivers to control. > > > drivers/gpu/drm/imx/dcss/dcss-kms.c enables HPD manually at init time, > > > other drivers don't. > > >=20 > > > It feels like this should be under control of the display controller > > > driver, but I can't think of a use case for not enabling HPD at init > > > time. Any second opinion from anyone ? > >=20 > > This patch solves an issue I have where I have recently enabled HPD on > > the SN65DSI86, but without this, I do not get calls to my .hpd_enable or > > .hpd_disable hooks that I have added to the ti_sn_bridge_funcs. > >=20 > > So it needs to be enabled somewhere, and this seems reasonable to me? > > It's not directly related to the display controller - as it's a factor > > of the bridge? > >=20 > > On Falcon-V3U with HPD additions to SN65DSI86: > > Tested-by: Kieran Bingham >=20 > If you think this is right, then >=20 > Reviewed-by: Laurent Pinchart I do, and at the very least it works for me, and fixes Nikita's issue so to me that's enough for: Reviewed-by: Kieran Bingham > > > > In result, once encoders are switched to bridge_connector, > > > > bridge-detected HPD stops working. > > > >=20 > > > > This patch adds a call to that API on init path. > > > >=20 > > > > This fixes HDMI HPD with rcar-du + adv7513 case when adv7513 report= s HPD > > > > events via interrupts. > > > >=20 > > > > Fixes: c24110a8fd09 ("drm: rcar-du: Use drm_bridge_connector_init()= helper") > > > > Signed-off-by: Nikita Yushchenko > > > > --- > > > > drivers/gpu/drm/drm_bridge_connector.c | 4 +++- > > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > >=20 > > > > diff --git a/drivers/gpu/drm/drm_bridge_connector.c b/drivers/gpu/d= rm/drm_bridge_connector.c > > > > index 791379816837..4f20137ef21d 100644 > > > > --- a/drivers/gpu/drm/drm_bridge_connector.c > > > > +++ b/drivers/gpu/drm/drm_bridge_connector.c > > > > @@ -369,8 +369,10 @@ struct drm_connector *drm_bridge_connector_ini= t(struct drm_device *drm, > > > > connector_type, ddc); > > > > drm_connector_helper_add(connector, &drm_bridge_connector_hel= per_funcs); > > > > =20 > > > > - if (bridge_connector->bridge_hpd) > > > > + if (bridge_connector->bridge_hpd) { > > > > connector->polled =3D DRM_CONNECTOR_POLL_HPD; > > > > + drm_bridge_connector_enable_hpd(connector); > > > > + } > > > > else if (bridge_connector->bridge_detect) > > > > connector->polled =3D DRM_CONNECTOR_POLL_CONNECT > > > > | DRM_CONNECTOR_POLL_DISCONNECT; >=20 > --=20 > Regards, >=20 > Laurent Pinchart