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 CBCB0C433EF for ; Fri, 4 Mar 2022 18:04:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241375AbiCDSFZ convert rfc822-to-8bit (ORCPT ); Fri, 4 Mar 2022 13:05:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234099AbiCDSFW (ORCPT ); Fri, 4 Mar 2022 13:05:22 -0500 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49CE0B1A; Fri, 4 Mar 2022 10:04:33 -0800 (PST) Date: Fri, 04 Mar 2022 18:04:20 +0000 From: Paul Cercueil Subject: Re: [Letux-kernel] [PATCH v16 1/4] drm/bridge: dw-hdmi: introduce dw_hdmi_enable_poll() To: "H. Nikolaus Schaller" Cc: Neil Armstrong , Paul Boddie , Andrzej Hajda , Maxime Ripard , Jonas Karlman , David Airlie , Robert Foss , linux-mips , dri-devel , linux-kernel , Kieran Bingham , Jernej Skrabec , Discussions about the Letux Kernel , Laurent Pinchart Message-Id: <8JF88R.9V5YQ3Q6E8QO2@crapouillou.net> In-Reply-To: <929BF693-D54F-40F0-BB61-520301D1C31F@goldelico.com> References: <983e9064-17ad-e646-f37d-ca9173ba0967@baylibre.com> <3E620AF4-402E-45EA-9D92-92EAEA9647F5@goldelico.com> <929BF693-D54F-40F0-BB61-520301D1C31F@goldelico.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 Le ven., mars 4 2022 at 18:51:14 +0100, H. Nikolaus Schaller a écrit : > Hi Paul, Neil, > >> Am 04.03.2022 um 17:47 schrieb Paul Cercueil : >> >> From what I understood in Nikolaus' last message, HDMI hotplug is >> actually correctly detected, so there's no need for polling. What is >> missing is the call to drm_kms_helper_hotplug_event *somewhere*, so >> that the information is correctly relayed to userspace. > > Exactly. > > As Maxime pointed out it should already be called by > drm_helper_hpd_irq_event() in dw_hdmi_irq() but isn't > because mode_config.poll_enabled isn't enabled. > > So we can either > a) enable mode_config.poll_enabled so that it is called by > drm_helper_hpd_irq_event() or > > b) make drm_kms_helper_hotplug_event() being called explicitly in > dw_hdmi_irq(). > We could guard that by mode_config.poll_enabled to avoid > drm_kms_helper_hotplug_event() > being called twice (but I think the "changed" mechanism will take > care of). > >> I think this issue can be fixed by calling >> drm_bridge_connector_enable_hpd() on the connector in >> ingenic-drm-drv.c. > > I don't see yet how this would solve it, but it may work. dw_hdmi_irq() calls drm_bridge_hpd_notify(), which would call bridge->hpd_cb() if it was non-NULL. Calling drm_bridge_connector_enable_hpd() will set the bridge->hpd_cb() callback to point to drm_bridge_connector_hpd_cb(), which itself will call drm_kms_helper_hotplug_event(). Therefore, all that is missing is one call to drm_bridge_connector_enable_hpd(). Cheers, -Paul > > Anyways, this all is a missing feature (sometimes called "bug") of > the *dw-hdmi driver* and IMHO > neither of the connector nor the ingenic-drm-drv. > > So I think it should not be solved outside dw-hdmi. > > BR and thanks, > Nikolaus >