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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82844C388F9 for ; Sun, 8 Nov 2020 09:53:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D1FA7206ED for ; Sun, 8 Nov 2020 09:53:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="b8eE2Nd/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D1FA7206ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Cy4yjgsWhgjDakDALGM+MMtSrzQRB9HI9Im51VLb6uI=; b=b8eE2Nd/VuxWKQxQGJ5k39XBA 60Ki7RxAEulNV8f7FQ27zrv4t1UrGr7IOt2H6zghI0gEcOkcsElB1f0gClbAVrw/qhxz1zO7WKEJ2 R5az9ohoI8iOFfozkId56qlTKKmYVZUc80orzx/pYA1qInUNtVrGTGnVbsAkhbPWDxBcjciVwbjM8 FggzBarCDf+mIwLf0xpl9SHBGoono2fcbYz5Ix16PnALruUgDG1KAocu3ru/5OP+j86am0kn+sBM5 hFjlQ+V0IAW29zkbFKmajUj4r6yk3giq7DtLgvhqtGHGXPLIPet5l2sNCPuCQcP4OPPJeVepwZ58q ODX5shdIA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbhOE-0004fi-CO; Sun, 08 Nov 2020 09:53:38 +0000 Received: from asavdk4.altibox.net ([109.247.116.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbhOA-0004eY-Da; Sun, 08 Nov 2020 09:53:35 +0000 Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id 0A07E8051F; Sun, 8 Nov 2020 10:53:23 +0100 (CET) Date: Sun, 8 Nov 2020 10:53:22 +0100 From: Sam Ravnborg To: Jonathan Liu , Russell King Subject: Re: [PATCH] drm: bridge: dw-hdmi: Avoid resetting force in the detect function Message-ID: <20201108095322.GA1129714@ravnborg.org> References: <20201031081747.372599-1-net147@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201031081747.372599-1-net147@gmail.com> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=VafZwmh9 c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=e5mUnYsNAAAA:8 a=O2yIyfgj_DPdiSikqUcA:9 a=CjuIK1q_8ugA:10 a=Vxmtnl_E_bksehYqCbjh:22 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201108_045334_590790_8BBAFED3 X-CRM114-Status: GOOD ( 20.56 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , Jernej Skrabec , Jonas Karlman , David Airlie , Neil Armstrong , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Andrzej Hajda , linux-rockchip@lists.infradead.org, Boris Brezillon , Laurent Pinchart , Russell King , Liu Ying , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Russell, On Sat, Oct 31, 2020 at 07:17:47PM +1100, Jonathan Liu wrote: > It has been observed that resetting force in the detect function can > result in the PHY being powered down in response to hot-plug detect > being asserted, even when the HDMI connector is forced on. > > Enabling debug messages and adding a call to dump_stack() in > dw_hdmi_phy_power_off() shows the following in dmesg: > [ 160.637413] dwhdmi-rockchip ff940000.hdmi: EVENT=plugin > [ 160.637433] dwhdmi-rockchip ff940000.hdmi: PHY powered down in 0 iterations > > Call trace: > dw_hdmi_phy_power_off > dw_hdmi_phy_disable > dw_hdmi_update_power > dw_hdmi_detect > dw_hdmi_connector_detect > drm_helper_probe_detect_ctx > drm_helper_hpd_irq_event > dw_hdmi_irq > irq_thread_fn > irq_thread > kthread > ret_from_fork > > Fixes: 381f05a7a842 ("drm: bridge/dw_hdmi: add connector mode forcing") > Signed-off-by: Jonathan Liu you are the original author of this code - any comments on this patch? Sam > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > index 748df1cacd2b..0c79a9ba48bb 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -2327,12 +2327,6 @@ static enum drm_connector_status dw_hdmi_detect(struct dw_hdmi *hdmi) > { > enum drm_connector_status result; > > - mutex_lock(&hdmi->mutex); > - hdmi->force = DRM_FORCE_UNSPECIFIED; > - dw_hdmi_update_power(hdmi); > - dw_hdmi_update_phy_mask(hdmi); > - mutex_unlock(&hdmi->mutex); > - > result = hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data); > > mutex_lock(&hdmi->mutex); > -- > 2.29.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip 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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0F49C388F2 for ; Sun, 8 Nov 2020 09:54:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8921A206ED for ; Sun, 8 Nov 2020 09:54:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ICFatg+g" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8921A206ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3p8/xOLsWgYC1KcQTDngDG1bW1pVxOOYZ4UajuFUT0I=; b=ICFatg+gbonqr9aIuk0Wb5yyE F9nNdikBasZnbE5hJyqc2UosgDAArl7ehE8AL5Hp9zrRZPxexkQWCzNhBStMZPsV+Qehr+ig7O9rw IDLE7G98LX1Y5vpP3InE970AkbZtnRw9q4zsELhGdmEobaLQBSlpdXa63xftSJpw5z8GG9rC12EKd fBY+JFaV9t86qkEZgAZ+6LDJ7cjLL/z57sPJh/FpfTZAaHVcqnQtR9twdhKe3Yf6f9OgHJAwpKxhx Vf97DH3JVmMWmM/DAzxMgbjvrTU2qHpIax+9Vf3ougxpB8p2RzhPM+Mu12lHZDvw5iXYdnlnsrxjR UZ3MmzG8w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbhOD-0004fW-7k; Sun, 08 Nov 2020 09:53:37 +0000 Received: from asavdk4.altibox.net ([109.247.116.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbhOA-0004eY-Da; Sun, 08 Nov 2020 09:53:35 +0000 Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id 0A07E8051F; Sun, 8 Nov 2020 10:53:23 +0100 (CET) Date: Sun, 8 Nov 2020 10:53:22 +0100 From: Sam Ravnborg To: Jonathan Liu , Russell King Subject: Re: [PATCH] drm: bridge: dw-hdmi: Avoid resetting force in the detect function Message-ID: <20201108095322.GA1129714@ravnborg.org> References: <20201031081747.372599-1-net147@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201031081747.372599-1-net147@gmail.com> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=VafZwmh9 c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=e5mUnYsNAAAA:8 a=O2yIyfgj_DPdiSikqUcA:9 a=CjuIK1q_8ugA:10 a=Vxmtnl_E_bksehYqCbjh:22 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201108_045334_590790_8BBAFED3 X-CRM114-Status: GOOD ( 20.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , Jernej Skrabec , Jonas Karlman , David Airlie , Neil Armstrong , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Andrzej Hajda , linux-rockchip@lists.infradead.org, Boris Brezillon , Laurent Pinchart , Russell King , Liu Ying , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Russell, On Sat, Oct 31, 2020 at 07:17:47PM +1100, Jonathan Liu wrote: > It has been observed that resetting force in the detect function can > result in the PHY being powered down in response to hot-plug detect > being asserted, even when the HDMI connector is forced on. > > Enabling debug messages and adding a call to dump_stack() in > dw_hdmi_phy_power_off() shows the following in dmesg: > [ 160.637413] dwhdmi-rockchip ff940000.hdmi: EVENT=plugin > [ 160.637433] dwhdmi-rockchip ff940000.hdmi: PHY powered down in 0 iterations > > Call trace: > dw_hdmi_phy_power_off > dw_hdmi_phy_disable > dw_hdmi_update_power > dw_hdmi_detect > dw_hdmi_connector_detect > drm_helper_probe_detect_ctx > drm_helper_hpd_irq_event > dw_hdmi_irq > irq_thread_fn > irq_thread > kthread > ret_from_fork > > Fixes: 381f05a7a842 ("drm: bridge/dw_hdmi: add connector mode forcing") > Signed-off-by: Jonathan Liu you are the original author of this code - any comments on this patch? Sam > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > index 748df1cacd2b..0c79a9ba48bb 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -2327,12 +2327,6 @@ static enum drm_connector_status dw_hdmi_detect(struct dw_hdmi *hdmi) > { > enum drm_connector_status result; > > - mutex_lock(&hdmi->mutex); > - hdmi->force = DRM_FORCE_UNSPECIFIED; > - dw_hdmi_update_power(hdmi); > - dw_hdmi_update_phy_mask(hdmi); > - mutex_unlock(&hdmi->mutex); > - > result = hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data); > > mutex_lock(&hdmi->mutex); > -- > 2.29.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7B03C388F9 for ; Sun, 8 Nov 2020 09:53:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0CC06206ED for ; Sun, 8 Nov 2020 09:53:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CC06206ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3200289F2A; Sun, 8 Nov 2020 09:53:30 +0000 (UTC) Received: from asavdk4.altibox.net (asavdk4.altibox.net [109.247.116.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id A255589F2A for ; Sun, 8 Nov 2020 09:53:28 +0000 (UTC) Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id 0A07E8051F; Sun, 8 Nov 2020 10:53:23 +0100 (CET) Date: Sun, 8 Nov 2020 10:53:22 +0100 From: Sam Ravnborg To: Jonathan Liu , Russell King Subject: Re: [PATCH] drm: bridge: dw-hdmi: Avoid resetting force in the detect function Message-ID: <20201108095322.GA1129714@ravnborg.org> References: <20201031081747.372599-1-net147@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201031081747.372599-1-net147@gmail.com> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=VafZwmh9 c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=e5mUnYsNAAAA:8 a=O2yIyfgj_DPdiSikqUcA:9 a=CjuIK1q_8ugA:10 a=Vxmtnl_E_bksehYqCbjh:22 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: Fabio Estevam , Jernej Skrabec , Jonas Karlman , David Airlie , Neil Armstrong , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Andrzej Hajda , linux-rockchip@lists.infradead.org, Boris Brezillon , Laurent Pinchart , Russell King , Liu Ying , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Russell, On Sat, Oct 31, 2020 at 07:17:47PM +1100, Jonathan Liu wrote: > It has been observed that resetting force in the detect function can > result in the PHY being powered down in response to hot-plug detect > being asserted, even when the HDMI connector is forced on. > > Enabling debug messages and adding a call to dump_stack() in > dw_hdmi_phy_power_off() shows the following in dmesg: > [ 160.637413] dwhdmi-rockchip ff940000.hdmi: EVENT=plugin > [ 160.637433] dwhdmi-rockchip ff940000.hdmi: PHY powered down in 0 iterations > > Call trace: > dw_hdmi_phy_power_off > dw_hdmi_phy_disable > dw_hdmi_update_power > dw_hdmi_detect > dw_hdmi_connector_detect > drm_helper_probe_detect_ctx > drm_helper_hpd_irq_event > dw_hdmi_irq > irq_thread_fn > irq_thread > kthread > ret_from_fork > > Fixes: 381f05a7a842 ("drm: bridge/dw_hdmi: add connector mode forcing") > Signed-off-by: Jonathan Liu you are the original author of this code - any comments on this patch? Sam > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > index 748df1cacd2b..0c79a9ba48bb 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -2327,12 +2327,6 @@ static enum drm_connector_status dw_hdmi_detect(struct dw_hdmi *hdmi) > { > enum drm_connector_status result; > > - mutex_lock(&hdmi->mutex); > - hdmi->force = DRM_FORCE_UNSPECIFIED; > - dw_hdmi_update_power(hdmi); > - dw_hdmi_update_phy_mask(hdmi); > - mutex_unlock(&hdmi->mutex); > - > result = hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data); > > mutex_lock(&hdmi->mutex); > -- > 2.29.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel 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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 677E2C55179 for ; Sun, 8 Nov 2020 09:53:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2744220702 for ; Sun, 8 Nov 2020 09:53:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728218AbgKHJxa (ORCPT ); Sun, 8 Nov 2020 04:53:30 -0500 Received: from asavdk4.altibox.net ([109.247.116.15]:47482 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726115AbgKHJx3 (ORCPT ); Sun, 8 Nov 2020 04:53:29 -0500 Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id 0A07E8051F; Sun, 8 Nov 2020 10:53:23 +0100 (CET) Date: Sun, 8 Nov 2020 10:53:22 +0100 From: Sam Ravnborg To: Jonathan Liu , Russell King Cc: linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Fabio Estevam , Jernej Skrabec , Jonas Karlman , David Airlie , Neil Armstrong , Andrzej Hajda , Boris Brezillon , Laurent Pinchart , Russell King , Liu Ying Subject: Re: [PATCH] drm: bridge: dw-hdmi: Avoid resetting force in the detect function Message-ID: <20201108095322.GA1129714@ravnborg.org> References: <20201031081747.372599-1-net147@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201031081747.372599-1-net147@gmail.com> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=VafZwmh9 c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=e5mUnYsNAAAA:8 a=O2yIyfgj_DPdiSikqUcA:9 a=CjuIK1q_8ugA:10 a=Vxmtnl_E_bksehYqCbjh:22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Russell, On Sat, Oct 31, 2020 at 07:17:47PM +1100, Jonathan Liu wrote: > It has been observed that resetting force in the detect function can > result in the PHY being powered down in response to hot-plug detect > being asserted, even when the HDMI connector is forced on. > > Enabling debug messages and adding a call to dump_stack() in > dw_hdmi_phy_power_off() shows the following in dmesg: > [ 160.637413] dwhdmi-rockchip ff940000.hdmi: EVENT=plugin > [ 160.637433] dwhdmi-rockchip ff940000.hdmi: PHY powered down in 0 iterations > > Call trace: > dw_hdmi_phy_power_off > dw_hdmi_phy_disable > dw_hdmi_update_power > dw_hdmi_detect > dw_hdmi_connector_detect > drm_helper_probe_detect_ctx > drm_helper_hpd_irq_event > dw_hdmi_irq > irq_thread_fn > irq_thread > kthread > ret_from_fork > > Fixes: 381f05a7a842 ("drm: bridge/dw_hdmi: add connector mode forcing") > Signed-off-by: Jonathan Liu you are the original author of this code - any comments on this patch? Sam > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > index 748df1cacd2b..0c79a9ba48bb 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -2327,12 +2327,6 @@ static enum drm_connector_status dw_hdmi_detect(struct dw_hdmi *hdmi) > { > enum drm_connector_status result; > > - mutex_lock(&hdmi->mutex); > - hdmi->force = DRM_FORCE_UNSPECIFIED; > - dw_hdmi_update_power(hdmi); > - dw_hdmi_update_phy_mask(hdmi); > - mutex_unlock(&hdmi->mutex); > - > result = hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data); > > mutex_lock(&hdmi->mutex); > -- > 2.29.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel