From patchwork Sun Feb 12 13:18:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 9568679 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 2A32F60578 for ; Mon, 13 Feb 2017 00:40:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B4CF2808F for ; Mon, 13 Feb 2017 00:40:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1004028113; Mon, 13 Feb 2017 00:40:13 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 5C9702808F for ; Mon, 13 Feb 2017 00:40:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D9FB6E0AB; Mon, 13 Feb 2017 00:39:45 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by gabe.freedesktop.org (Postfix) with ESMTPS id 554E06E0FC for ; Sun, 12 Feb 2017 13:19:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:Content-Type:MIME-Version:Message-ID:Subject:Cc:To:From:Date; bh=/tbjnv9BoF7zUjZ1hS8bM8QAJhU9pxRb2wawqCPhT8A=; b=kIqMLG+rccEZTNWsRT+yseLplmy6RySDERtedg+XTPaRk0jgTkTrOUYWwbXhYO4ZmYDjBfuGD7BCWXj4ZnGu5trHyRjIdcPzAB2CMxkJMoti3/+Pvq/XKQh4wEuBeboESWf53xjJzPz1798nMpKv/sCLJl0hHq1sw8Xpy7frCz8=; Received: from n2100.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:4f86]:43223) by pandora.armlinux.org.uk with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1ccu3O-0005GS-Gw; Sun, 12 Feb 2017 13:18:58 +0000 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.76) (envelope-from ) id 1ccu3L-0007Oq-4S; Sun, 12 Feb 2017 13:18:55 +0000 Date: Sun, 12 Feb 2017 13:18:54 +0000 From: Russell King - ARM Linux To: p.zabel@pengutronix.de Subject: imxdrm issue on Hummingboard with LVDS enabled Message-ID: <20170212131854.GT27312@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Mailman-Approved-At: Mon, 13 Feb 2017 00:39:43 +0000 Cc: dri-devel@lists.freedesktop.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" X-Virus-Scanned: ClamAV using ClamSMTP Hi, Here's another issue with imxdrm. I got this while trying to reproduce Dan's problem by enabling the lvds output using the patch below originally from Fabio, but updated a bit. This doesn't occur if I leave LVDS disabled. The taint is due to the IMX capture modules from Steve, who chose to put his code in drivers/staging/media rather than drivers/media. However, the last module to make the capture stuff active (imx-csi) which interfaces the drivers/gpu/ipu-v3 code with the capture code has not been loaded. ------------[ cut here ]------------ WARNING: CPU: 1 PID: 1049 at /home/rmk/git/linux-rmk/drivers/gpu/drm/drm_atomic_helper.c:1149 drm_atomic_helper_wait_for_vblanks+0x218/0x224 [CRTC:29] vblank wait timed out Modules linked in: imx_camif(C) imx_ic(C) imx_smfc(C) caam_jr uvcvideo snd_soc_imx_sgtl5000 snd_soc_fsl_asoc_card snd_soc_imx_spdif imx_media(C) snd_soc_imx_audmux imx_mipi_csi2(C) imx_media_core(C) snd_soc_sgtl5000 imx219 caam imx_sdma video_multiplexer imx2_wdt coda v4l2_mem2mem videobuf2_v4l2 videobuf2_dma_contig snd_soc_fsl_spdif videobuf2_core snd_soc_fsl_ssi imx_pcm_dma videobuf2_vmalloc videobuf2_memops imx_thermal nfsd rc_pinnacle_pctv_hd dw_hdmi_cec dw_hdmi_ahb_audio imx_ldb etnaviv CPU: 1 PID: 1049 Comm: Xorg Tainted: G C 4.10.0-rc7+ #2106 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) Backtrace: [] (dump_backtrace) from [] (show_stack+0x18/0x1c) r6:600f0013 r5:ffffffff r4:00000000 r3:00000000 [] (show_stack) from [] (dump_stack+0xa4/0xdc) [] (dump_stack) from [] (__warn+0xdc/0x108) r6:c08db088 r5:00000000 r4:ee9a5c98 r3:d039ee40 [] (__warn) from [] (warn_slowpath_fmt+0x40/0x48) r10:d01d5018 r8:000000b0 r7:d01d4000 r6:eea7d000 r5:eaab4480 r4:00000001 [] (warn_slowpath_fmt) from [] (drm_atomic_helper_wait_for_vblanks+0x218/0x224) r3:0000001d r2:c08db1b4 [] (drm_atomic_helper_wait_for_vblanks) from [] (imx_drm_atomic_commit_tail+0x50/0x60) r10:d02be400 r9:eaab4a00 r8:00000000 r7:d01d4000 r6:00000000 r5:d01d4000 r4:eaab4480 [] (imx_drm_atomic_commit_tail) from [] (commit_tail+0x48/0x94) r5:c0a456a4 r4:eaab4480 [] (commit_tail) from [] (drm_atomic_helper_commit+0xc4/0x150) r5:00000000 r4:eaab4480 [] (drm_atomic_helper_commit) from [] (drm_atomic_commit+0x4c/0x60) r8:ed57f000 r7:ee9a5dd8 r6:d01d4000 r5:00000000 r4:eaab4480 r3:c03daf04 [] (drm_atomic_commit) from [] (drm_atomic_helper_set_config+0x80/0xd0) r6:d01d5018 r5:00000000 r4:eaab4480 r3:00000004 [] (drm_atomic_helper_set_config) from [] (drm_mode_set_config_internal+0x60/0xe4) r7:d01d5018 r6:d01d4000 r5:eaab4a00 r4:ed57f000 [] (drm_mode_set_config_internal) from [] (drm_mode_setcrtc+0xdc/0x47c) r7:00000001 r6:d01d4000 r5:eaab4a00 r4:ee9a5e58 [] (drm_mode_setcrtc) from [] (drm_ioctl+0x204/0x41c) r10:c06864a2 r9:d01d4000 r8:c07495a0 r7:ee9a5e58 r6:d03e3400 r5:00000068 r4:00000000 [] (drm_ioctl) from [] (do_vfs_ioctl+0x98/0x9a0) r10:ed4ba068 r9:ee9a4000 r8:be9fa5c0 r7:00000008 r6:00000008 r5:ee1a4500 r4:c018961c [] (do_vfs_ioctl) from [] (SyS_ioctl+0x3c/0x60) r10:00000000 r9:ee9a4000 r8:be9fa5c0 r7:00000008 r6:c06864a2 r5:ee1a4500 r4:ee1a4500 [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x1c) r8:c000ff04 r7:00000036 r6:c06864a2 r5:be9fa5c0 r4:b6c4ace8 r3:00000001 ---[ end trace e9cdd5f49e5cc87f ]--- diff --git a/arch/arm/boot/dts/imx6dl-hummingboard.dts b/arch/arm/boot/dts/imx6dl-hummingboard.dts index d5c966031962..9f605d14c50f 100644 --- a/arch/arm/boot/dts/imx6dl-hummingboard.dts +++ b/arch/arm/boot/dts/imx6dl-hummingboard.dts @@ -48,3 +48,10 @@ model = "SolidRun HummingBoard Solo/DualLite"; compatible = "solidrun,hummingboard/dl", "fsl,imx6dl"; }; + +&clks { + assigned-clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>, + <&clks IMX6QDL_CLK_LDB_DI1_SEL>; + assigned-clock-parents = <&clks IMX6QDL_CLK_PLL3_USB_OTG>, + <&clks IMX6QDL_CLK_PLL3_USB_OTG>; +}; diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi index d6c2358ffad4..258107246d64 100644 --- a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi +++ b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi @@ -302,3 +302,28 @@ cd-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; status = "okay"; }; + +&ldb { + status = "okay"; + + lvds-channel@1 { + fsl,data-mapping = "spwg"; + fsl,data-width = <18>; + status = "okay"; + + display-timings { + native-mode = <&timing0>; + timing0: hsd100pxn1 { + clock-frequency = <65000000>; + hactive = <1024>; + vactive = <768>; + hback-porch = <220>; + hfront-porch = <40>; + vback-porch = <21>; + vfront-porch = <7>; + hsync-len = <60>; + vsync-len = <10>; + }; + }; + }; +}; diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c index 45bf9e330eca..bb0cf4cd3370 100644 --- a/drivers/clk/imx/clk-imx6q.c +++ b/drivers/clk/imx/clk-imx6q.c @@ -864,7 +864,7 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) clk_set_parent(clk[IMX6QDL_CLK_IPU2_DI0_SEL], clk[IMX6QDL_CLK_IPU2_DI0_PRE]); clk_set_parent(clk[IMX6QDL_CLK_IPU2_DI1_SEL], clk[IMX6QDL_CLK_IPU2_DI1_PRE]); - if (cpu_is_imx6dl()) + if (clk_on_imx6dl()) clk_set_parent(clk[IMX6QDL_CLK_IPU1_SEL], clk[IMX6QDL_CLK_PLL3_PFD1_540M]); /*