From patchwork Thu Mar 1 11:06:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10250969 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 8C4D0602B5 for ; Thu, 1 Mar 2018 11:06:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AAAB28EF9 for ; Thu, 1 Mar 2018 11:06:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F29928FDB; Thu, 1 Mar 2018 11:06:53 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5E23228EF9 for ; Thu, 1 Mar 2018 11:06:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-reply-to:Date:Message-id:To:From: Subject:MIME-version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ld/aWmT/S919CoJqtXN4Og6xYrzvgQSI0VEd9XPK5UQ=; b=tV59umVE+TVPMYCaTJ8LdjR2D rAmK59j0r2L5ExL7dnJXAdR69L6QLMi0US6NqXS+RYscMt75I6EVu1gqjtWHh1tVdhjRuhpiBb6zs 9RNvdxdXnKhLR6w5t1i1ihYclZgt0VvJcEPQ/UGFtJzR8UfXLEcBNGHqFxFGANPRdAwjCLdrbVcxz HpkNdulR7MGSLOM85EG7WUKcN1+cwFxK20x6vTszKer92rdfkKKkam7OvrU9RTV95WhM0jseG4aqf TVIKSmC7mwVqDGyOieoy9L2YNFpMSAh5JEZ2ahZMhXze07dRY0KmKzw5ALkk94gG/icrdp4hgbnsj SpmJWGJSg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1erM30-0004jN-Cw; Thu, 01 Mar 2018 11:06:50 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1erM2v-0004hv-RD for linux-rockchip@lists.infradead.org; Thu, 01 Mar 2018 11:06:49 +0000 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180301110631euoutp01378e64e7907014848aa6230eb4cf0f7a~XxywpwkY72794027940euoutp01K; Thu, 1 Mar 2018 11:06:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180301110631euoutp01378e64e7907014848aa6230eb4cf0f7a~XxywpwkY72794027940euoutp01K DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1519902391; bh=zRV5vPGUHz1UG1TgNDy8fb/oiMEoPo1sSxK7XFuOCJQ=; h=Subject:From:To:Cc:Date:In-reply-to:References:From; b=U7+NYY1fh7hhAUSd5X5hzil/ijhc1rCuoJOeqtNs9azlhyDbQ4/onGz2o1dpROLfq j0MkXGjSkP3kPh3Kv4N7p98BL3o3FfCDow24r4sYnmEAQP3qd5pzTfRBFZ197oR4HR dxgIFNsnmlu7ky7QzlLM2IRiBhc2RAOXhpXewjS4= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180301110630eucas1p256d6ae65c7327716a26dc68baa735827~Xxyv3_c3l2646526465eucas1p2_; Thu, 1 Mar 2018 11:06:30 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id E0.7B.05700.6BED79A5; Thu, 1 Mar 2018 11:06:30 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180301110630eucas1p2784d6f4cc8084145323ebd97e0c2cda0~XxyvGpOcb1140311403eucas1p2F; Thu, 1 Mar 2018 11:06:30 +0000 (GMT) X-AuditID: cbfec7f2-1dbff70000011644-e0-5a97deb627f2 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 6A.48.04183.6BED79A5; Thu, 1 Mar 2018 11:06:30 +0000 (GMT) MIME-version: 1.0 Received: from [106.116.147.30] by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P4W006VBS6SKJ30@eusync1.samsung.com>; Thu, 01 Mar 2018 11:06:29 +0000 (GMT) Subject: Re: [PATCH v3 00/43] DRM Rockchip rk3399 (Kevin) From: Marek Szyprowski To: Thierry Escande , Archit Taneja , Inki Dae , Thierry Reding , Sandy Huang , Sean Paul , David Airlie , Tomasz Figa , Enric Balletbo i Serra , Andrzej Hajda Message-id: <91b1714e-fe63-9b06-7f90-2fc85f4ed5e7@samsung.com> Date: Thu, 01 Mar 2018 12:06:28 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-reply-to: Content-language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA02Sf0yMcRzH931+3PNcOXtccp+FtNuizK82s68fC5vxmDWMf1yho2eFutpd IUYtOum3q2Sn8qM0P0LS6jSVOnPTj2t1kUplSIkmJWojejyx/nt9v+/3vp/3570vSyp/0G7s IV2koNdpQ9UyJ6rs2bh9aVl3tmbF/bZFuOOencYp9ucEjksYpHFjYY0Mt45+keGizlqEc02n 8FhxHYnPlb4lsKknncKOihwZHn7zm8SXmqoIbMl8QuCqh1YKdxU3IjwSPyHDaS9aZHi8Io/C xrY52B6bwWxw5YvyihB/ObaZ4h2pKQRv6SpA/CNzF8OXf39D8z1JNoJ/WBDD/zJXU3xq6W3E j5S473DWOK0LEkIPHRX0y30DnULulOOIpHx0/E7DNyYWjSShRCRngVsJ142fCZGV3E0EQ1f8 EpHTJI8guDaU/9+U2prGSEIhguSec5QoKLhZMJbR/ZdJbg18mIinJVMfgk7rN1oUXLjV8O5Z /1+WcT6QOJgoE02zuSwSUvKNpHgguZskVF6/SkjP+kLvVwcjMsV5QnZx/eQIlnXlAuDTz83i tZxbD3nv20lp8gKoae2bSqGCM/HtlBT7JQNnOnQSb4KxV120xC4wYCtlJJ4HjoykKX8MpP54 Soh5gEtGUHk2i5CEtWC1NdPSgJlgKssmxTzAKSDBqJQsPGTUPZiqayPYvw5MNVGPwFT9nklH 7uZpjZmnNWaetoN52g5XEXUbqYQoQ1iwYPDRCceWGbRhhihd8LKD4WElaPI71k/Yhi1otOVA LeJYpJ6h8Bq9qFHS2qOG6LBaBCypnq2oL5+8UgRpo08I+vD9+qhQwVCL5rKUWqXY53Vao+SC tZHCEUGIEPT/VIKVu8WikoVbzXtz4lbs2p0T6ju316Jq+pC2M6BoTtyeRv8WLyHy5L4Gq4MZ 0Fx4bQpvTYn3894Sc6VjoTzTtJ0+7/c9e3Bt7nzPyiUeqsOaoRsTt9rnB2c6XK0VH4lL/HBg xYUAb/8Fxibb8h77KmeH/DHtNu5BsAnOtP/d5KBtTf0ulmY1ZQjR+iwm9QbtH7VyLu2KAwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrFIsWRmVeSWpSXmKPExsVy+t/xy7rb7k2PMmh5y2Rxa905VovecyeZ LJo63rJanF12kM3iytf3bBZrbh9itJg7qdbix4ZTzBbtWx4xWUy6P4HF4vKuOWwWnx78Z7aY cX4fk8WOKQeYLPZtPsxicXfDWUaLz63/2Cz6r15is/i5ax6LRdt1MYtzDZPZHUQ91sxbw+gx u+Eii8flvl4mjx13lzB67Jx1l91j+7cHrB73u48zeWxeUu/xd9Z+Fo++LasYPT5vkgvgjuKy SUnNySxLLdK3S+DKWL3doqB7MWPF6jNf2BsYP3czdjFyckgImEj0XelnB7GFBJYwSrz44Api 8woISvyYfI8FxGYWMJP48vIwK0TNc0aJpr1gNcIClhKPj70Ai7MJGEp0ve1i62Lk4hARmM4s sWzuJzCHWWAVs8TzD70sII6QwFlGiQmnlrFDrLCTePrxMpjNIqAqMX3DabB1ogIxElM/bgQb yylgLzHvyU1miDPkJQ5eeQ51krhEc+tNlgmMArOQXDsLybWzkLTMQtKygJFlFaNIamlxbnpu sZFecWJucWleul5yfu4mRmAMbzv2c8sOxq53wYcYBTgYlXh4HfZPixJiTSwrrsw9xCjBwawk wnt6O1CINyWxsiq1KD++qDQntfgQozQHi5I473mDyighgfTEktTs1NSC1CKYLBMHp1QD48ww ky4exkdiwa/Tooubk+oYjIJ2XbN/cVnkbCXHQu+d87a8vCa771VP+IJG7ctWDPGRzxIdSh+d y1uw4dvKe1MMT5/W7550wn0yBwM3S8qx2J/SVvO/h3d1ZVx4eaf5wsJZZVUVFfkmk3pXuN/+ I9wk2fTGc4fI1kgx9bIJ4tPLZt36vinhmhJLcUaioRZzUXEiADdFRx/dAgAA X-CMS-MailID: 20180301110630eucas1p2784d6f4cc8084145323ebd97e0c2cda0 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180131083447epcas3p3633663f2f88e637ffe54ab8307ce5d14 X-RootMTR: 20180131083447epcas3p3633663f2f88e637ffe54ab8307ce5d14 References: <20180130202913.28724-1-thierry.escande@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180301_030646_232256_8DAFC375 X-CRM114-Status: GOOD ( 20.07 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zain Wang , Lin Huang , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Douglas Anderson , linux-rockchip@lists.infradead.org, 'Linux Samsung SOC' , Yakir Yang , =?UTF-8?Q?=c3=98rjan_Eide?= , Haixia Shi , Mark Yao Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi All again, On 2018-03-01 09:50, Marek Szyprowski wrote: > Hi All, > > > On 2018-01-30 21:28, Thierry Escande wrote: >> This patchset includes cleanups, improvements, and bug fixes for >> Rockchip DRM driver and PSR support. >> >> this patchset depends and needs to be applied on top of Rockchip rk3399 >> eDP support [1]. >> >> [1] https://lkml.org/lkml/2018/1/10/682 > > I've applied this patchset on vanilla v4.16-rc1 and check how it works on > Exynos5250-based Chromeboo Snow and Exynos5420-based Chromebook2 > Peach-Pit > boards. Sadly it breaks exynos_dp drm driver. > > Here is the log: > > [    3.540955] [drm] Exynos DRM: using 14400000.fimd device for DMA > mapping operations > [    3.548810] exynos-drm exynos-drm: bound 14400000.fimd (ops > fimd_component_ops) > [    3.555350] exynos-drm exynos-drm: bound 14450000.mixer (ops > mixer_component_ops) > [    3.564622] Unable to handle kernel NULL pointer dereference at > virtual address 000007d8 > [    3.571465] pgd = 28ffa2e4 > [    3.573977] [000007d8] *pgd=00000000 > [    3.577543] Internal error: Oops: 5 [#1] PREEMPT SMP ARM > [    3.582817] Modules linked in: > [    3.585846] CPU: 6 PID: 69 Comm: kworker/6:1 Not tainted > 4.16.0-rc1-00062-ge25751974ba8 #3622 > [    3.594369] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) > [    3.600437] Workqueue: events deferred_probe_work_func > [    3.605547] PC is at analogix_dp_resume+0x8/0xc0 > [    3.610144] LR is at pm_generic_runtime_resume+0x2c/0x38 > [    3.615434] pc : []    lr : [] psr: a0000113 > [    3.621684] sp : ee13fbd8  ip : 0000001a  fp : 00000001 > [    3.626885] r10: ee0eb080  r9 : c0552bd8  r8 : c0fb1d98 > [    3.632090] r7 : eebb1010  r6 : eeae9808  r5 : 00000000  r4 : d4850415 > [    3.638602] r3 : ee0ed010  r2 : b2d05e00  r1 : 00000000  r0 : 00000000 > [    3.645109] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM > Segment none > [    3.652224] Control: 10c5387d  Table: 2000406a  DAC: 00000051 > [    3.657944] Process kworker/6:1 (pid: 69, stack limit = 0x913205b4) > [    3.664192] Stack: (0xee13fbd8 to 0xee140000) > [    3.668523] fbc0: d4850415 00000000 > [    3.676698] fbe0: eeae9808 c0543fec c0543fc0 c054ffb4 00000000 > c0552d24 00000001 ee10b400 > [    3.684852] fc00: c09d1500 eebb1010 eebb10b8 eebad810 00000000 > 00000004 c0552bd8 00000000 > [    3.693007] fc20: c016f5c4 c0547798 00000000 eebb1010 c0f05900 > eebad810 c0552bd8 00000004 > [    3.701163] fc40: 00000000 00000000 c016f5c4 c0547898 00000000 > eebb1010 c0f05900 c0546ff4 > [    3.709315] fc60: 60000113 c05475dc 00000001 eebb1010 00000000 > c1711b78 eebb10b8 eebb1010 > [    3.717470] fc80: 00000004 eebb10b8 60000113 eebb1010 00000000 > c1711b78 c0f75ce0 c05475ec > [    3.725624] fca0: 00000000 ecc59458 ecc5948c c0f75d4c 00000001 > c053b95c ecc59458 00000001 > [    3.733779] fcc0: 00000001 ecc59458 ecc59458 c0f75d4c c0f08448 > c053ad08 ecc59458 ecc59460 > [    3.741934] fce0: 00000000 c05390d0 ecc595a4 c1711c3c c0c7310c > ecc61000 000001ff d186fc33 > [    3.750088] fd00: ecc59458 ecc59398 c1715440 ecc59458 ecc61000 > 000001ff 00000001 c0fb1738 > [    3.758242] fd20: 00000000 c06764c4 c0fb1738 c0678130 ecc59010 > eebb1010 00000000 ecc61000 > [    3.766397] fd40: 000001ff c05321c8 00000003 c0c70b70 ecc59010 > eebb1010 ee0ed010 eebb1010 > [    3.774551] fd60: 00000000 00000000 ecc50b7c c0528e90 00000000 > c053fa60 ed99b080 00000002 > [    3.782706] fd80: 00000028 ee0ec340 ecc61000 c0535bc4 00000000 > 00000000 ffffffff 00000000 > [    3.790860] fda0: c0f62f80 ee0eb280 ecc61000 c0f63c80 ee031410 > eebb0c10 c0fb1738 c0522ee8 > [    3.799015] fdc0: c0522d8c ee0e82c0 00000050 00000004 ed99b050 > ed99b080 c0f6375c c0536378 > [    3.807169] fde0: 00000001 c0f63710 c0522b70 ee0ec340 ee0ec340 > ed99b080 00000000 c0f63754 > [    3.815324] fe00: ee0ec340 c1711bc0 c0f6333c 00000000 00000007 > c05364fc ecc50b7c eebb1000 > [    3.823479] fe20: ee0ed010 eebb1010 c0f6333c c0528fe4 ee13fe3c > 00000000 00000000 ecc50b7c > [    3.831633] fe40: 00000000 eebb1010 fffffdfb c053debc c053de6c > eebb1010 c1711bbc 00000000 > [    3.839787] fe60: c0fb19f0 c053bd18 00000001 c053e4d4 c0f6333c > 00000000 ee13feb0 c053c054 > [    3.847942] fe80: 00000001 c0f63bb4 c0fb19f0 c0fc50a0 c1711bbc > c0539e4c ee8a3ad4 ed996a54 > [    3.856096] fea0: eebb1010 eebb1044 c0f63c80 c053b970 eebb1010 > 00000001 00000001 ee0d4100 > [    3.864251] fec0: eebb1010 c0f63c80 c0f63b68 c053ad08 ee0d4100 > eefa50c0 eebb1010 c053b258 > [    3.872405] fee0: c053b21c ee0d4100 eefa50c0 ee13ff28 eefa8300 > c0f63bd8 00000000 c0fa8ae5 > [    3.880560] ff00: c0f0846c c014352c 00000001 00000000 c014347c > 60000193 c09cb114 eefa50c0 > [    3.888714] ff20: c0143c38 00000000 c0f63bd8 c110ef34 00000000 > c0c71fdc c0f05900 ee0d4100 > [    3.896869] ff40: eefa50c0 eefa50f4 c0143bfc c0fa9a27 00000008 > ee0d4118 c0f05900 c0143b84 > [    3.905024] ff60: c09d14d4 eeae7280 ee0d5000 eeae7280 ee0d5000 > 00000000 eeae72b8 ee0d4100 > [    3.913178] ff80: ee9b5eb0 c0143b50 00000000 c014a30c ee0d5000 > c014a1e4 00000000 00000000 > [    3.921332] ffa0: 00000000 00000000 00000000 c01010b4 00000000 > 00000000 00000000 00000000 > [    3.929486] ffc0: 00000000 00000000 00000000 00000000 00000000 > 00000000 00000000 00000000 > [    3.937641] ffe0: 00000000 00000000 00000000 00000000 00000013 > 00000000 00000000 00000000 > [    3.945800] [] (analogix_dp_resume) from [] > (pm_generic_runtime_resume+0x2c/0x38) > [    3.955001] [] (pm_generic_runtime_resume) from > [] (__genpd_runtime_resume+0x2c/0x8c) > [    3.964543] [] (__genpd_runtime_resume) from [] > (genpd_runtime_resume+0x14c/0x258) > [    3.973824] [] (genpd_runtime_resume) from [] > (__rpm_callback+0x134/0x214) > [    3.982409] [] (__rpm_callback) from [] > (rpm_callback+0x20/0x80) > [    3.990126] [] (rpm_callback) from [] > (rpm_resume+0x3a0/0x734) > [    3.997672] [] (rpm_resume) from [] > (__pm_runtime_resume+0x64/0x9c) > [    4.005654] [] (__pm_runtime_resume) from [] > (__device_attach+0x8c/0x134) > [    4.014157] [] (__device_attach) from [] > (bus_probe_device+0x88/0x90) > [    4.022314] [] (bus_probe_device) from [] > (device_add+0x3a8/0x580) > [    4.030209] [] (device_add) from [] > (i2c_register_adapter+0xd4/0x3ec) > [    4.038360] [] (i2c_register_adapter) from [] > (analogix_dp_bind+0x2a0/0x410) > [    4.047128] [] (analogix_dp_bind) from [] > (exynos_dp_bind+0x9c/0x12c) > [    4.055277] [] (exynos_dp_bind) from [] > (component_bind_all+0xfc/0x258) > [    4.063605] [] (component_bind_all) from [] > (exynos_drm_bind+0x15c/0x28c) > [    4.072107] [] (exynos_drm_bind) from [] > (try_to_bring_up_master+0x1b8/0x29c) > [    4.080957] [] (try_to_bring_up_master) from [] > (component_add+0xa0/0x170) > [    4.089545] [] (component_add) from [] > (exynos_dp_probe+0x64/0xb8) > [    4.097437] [] (exynos_dp_probe) from [] > (platform_drv_probe+0x50/0xb0) > [    4.105766] [] (platform_drv_probe) from [] > (driver_probe_device+0x2b8/0x4a0) > [    4.114615] [] (driver_probe_device) from [] > (bus_for_each_drv+0x44/0x8c) > [    4.123115] [] (bus_for_each_drv) from [] > (__device_attach+0xa0/0x134) > [    4.131355] [] (__device_attach) from [] > (bus_probe_device+0x88/0x90) > [    4.139509] [] (bus_probe_device) from [] > (deferred_probe_work_func+0x3c/0x168) > [    4.148536] [] (deferred_probe_work_func) from > [] (process_one_work+0x1d0/0x7bc) > [    4.157644] [] (process_one_work) from [] > (worker_thread+0x34/0x4dc) > [    4.165710] [] (worker_thread) from [] > (kthread+0x128/0x164) > [    4.173080] [] (kthread) from [] > (ret_from_fork+0x14/0x20) > [    4.180274] Exception stack(0xee13ffb0 to 0xee13fff8) > [    4.185295] ffa0:                                     00000000 > 00000000 00000000 00000000 > [    4.193466] ffc0: 00000000 00000000 00000000 00000000 00000000 > 00000000 00000000 00000000 > [    4.201620] ffe0: 00000000 00000000 00000000 00000000 00000013 > 00000000 > [    4.208207] Code: e2800e37 eafee601 e92d4070 e1a05000 (e59067d8) > [    4.214370] ---[ end trace bf6046013df7cab2 ]--- > > This oops happens, because analogix_dp_bind() calls drm_dp_aux_register() > which registers i2c adapter. I2C core tries to runtime get i2c host > device during registration. This ends in analogix_dp_resume(), but dp > context is NULL there. dp context is set in exynos_dp_bind() after > executing analogix_dp_bind(). > > A quick workaround of this issue is to postpone enabling runtime PM > on analogix device: > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > index 8217c106c72b..db5a6b82815d 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > @@ -1621,8 +1621,6 @@ analogix_dp_bind(struct device *dev, struct > drm_device *drm_dev, >                 return ERR_PTR(-ENODEV); >         } > > -       pm_runtime_enable(dev); > - >         ret = devm_request_threaded_irq(&pdev->dev, dp->irq, >                                         analogix_dp_hardirq, >                                         analogix_dp_irq_thread, > @@ -1642,7 +1640,9 @@ analogix_dp_bind(struct device *dev, struct > drm_device *drm_dev, > >         ret = drm_dp_aux_register(&dp->aux); >         if (ret) > -               goto err_disable_pm_runtime; > +               return ERR_PTR(ret); > + > +       pm_runtime_enable(dev); > >         ret = analogix_dp_create_bridge(drm_dev, dp); >         if (ret) { > > With such patch Exynos based boards boot, but there is significant delay > related to i2c/aux channel timeout: > > [    3.510610] [drm] Exynos DRM: using 14400000.fimd device for DMA > mapping operations > [    3.517733] exynos-drm exynos-drm: bound 14400000.fimd (ops > fimd_component_ops) > [    3.524483] exynos-drm exynos-drm: bound 14450000.mixer (ops > mixer_component_ops) > [    3.533743] exynos-drm exynos-drm: bound 145b0000.dp-controller > (ops exynos_dp_ops) > [    3.540074] exynos-drm exynos-drm: bound 14530000.hdmi (ops > hdmi_component_ops) > [    3.547262] [drm] Supports vblank timestamp caching Rev 2 > (21.10.2013). > [    3.553899] [drm] No driver support for vblank timestamp query. > [    3.580467] exynos-dp 145b0000.dp-controller: AUX CH cmd reply > timeout! > [    4.085814] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    4.590904] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    5.095930] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    5.601022] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    6.106031] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    6.611095] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    7.116112] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    7.621150] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    8.126191] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    8.638389] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    9.138537] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    9.638613] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   10.138698] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   10.638784] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   11.138939] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   11.639025] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   12.139186] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   12.639281] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   13.139368] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   13.216585] exynos-dp 145b0000.dp-controller: Link Training Clock > Recovery success > [   13.218846] exynos-dp 145b0000.dp-controller: Link Training success! > [   13.333502] Console: switching to colour frame buffer device 170x48 > [   13.446186] exynos-drm exynos-drm: fb0:  frame buffer device > [   13.456751] [drm] Initialized exynos 1.0.0 20110530 for exynos-drm > on minor 0 > > I've added some debugs and they reveal that AUX CH timeouts happen > until DP > PHY is powered on: > > [    3.511022] [drm] Exynos DRM: using 14400000.fimd device for DMA > mapping operations > [    3.518137] exynos-drm exynos-drm: bound 14400000.fimd (ops > fimd_component_ops) > [    3.524900] exynos-drm exynos-drm: bound 14450000.mixer (ops > mixer_component_ops) > [    3.533944] exynos-drm exynos-drm: bound 145b0000.dp-controller > (ops exynos_dp_ops) > [    3.540231] exynos-drm exynos-drm: bound 14530000.hdmi (ops > hdmi_component_ops) > [    3.547447] [drm] Supports vblank timestamp caching Rev 2 > (21.10.2013). > [    3.554077] [drm] No driver support for vblank timestamp query. > [    3.580511] exynos-dp 145b0000.dp-controller: AUX CH cmd reply > timeout! > [    4.085882] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    4.590979] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    5.095986] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    5.601057] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    6.106110] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    6.611168] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    7.116212] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    7.621290] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    8.126331] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    8.638578] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    9.138715] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [    9.638872] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   10.138963] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   10.639057] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   11.139208] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   11.639374] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   12.139451] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   12.639553] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   13.139636] exynos-dp 145b0000.dp-controller: AUX CH enable timeout! > [   13.211826] analogix_dp_set_bridge line 1270 phy_power_on > [   13.216999] exynos-dp 145b0000.dp-controller: Link Training Clock > Recovery success > [   13.219235] exynos-dp 145b0000.dp-controller: Link Training success! > [   13.333802] Console: switching to colour frame buffer device 170x48 > [   13.453198] exynos-drm exynos-drm: fb0:  frame buffer device > [   13.462463] [drm] Initialized exynos 1.0.0 20110530 for exynos-drm > on minor 0 > > It looks that handling of DDC i2c over DP AUX chanel (get_modes > callback) is > not synchronized with enabling bridge in analogix_dp_set_bridge(). > > I'm surprised that you didn't observe similar issues on rk3399. > I've investigated this issue further and it turned out that the DDC/I2C AUX channel timeout issue is related to the fact, that exynos_dp driver creates additional connector for the display pipeline on Exynos5420 Chromebook2 Peach-PIT. One connector is created by analogix_dp core, the second (the one which is in fact operational) is created by parade_ps eDP/LVDS bridge. The DDC/I2C AUX channel timeouts happens when DRM core tries to get mode from the connector object created by analogix_dp core. This patch fixes this issue: diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index db5a6b82815d..46b704adb2ae 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1195,27 +1195,30 @@ static int analogix_dp_bridge_attach(struct drm_bridge *bridge)  {      struct analogix_dp_device *dp = bridge->driver_private;      struct drm_encoder *encoder = dp->encoder; -    struct drm_connector *connector = &dp->connector; -    int ret; +    struct drm_connector *connector = NULL; +    int ret = 0;      if (!bridge->encoder) {          DRM_ERROR("Parent encoder object not found");          return -ENODEV;      } -    connector->polled = DRM_CONNECTOR_POLL_HPD; +    if (!dp->plat_data->skip_connector) { +        connector = &dp->connector; +        connector->polled = DRM_CONNECTOR_POLL_HPD; -    ret = drm_connector_init(dp->drm_dev, connector, -                 &analogix_dp_connector_funcs, -                 DRM_MODE_CONNECTOR_eDP); -    if (ret) { -        DRM_ERROR("Failed to initialize connector with drm\n"); -        return ret; -    } +        ret = drm_connector_init(dp->drm_dev, connector, +                     &analogix_dp_connector_funcs, +                     DRM_MODE_CONNECTOR_eDP); +        if (ret) { +            DRM_ERROR("Failed to initialize connector with drm\n"); +            return ret; +        } -    drm_connector_helper_add(connector, -                 &analogix_dp_connector_helper_funcs); -    drm_mode_connector_attach_encoder(connector, encoder); +        drm_connector_helper_add(connector, +                     &analogix_dp_connector_helper_funcs); +        drm_mode_connector_attach_encoder(connector, encoder); +    }      /*       * NOTE: the connector registration is implemented in analogix diff --git a/drivers/gpu/drm/exynos/exynos_dp.c b/drivers/gpu/drm/exynos/exynos_dp.c index b316249a3f89..86330f396784 100644 --- a/drivers/gpu/drm/exynos/exynos_dp.c +++ b/drivers/gpu/drm/exynos/exynos_dp.c @@ -244,6 +244,7 @@ static int exynos_dp_probe(struct platform_device *pdev)      /* The remote port can be either a panel or a bridge */      dp->plat_data.panel = panel; +    dp->plat_data.skip_connector = !!bridge;      dp->ptn_bridge = bridge;  out: diff --git a/include/drm/bridge/analogix_dp.h b/include/drm/bridge/analogix_dp.h index b384f7e8d14a..475b706b49de 100644 --- a/include/drm/bridge/analogix_dp.h +++ b/include/drm/bridge/analogix_dp.h @@ -31,6 +31,7 @@ struct analogix_dp_plat_data {      struct drm_panel *panel;      struct drm_encoder *encoder;      struct drm_connector *connector; +    bool skip_connector;      int (*power_on_start)(struct analogix_dp_plat_data *);      int (*power_on_end)(struct analogix_dp_plat_data *);