From patchwork Fri Dec 1 00:11:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Bowler X-Patchwork-Id: 10086473 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AC7976035E for ; Fri, 1 Dec 2017 08:20:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 976942A51F for ; Fri, 1 Dec 2017 08:20:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C4FF2A522; Fri, 1 Dec 2017 08:20:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3AD7D2A51F for ; Fri, 1 Dec 2017 08:20:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 567BC6EC13; Fri, 1 Dec 2017 08:20:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 565 seconds by postgrey-1.35 at gabe; Fri, 01 Dec 2017 00:21:18 UTC Received: from mail3.start.ca (mail3.start.ca [IPv6:2600:1611:1::e:3]) by gabe.freedesktop.org (Postfix) with ESMTPS id 86C0C6EB40 for ; Fri, 1 Dec 2017 00:21:18 +0000 (UTC) Received: from localhost (ip-24-156-181-89.user.start.ca [24.156.181.89]) by mail3.start.ca (8.14.4/8.14.4/) with ESMTP id vB10Bk1l001579 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Nov 2017 19:11:46 -0500 Date: Thu, 30 Nov 2017 19:11:46 -0500 From: Nick Bowler To: Laurent Pinchart Subject: Re: PROBLEM: Asus C201 video mode problems on HDMI hotplug (regression) Message-ID: <20171201001146.fezhkf5c3zrbqjlj@aura.draconx.ca> References: <20171116062811.g27zgeejizfxu6oc@aura.draconx.ca> <269ce21a-3685-30e8-fcc8-65070bc59eea@codeaurora.org> <13872912.d01MB1IQ9u@avalon> <20171128033044.bw4jwps2gya2vbig@aura.draconx.ca> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171128033044.bw4jwps2gya2vbig@aura.draconx.ca> User-Agent: NeoMutt/20171027 X-Mailman-Approved-At: Fri, 01 Dec 2017 08:20:40 +0000 Cc: Laurent Pinchart , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Dave Airlie , Linus Torvalds X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi, On 2017-11-27 22:30 -0500, Nick Bowler wrote: > A note about the test setup: I had to remove the test equipment so I > no longer have any information about the video mode from the sink side > (like in the photos). Thus, with the current setup, I am using the > presense or absense of audio to determine whether the issue is present > or not. > > The test procedure is: boot up, start music, then hotplug the hdmi four > times. If sound is heard after all four connections, PASS; otherwise FAIL. > > - I retested on 4.15-rc1 to confirm that the issue is still present (it is). > > - I applied the functional revert from earlier on top of 4.15-rc1 and the > problem is fixed. > > - Returning to 4.15-rc1 and applying [Laurent Pinchart's] patch -- > the issue is present again (no change in behaviour compared to > 4.15-rc1). Another data point... the following patch appears sufficient to restore working behaviour. Cheers, Nick --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index bf14214fa464..3118fbd8433d 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -1101,8 +1101,6 @@ static void dw_hdmi_phy_power_off(struct dw_hdmi *hdmi) static int dw_hdmi_phy_power_on(struct dw_hdmi *hdmi) { const struct dw_hdmi_phy_data *phy = hdmi->phy.data; - unsigned int i; - u8 val; if (phy->gen == 1) { dw_hdmi_phy_enable_powerdown(hdmi, false); @@ -1116,21 +1114,6 @@ static int dw_hdmi_phy_power_on(struct dw_hdmi *hdmi) dw_hdmi_phy_gen2_txpwron(hdmi, 1); dw_hdmi_phy_gen2_pddq(hdmi, 0); - /* Wait for PHY PLL lock */ - for (i = 0; i < 5; ++i) { - val = hdmi_readb(hdmi, HDMI_PHY_STAT0) & HDMI_PHY_TX_PHY_LOCK; - if (val) - break; - - usleep_range(1000, 2000); - } - - if (!val) { - dev_err(hdmi->dev, "PHY PLL failed to lock\n"); - return -ETIMEDOUT; - } - - dev_dbg(hdmi->dev, "PHY PLL locked %u iterations\n", i); return 0; }