Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751941AbdLCFU5 (ORCPT ); Sun, 3 Dec 2017 00:20:57 -0500 Received: from mail3.start.ca ([64.140.120.243]:60231 "EHLO mail3.start.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750705AbdLCFU4 (ORCPT ); Sun, 3 Dec 2017 00:20:56 -0500 Date: Sun, 3 Dec 2017 00:20:45 -0500 From: Nick Bowler To: Jose Abreu Cc: Laurent Pinchart , Laurent Pinchart , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Dave Airlie , Linus Torvalds Subject: Re: PROBLEM: Asus C201 video mode problems on HDMI hotplug (regression) Message-ID: <20171203052045.5povltrffufaic7o@aura.draconx.ca> References: <20171116062811.g27zgeejizfxu6oc@aura.draconx.ca> <269ce21a-3685-30e8-fcc8-65070bc59eea@codeaurora.org> <13872912.d01MB1IQ9u@avalon> <20171128033044.bw4jwps2gya2vbig@aura.draconx.ca> <20171201001146.fezhkf5c3zrbqjlj@aura.draconx.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171027 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2340 Lines: 67 Hi Jose, On 2017-12-02 17:11 +0000, Jose Abreu wrote: > On 01-12-2017 00:11, Nick Bowler wrote: > > Another data point... the following patch appears sufficient to > > restore working behaviour. [...] > I don't think you can do this. The phy pll lock check is > recommended and can indicate hw failure. Can you please check if > this untested, uncompiled patch makes it work correctly ? Your patch changes things. With this applied on top of 4.15-rc1 it is failing 100% of the time instead of only half of the time. I brought the original test equipment back to the setup so I can see the video and pink bar again. The symptoms remain the same (unexpected size, pink bar, and no audio). PS: your patch seems to have been line wrapped which made it a bit annoying to apply. > ------------------>8--------------- > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > index bf14214..456fc54 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -1669,7 +1669,7 @@ static void > hdmi_disable_overflow_interrupts(struct dw_hdmi *hdmi) > > static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct > drm_display_mode *mode) > { > - int ret; > + int ret, vsync_len = mode->vsync_end - mode->vsync_start; > > hdmi_disable_overflow_interrupts(hdmi); > > @@ -1722,6 +1722,14 @@ static int dw_hdmi_setup(struct dw_hdmi > *hdmi, struct drm_display_mode *mode) > return ret; > hdmi->phy.enabled = true; > > + /* Reset all clock domains */ > + hdmi_writeb(hdmi, 0x00, HDMI_MC_SWRSTZ); > + > + /* Rewrite vsync register to latch previous written values */ > + if (mode->flags & DRM_MODE_FLAG_INTERLACE) > + vsync_len /= 2; > + hdmi_writeb(hdmi, vsync_len, HDMI_FC_VSYNCINWIDTH); > + > /* HDMI Initialization Step B.3 */ > dw_hdmi_enable_video_path(hdmi); > > ------------------>8--------------- > > I would expect this patch to end your wrong image issue but the > audio part may be a different problem. It is very consistent: pink bar <=> no audio. My suspicion is that the audio problem is just the wrong video mode on the sink side messing things up, but I have no way of confirming that (that I know of). Thanks, Nick