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: 83279 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp1669732obn; Mon, 21 Nov 2016 09:33:07 -0800 (PST) X-Received: by 10.98.27.132 with SMTP id b126mr19376997pfb.171.1479749587140; Mon, 21 Nov 2016 09:33:07 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id m26si23640727pge.303.2016.11.21.09.33.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Nov 2016 09:33:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) 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 831F36E569; Mon, 21 Nov 2016 17:32:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by gabe.freedesktop.org (Postfix) with ESMTP id C68EF6E567 for ; Mon, 21 Nov 2016 17:32:33 +0000 (UTC) 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) Cc: Mali DP Maintainers , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org 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" 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. Acked-by: Liviu Dudau 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); }