Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1151697pxm; Thu, 3 Mar 2022 11:19:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZJuHFgmzfY7s8VcGP2U9WcP+6O1db+fjxddfF4Q/TbUsmirRwstvuMAIbEecyHmKCodxc X-Received: by 2002:a17:906:30d1:b0:6cf:d160:d8e4 with SMTP id b17-20020a17090630d100b006cfd160d8e4mr28576464ejb.265.1646335162413; Thu, 03 Mar 2022 11:19:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646335162; cv=none; d=google.com; s=arc-20160816; b=Tr7FU/7uK86NV40sFL8SBvmTSRu3DD1eof4LDDDMvz8FXQorLTGJ7ZwzjW4mhNYe70 lsageiDuiSK9gF1aA60I8k7/uzZlATPlYDScGK5cFX1ggc1PrDVhixBrDh9BbxiUKHb4 xfTwiSBQukLUBOb5taBiOG/Jdm/+mvocBKADwL3VsvfCmyZ467MB4drv1MHUlVghJyPy maQN9txTOw54dT1DD+f/RAJllqC7gnLYUjBklmsBFTlTMfmoCsYl9aT4hJIKc02yY6PJ DVT8wJCA1GkOuUsnEtr8K9D7Lko1X6vSmzCIFCahYtUvBLldDDv9eqpK1y31LVDE5wRG OP8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=uasWRhknaZLqfDzpjCYNCmO+ZffAW+trwexFejCCrSU=; b=N4fIQLIphA3mSAUa+gRPacp3NjbiUyJdvTdeddUDt03q70RnOEo2wEw7DIN6K3P/4f tMTZCvp0TynEmvHiJQMmuLFL8LzD0Tbty3Yqra55B8QXelnXu5DFXaOhHus0r+l63BFT sIZH6hA8j6zbdgA8Ff4iT8kBuFvDKn/U2cSlDFasQ4/bR1bHg/UfBP1T/zNYCzIPHDH8 01RjByZOye9UmL4lrFgJg1A/brIuJAxEzl/zq1DvP9kKcFvitRlUEQziS/X4vNK/nRWZ aWveH3mVuMiPDuwHjaxPEutfhqGo2xp0Jx9QS2ghZ1KmExNfKnTjLBRwbwrVmXpip0uB qMbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=bXDUo5EW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bx1-20020a0564020b4100b0041295c9096asi1896838edb.20.2022.03.03.11.18.57; Thu, 03 Mar 2022 11:19:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=bXDUo5EW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235227AbiCCRGo (ORCPT + 99 others); Thu, 3 Mar 2022 12:06:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbiCCRGn (ORCPT ); Thu, 3 Mar 2022 12:06:43 -0500 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA5B0197B54; Thu, 3 Mar 2022 09:05:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1646327146; s=strato-dkim-0002; d=goldelico.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject:Cc:Date: From:Subject:Sender; bh=uasWRhknaZLqfDzpjCYNCmO+ZffAW+trwexFejCCrSU=; b=bXDUo5EWNaKWe9/EulAf+wlVST1S15UavSqv1xfjpZnCStx28c3QOC1ypTS8/2LNWp DFXE3t4efwMIAxUR+uDtExVKEMPvym7OdhcuojP5kfhKT6ZQEv2cSqQRnoohuGNXEa+I mvOSqa1SxSyp4WNX9OSKCen1sYxxHU25orbHWtgVO8/BJK99g06fPXbRdPJZLmDy0Z4q 97cszrURtagoCfJhP8QxDu3999YtJwQcjNd699ZxW8YYqwRY9+zOHOl3kYo8bSovIi8Y nKI/1/200kZaI+AC5VXNA2RSH/NuwtGXuu3Sbsa+qFuydaT+wzdgTN2brol8h2SEp1v/ 9NIQ== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj4Qpw9iZeHWElw47tT+k=" X-RZG-CLASS-ID: mo00 Received: from imac.fritz.box by smtp.strato.de (RZmta 47.40.1 DYNA|AUTH) with ESMTPSA id n729cey23H5k0WZ (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Thu, 3 Mar 2022 18:05:46 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: [PATCH v16 1/4] drm/bridge: dw-hdmi: introduce dw_hdmi_enable_poll() From: "H. Nikolaus Schaller" In-Reply-To: Date: Thu, 3 Mar 2022 18:05:45 +0100 Cc: Andrzej Hajda , Robert Foss , Paul Boddie , Laurent Pinchart , Jernej Skrabec , David Airlie , Daniel Vetter , Maxime Ripard , Kieran Bingham , Discussions about the Letux Kernel , linux-mips , linux-kernel , dri-devel , Jonas Karlman Content-Transfer-Encoding: quoted-printable Message-Id: References: <983e9064-17ad-e646-f37d-ca9173ba0967@baylibre.com> To: Paul Cercueil , Neil Armstrong X-Mailer: Apple Mail (2.3445.104.21) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi Paul and Neil, > Am 03.03.2022 um 17:46 schrieb Paul Cercueil : >=20 > Hi Neil, >=20 > Le jeu., mars 3 2022 at 17:23:02 +0100, Neil Armstrong = a =C3=A9crit : >> Hi, >> On 26/02/2022 18:12, H. Nikolaus Schaller wrote: >>> so that specialization drivers like ingenic-dw-hdmi can enable = polling. >>> Signed-off-by: H. Nikolaus Schaller >>> --- >>> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 9 +++++++++ >>> include/drm/bridge/dw_hdmi.h | 1 + >>> 2 files changed, 10 insertions(+) >>> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c = b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c >>> index 4befc104d2200..43e375da131e8 100644 >>> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c >>> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c >>> @@ -3217,6 +3217,15 @@ static int dw_hdmi_parse_dt(struct dw_hdmi = *hdmi) >>> return 0; >>> } >>> =7F+void dw_hdmi_enable_poll(struct dw_hdmi *hdmi, bool enable) >>> +{ >>> + if (hdmi->bridge.dev) >>> + hdmi->bridge.dev->mode_config.poll_enabled =3D enable; >>> + else >>> + dev_warn(hdmi->dev, "no hdmi->bridge.dev"); >>> +} >>> +EXPORT_SYMBOL_GPL(dw_hdmi_enable_poll); >>> + >>> struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev, >>> const struct dw_hdmi_plat_data *plat_data) >>> { >>> diff --git a/include/drm/bridge/dw_hdmi.h = b/include/drm/bridge/dw_hdmi.h >>> index 2a1f85f9a8a3f..963960794b40e 100644 >>> --- a/include/drm/bridge/dw_hdmi.h >>> +++ b/include/drm/bridge/dw_hdmi.h >>> @@ -196,5 +196,6 @@ enum drm_connector_status = dw_hdmi_phy_read_hpd(struct dw_hdmi *hdmi, >>> void dw_hdmi_phy_update_hpd(struct dw_hdmi *hdmi, void *data, >>> bool force, bool disabled, bool rxsense); >>> void dw_hdmi_phy_setup_hpd(struct dw_hdmi *hdmi, void *data); >>> +void dw_hdmi_enable_poll(struct dw_hdmi *hdmi, bool enable); >>> =7F #endif /* __IMX_HDMI_H__ */ >> As I understand, this is because the IRQ line of the dw-hdmi IP isn't = connected right ? and you use the display-connector ddc gpio instead ? Ah, I should finish work for today since I am no longer reading every = word properly... No, we do NOT use the display connector for HPD. We use HPD of the = dw-hdmi. Either IRQ is not enabled properly or not working in IRQ mode. But it works if polling is enabled. >=20 > According to the CI20 schematic, it is wired properly. So that's = strange. Yes, HTPLG input goes through an 1k=CE=A9 + 1=C2=B5F low-pass filter to = debounce HDMI_HTPLG. This goes to the HPD (BGA ball N19). There is an optional Q14 driving HDMI_DETE_N. This could become the hpd-gpios property of the connector in the device = tree. But it is optional. So we have to use dw-hdmi HPD and make it work (in combination with a = chained hdmi-connector). >=20 >> In this case I think the Ingenic DRM core should call = drm_kms_helper_poll_init(drm) instead. >=20 > Yes, the ingenic-drm driver does not poll for connectors because until = now it never has been needed. Well, if we go back a while we only needed it after introducing the = hdmi-connectors and making dw-hdmi a bridge. Originally the dw-hdmi driver did properly take care of everything (by = registering its own connector). BR and thanks, Nikolaus