From patchwork Mon Nov 21 17:32:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 9439883 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 D5E6D60469 for ; Mon, 21 Nov 2016 17:35:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C480A28068 for ; Mon, 21 Nov 2016 17:35:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B91A028B61; Mon, 21 Nov 2016 17:35:05 +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=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1801828068 for ; Mon, 21 Nov 2016 17:35:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c8sSi-0003Bv-Mp; Mon, 21 Nov 2016 17:33:00 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c8sSd-00034X-8A for linux-arm-kernel@lists.infradead.org; Mon, 21 Nov 2016 17:32:56 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A3F7816; Mon, 21 Nov 2016 09:32:33 -0800 (PST) Received: from e106497-lin.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 76AAB3F220; Mon, 21 Nov 2016 09:32:33 -0800 (PST) Received: by e106497-lin.cambridge.arm.com (Postfix, from userid 100) id 1185A11A4264; Mon, 21 Nov 2016 17:32:32 +0000 (GMT) Date: Mon, 21 Nov 2016 17:32:32 +0000 From: Liviu Dudau To: Russell King - ARM Linux Subject: Re: [BUG] hdlcd gets confused about base address Message-ID: <20161121173231.GM1005@e106497-lin.cambridge.arm.com> References: <20161118233733.GP1041@n2100.armlinux.org.uk> <20161121110604.GC1005@e106497-lin.cambridge.arm.com> <20161121112030.GC1041@n2100.armlinux.org.uk> <20161121113212.GF1005@e106497-lin.cambridge.arm.com> <20161121122556.GE1041@n2100.armlinux.org.uk> <20161121125653.GJ1005@e106497-lin.cambridge.arm.com> <20161121132419.GF1041@n2100.armlinux.org.uk> <20161121135031.GK1005@e106497-lin.cambridge.arm.com> <20161121140349.GG1041@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20161121140349.GG1041@n2100.armlinux.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161121_093255_366152_00016AEE X-CRM114-Status: GOOD ( 27.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Mali DP Maintainers , Brian Starkey , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Nov 21, 2016 at 02:03:49PM +0000, Russell King - ARM Linux wrote: > On Mon, Nov 21, 2016 at 01:50:31PM +0000, Liviu Dudau wrote: > > On Mon, Nov 21, 2016 at 01:24:19PM +0000, Russell King - ARM Linux wrote: > > > On Mon, Nov 21, 2016 at 12:56:53PM +0000, Liviu Dudau wrote: > > > > That is mostly due to the check in hdlcd_crtc_disable() which I should > > > > remove, I've added it because I was getting a ->disable() hook call > > > > before any ->enable() was called at startup time. I need to revisit > > > > this as I remember Daniel was commenting that this was not needed. > > > > > > Removing that test results in: > > > > > > [drm:drm_atomic_helper_commit_cleanup_done] *ERROR* [CRTC:24:crtc-0] flip_done timed out > > > > > > and the kernel hanging, seemingly in an IRQs-off region. > > > > Right, I need to sort this one out. Are you doing these tests out of > > some tagged branch that I can get in sync with? Hi Russell, > > No, not yet, and some of the changes I have are rather hacky. > > I do always build my full tree of patches (which is currently running at > around 320 patches at the moment) but I never share that entire patch > set. However, none of those touch i2c (apart from the ones I've recently > posted) and the only patches touching hdlcd are those I've posted so far. > > Most of the problems I'm finding are through trying basic stuff - I'm not > doing anything special or unusual to find them, at the moment quite > literally just starting Xorg up and shutting it down. For example, the > above was caused by logging in on serial, running: > > Xorg -terminate -verbose > > and then hitting ^C. (I have lxdm disabled so systemd boots to VT login > prompts on both the "framebuffer" and serial - I don't want Xorg coming > up when the machine is booting for its nightly KVM boot tests.) > > I'm afraid that when I try someone elses code, I have a tendency to find > loads of seemingly trivial bugs when I try putting it through some basic > tests. I'm not being able to reproduce your bug conditions. I'm running the following setup when testing: - mainline v4.9-rc6 - edited the juno-base.dtsi file to disable the hdlcd@7f600000 and hdmi-transmitter@70 nodes to remove the second HDMI output from the test. - patched tda998x_drv.c to set interlace_allowed = 0, see below why - modified the hdlcd_crtc.c file with the following patch: -8<----------------------------------------------------------------------- ->8----------------------------------------------------------------------- That takes care of the pxlclk refcounting issue you were seeing. I've started Xorg several times (and yes, I do see EDID checksum error every now and then, specially when running xrandr). When closing down Xorg I get back the framebuffer console with the login prompt and no image shifting. My monitor is a TV that reports that preferred mode is 1080i, however HDLCD and TDA19988 don't talk propertly with each other to be able to set the interlaced mode correctly, so I've had to disable support for interlacing mode in tda998x_drv.c and now the preferred mode that gets picked up is 1920x1200@60Hz. Please advise on what other steps I can take to try to reproduce this. P.S: What revision of Juno do you have? Any chance you can capture the start of the boot process where the firmware component prints the version numbers? Best regards, Liviu > > -- > RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ > FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up > according to speedtest.net. diff --git a/drivers/gpu/drm/arm/hdlcd_crtc.c b/drivers/gpu/drm/arm/hdlcd_crtc.c index 48019ae..656dc43 100644 --- a/drivers/gpu/drm/arm/hdlcd_crtc.c +++ b/drivers/gpu/drm/arm/hdlcd_crtc.c @@ -156,9 +156,7 @@ static void hdlcd_crtc_disable(struct drm_crtc *crtc) { struct hdlcd_drm_private *hdlcd = crtc_to_hdlcd_priv(crtc); - if (!crtc->state->active) - return; - + drm_crtc_vblank_off(crtc); hdlcd_write(hdlcd, HDLCD_REG_COMMAND, 0); clk_disable_unprepare(hdlcd->clk); }