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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56416C433F5 for ; Thu, 3 Mar 2022 16:46:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235142AbiCCQrJ convert rfc822-to-8bit (ORCPT ); Thu, 3 Mar 2022 11:47:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbiCCQrH (ORCPT ); Thu, 3 Mar 2022 11:47:07 -0500 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EBB4144F6C; Thu, 3 Mar 2022 08:46:22 -0800 (PST) Date: Thu, 03 Mar 2022 16:46:08 +0000 From: Paul Cercueil Subject: Re: [PATCH v16 1/4] drm/bridge: dw-hdmi: introduce dw_hdmi_enable_poll() To: Neil Armstrong Cc: "H. Nikolaus Schaller" , Andrzej Hajda , Robert Foss , Paul Boddie , Laurent Pinchart , Jernej Skrabec , David Airlie , Daniel Vetter , Maxime Ripard , Kieran Bingham , letux-kernel@openphoenux.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Jonas Karlman Message-Id: In-Reply-To: <983e9064-17ad-e646-f37d-ca9173ba0967@baylibre.com> References: <983e9064-17ad-e646-f37d-ca9173ba0967@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Neil, Le jeu., mars 3 2022 at 17:23:02 +0100, Neil Armstrong a écrit : > 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; >> } >> +void dw_hdmi_enable_poll(struct dw_hdmi *hdmi, bool enable) >> +{ >> + if (hdmi->bridge.dev) >> + hdmi->bridge.dev->mode_config.poll_enabled = 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); >>  #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 ? According to the CI20 schematic, it is wired properly. So that's strange. > > In this case I think the Ingenic DRM core should call > drm_kms_helper_poll_init(drm) instead. Yes, the ingenic-drm driver does not poll for connectors because until now it never has been needed. Cheers, -Paul 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 28E52C433F5 for ; Thu, 3 Mar 2022 16:46:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 461B810E2C9; Thu, 3 Mar 2022 16:46:23 +0000 (UTC) Received: from aposti.net (aposti.net [89.234.176.197]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0DD0110E2C9 for ; Thu, 3 Mar 2022 16:46:22 +0000 (UTC) Date: Thu, 03 Mar 2022 16:46:08 +0000 From: Paul Cercueil Subject: Re: [PATCH v16 1/4] drm/bridge: dw-hdmi: introduce dw_hdmi_enable_poll() To: Neil Armstrong Message-Id: In-Reply-To: <983e9064-17ad-e646-f37d-ca9173ba0967@baylibre.com> References: <983e9064-17ad-e646-f37d-ca9173ba0967@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable 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: Paul Boddie , Maxime Ripard , Jonas Karlman , David Airlie , "H. Nikolaus Schaller" , dri-devel@lists.freedesktop.org, linux-mips@vger.kernel.org, Jernej Skrabec , linux-kernel@vger.kernel.org, Kieran Bingham , Robert Foss , Andrzej Hajda , letux-kernel@openphoenux.org, Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Neil, Le jeu., mars 3 2022 at 17:23:02 +0100, Neil Armstrong=20 a =E9crit : > Hi, >=20 > On 26/02/2022 18:12, H. Nikolaus Schaller wrote: >> so that specialization drivers like ingenic-dw-hdmi can enable=20 >> polling. >>=20 >> 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(+) >>=20 >> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c=20 >> 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=20 >> *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=20 >> 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=20 >> 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__ */ >=20 > As I understand, this is because the IRQ line of the dw-hdmi IP isn't=20 > connected right ? and you use the display-connector ddc gpio instead ? According to the CI20 schematic, it is wired properly. So that's=20 strange. >=20 > In this case I think the Ingenic DRM core should call=20 > drm_kms_helper_poll_init(drm) instead. Yes, the ingenic-drm driver does not poll for connectors because until=20 now it never has been needed. Cheers, -Paul