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 871C9C433EF for ; Fri, 4 Mar 2022 17:51:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238201AbiCDRwa (ORCPT ); Fri, 4 Mar 2022 12:52:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230329AbiCDRw0 (ORCPT ); Fri, 4 Mar 2022 12:52:26 -0500 Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [85.215.255.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF9BBE2353; Fri, 4 Mar 2022 09:51:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1646416275; 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=pbJ/izb78bVdwuR4MYf9VVhUxqicsYulwbQkTTCSBwM=; b=katPOD+4huyK+8FoW/A8yCoviUIJ8FZhwehgLb5JN0/xTFQKFEKQNcy2bx+LAvg1hC 6R9BZ4fKqOUNgHDPhGj7hbzAVHz7GrhCV5avWuiruyUrpmJuG8d39UgeAIdwExLMWRTG 8pr06bxaZZlx6CnIzDwI6cKUxO4kSiTgZh3W3nfKL6vcGA5Ff+X9bfIYGWY/L1rlcGqP dgVcMjI3T0fihYNCZwY1HCkaJzmH0My83GEJ7yWj0bEStvtyrFvxAPgbtZ0VWxE6JCAy 5o19otPyUIXmocoa4Fd9SpdLAZQdIGm32fYd565iCAfKBvCn6eiEQHuX39bPWK5TxgkJ BRAQ== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj7gpw91N5y2S3i8QUWw==" X-RZG-CLASS-ID: mo00 Received: from imac.fritz.box by smtp.strato.de (RZmta 47.40.1 DYNA|AUTH) with ESMTPSA id n729cey24HpE7ZY (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); Fri, 4 Mar 2022 18:51:14 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: [Letux-kernel] [PATCH v16 1/4] drm/bridge: dw-hdmi: introduce dw_hdmi_enable_poll() From: "H. Nikolaus Schaller" In-Reply-To: Date: Fri, 4 Mar 2022 18:51:14 +0100 Cc: 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 Content-Transfer-Encoding: quoted-printable Message-Id: <929BF693-D54F-40F0-BB61-520301D1C31F@goldelico.com> References: <983e9064-17ad-e646-f37d-ca9173ba0967@baylibre.com> <3E620AF4-402E-45EA-9D92-92EAEA9647F5@goldelico.com> To: Paul Cercueil , Neil Armstrong X-Mailer: Apple Mail (2.3445.104.21) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, Neil, > Am 04.03.2022 um 17:47 schrieb Paul Cercueil : >=20 > =46rom 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. 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 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 DA6E5C433EF for ; Fri, 4 Mar 2022 17:51:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A08D112C57; Fri, 4 Mar 2022 17:51:37 +0000 (UTC) Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [85.215.255.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id AF2DA112C57 for ; Fri, 4 Mar 2022 17:51:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1646416275; 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=pbJ/izb78bVdwuR4MYf9VVhUxqicsYulwbQkTTCSBwM=; b=katPOD+4huyK+8FoW/A8yCoviUIJ8FZhwehgLb5JN0/xTFQKFEKQNcy2bx+LAvg1hC 6R9BZ4fKqOUNgHDPhGj7hbzAVHz7GrhCV5avWuiruyUrpmJuG8d39UgeAIdwExLMWRTG 8pr06bxaZZlx6CnIzDwI6cKUxO4kSiTgZh3W3nfKL6vcGA5Ff+X9bfIYGWY/L1rlcGqP dgVcMjI3T0fihYNCZwY1HCkaJzmH0My83GEJ7yWj0bEStvtyrFvxAPgbtZ0VWxE6JCAy 5o19otPyUIXmocoa4Fd9SpdLAZQdIGm32fYd565iCAfKBvCn6eiEQHuX39bPWK5TxgkJ BRAQ== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj7gpw91N5y2S3i8QUWw==" X-RZG-CLASS-ID: mo00 Received: from imac.fritz.box by smtp.strato.de (RZmta 47.40.1 DYNA|AUTH) with ESMTPSA id n729cey24HpE7ZY (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); Fri, 4 Mar 2022 18:51:14 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: [Letux-kernel] [PATCH v16 1/4] drm/bridge: dw-hdmi: introduce dw_hdmi_enable_poll() From: "H. Nikolaus Schaller" In-Reply-To: Date: Fri, 4 Mar 2022 18:51:14 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <929BF693-D54F-40F0-BB61-520301D1C31F@goldelico.com> References: <983e9064-17ad-e646-f37d-ca9173ba0967@baylibre.com> <3E620AF4-402E-45EA-9D92-92EAEA9647F5@goldelico.com> To: Paul Cercueil , Neil Armstrong X-Mailer: Apple Mail (2.3445.104.21) 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 , Jonas Karlman , David Airlie , dri-devel , linux-mips , Robert Foss , linux-kernel , Kieran Bingham , Maxime Ripard , Andrzej Hajda , Discussions about the Letux Kernel , Jernej Skrabec , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Paul, Neil, > Am 04.03.2022 um 17:47 schrieb Paul Cercueil : >=20 > =46rom 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. 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