From patchwork Mon Feb 26 14:43:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10242493 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 B5C2A60208 for ; Mon, 26 Feb 2018 14:43:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A52702A06F for ; Mon, 26 Feb 2018 14:43:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 994702A073; Mon, 26 Feb 2018 14:43: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=-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 295F42A06F for ; Mon, 26 Feb 2018 14:43:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 260406E4E1; Mon, 26 Feb 2018 14:43:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id 673DE6E4E1 for ; Mon, 26 Feb 2018 14:43:50 +0000 (UTC) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180226144347euoutp02c6c089c81ee600a06e18f9db543d4ec3~W50mRjoWC0781407814euoutp021; Mon, 26 Feb 2018 14:43:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180226144347euoutp02c6c089c81ee600a06e18f9db543d4ec3~W50mRjoWC0781407814euoutp021 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1519656227; bh=C1TtCIJvoxuq2vqV9D2G7V44wbPJPTlUfvb9UovyCOc=; h=From:To:Cc:Subject:Date:References:From; b=XOnvOdSKHlkR5gEGcmtPPx6ydIpRuFr54yFjAA2eujA2gcss2rDH1AjE/b+L1n3NG aq+MFGwbWe+AJEaWqv6mVRq4Jbudq9YQzPndIbZlHJLXtJiB2Lb1iKehhUvu5nqcI/ TOClKSnLXkzr9ZBgmVvcJ0qYMgzdQV+K60pE2Ev4= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180226144346eucas1p1a0cda43a905d3e42c4d30fabc2da9cf5~W50lWtqec2080920809eucas1p1t; Mon, 26 Feb 2018 14:43:46 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 10.67.05700.12D149A5; Mon, 26 Feb 2018 14:43:45 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180226144345eucas1p177661aa4eacd6a282192c7e28e6872c4~W50kT4FEW1036810368eucas1p1n; Mon, 26 Feb 2018 14:43:45 +0000 (GMT) X-AuditID: cbfec7f2-1dbff70000011644-a1-5a941d21533f Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 3D.2B.04178.12D149A5; Mon, 26 Feb 2018 14:43:45 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P4R00B6PI8U6HC0@eusync1.samsung.com>; Mon, 26 Feb 2018 14:43:45 +0000 (GMT) From: Marek Szyprowski To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2] drm/bridge: analogix_dp: Keep PHY powered between driver bind/unbind Date: Mon, 26 Feb 2018 15:43:40 +0100 Message-id: <20180226144340.24608-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.15.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrPIsWRmVeSWpSXmKPExsWy7djP87qKslOiDL5dtra4te4cq0VTx1tW i40z1rNaXPn6ns2ic+ISdosZ5/cxWaw9cpfd4u6Gs4wW5xomsztwesxuuMjicbmvl8ljdsdM Vo/73ceZPP7O2s/i0bdlFaPH501yAexRXDYpqTmZZalF+nYJXBl3H51mKmgTrJg0ZS5jA+Na vi5GTg4JAROJdWenMncxcnEICaxglGjbO5UdwvnMKPH48FpGmKotJ88wQSSWMUrMXbecFcJp YJJ4dv0vO0gVm4ChRNfbLjYQW0TATaLp8EywImaBLUwSj3duBisSFoiS+PPuNFgRi4CqxI77 jWAreAVsJZ50TIZaJy+x+PtONpBmCYEONokVyz8zQSRcJH5s+cYCYQtLvDq+hR3ClpHo7DjI BNHQzyjx7/9LKGcGo8T6j61QVdYSh49fZAWxmQX4JCZtmw70NwdQnFeio00IosRD4l/XCagr HCUO3VsN1iokECvx5MMf9gmMkgsYGVYxiqeWFuempxYb5qWW6xUn5haX5qXrJefnbmIERuvp f8c/7WD8einpEKMAB6MSD++Cn5OihFgTy4orcw8xSnAwK4nwrlw8OUqINyWxsiq1KD++qDQn tfgQozQHi5I4b5xGXZSQQHpiSWp2ampBahFMlomDU6qBMV7VPtbfoMT/b0ZYf3B5nzbjURe1 46vZjsSmm4a7XCzOvPE5cuap1ylGUSGLNLzfx8/krH6TlF1f6xZSJqJ17OjH91+mOHW90lXk 8d+5yuZRaQZHznXhpJbTf3ZfOXf7gyr35VX6ZyssAlVz5yl/nl8VX6H2oGmK513nH+sns1/b vT3xoGCZEktxRqKhFnNRcSIApax2x9ICAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphluLIzCtJLcpLzFFi42I5/e/4ZV1F2SlRBu92ClncWneO1aKp4y2r xcYZ61ktrnx9z2bROXEJu8WM8/uYLNYeuctucXfDWUaLcw2T2R04PWY3XGTxuNzXy+Qxu2Mm q8f97uNMHn9n7Wfx6NuyitHj8ya5APYoLpuU1JzMstQifbsEroy7j04zFbQJVkyaMpexgXEt XxcjJ4eEgInElpNnmLoYuTiEBJYwSvSfe8YC4TQxSXzb/5IRpIpNwFCi620XG4gtIuAm0XR4 JitIEbPANiaJE7/mgCWEBaIk/rw7DWazCKhK7LjfCNbMK2Ar8aRjMiPEOnmJxd93sk1g5FrA yLCKUSS1tDg3PbfYUK84Mbe4NC9dLzk/dxMjMGy2Hfu5eQfjpY3BhxgFOBiVeHgX/JwUJcSa WFZcmXuIUYKDWUmEd+XiyVFCvCmJlVWpRfnxRaU5qcWHGKU5WJTEec8bVEYJCaQnlqRmp6YW pBbBZJk4OKUaGBlW2GYHbhGysblwfhFbxpdthy/kCmpU9x8/Oj3Y2GZj9bfeFZvNvxmI/c36 5CVqbee5adumsqOHjNLac2TZPn2ZaeltpMcwYV15Q0ROYOjdsq7MkMa3W+Z+KJ5madp2wG5f bkLDwcd71Kpz9sz/9XvDrjOSVixqQu/vHGhXaw9b5iNdk/pqhRJLcUaioRZzUXEiALc5eHgX AgAA X-CMS-MailID: 20180226144345eucas1p177661aa4eacd6a282192c7e28e6872c4 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180226144345eucas1p177661aa4eacd6a282192c7e28e6872c4 X-RootMTR: 20180226144345eucas1p177661aa4eacd6a282192c7e28e6872c4 References: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartlomiej Zolnierkiewicz , Laurent Pinchart , Yakir Yang , Marek Szyprowski MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Patch f0a8b49c03d2 ("drm/bridge: analogix dp: Fix runtime PM state on driver bind") fixed unbalanced call to phy_power_on() in analogix_dp_bind() function by calling phy_power_off() at the end of bind operation. However it turned out that having PHY powered is required for proper DRM display pipeline initialization on Peach-Pit Chromebook2 board, as this board freezes otherwise when PHY power off is called in bind. Fix this by keeping PHY powered for the whole bind/unbind driver life cycle. The freeze is probably related to the fact that the display pipeline (Exynos FIMD CTRC -> Exynos/Analogix DP bridge -> PS8625 dp2lvds bridge -> B116XW03 panel) is already configured and enabled by the bootloader and requires reset of all components for proper shutdown. Having PHY powered is also needed for proper EDID handling, which has been fixed by commit 510353a63796 ("drm/bridge: analogix dp: Fix runtime PM state in get_modes() callback"). Fixes: f0a8b49c03d2 ("drm/bridge: analogix dp: Fix runtime PM state on driver bind") Signed-off-by: Marek Szyprowski --- Changelog: v2: - added comment in the code about Chromebook2 Peach-PIT issue --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index a8905049b9da..5b6c04c44f01 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1419,8 +1419,11 @@ int analogix_dp_bind(struct device *dev, struct drm_device *drm_dev, goto err_disable_pm_runtime; } - phy_power_off(dp->phy); pm_runtime_put(dev); + /* + * intentionally keep PHY powered on, Chromebook2 Peach-PIT board + * freezes otherwise + */ return 0; @@ -1452,6 +1455,7 @@ void analogix_dp_unbind(struct device *dev, struct device *master, drm_dp_aux_unregister(&dp->aux); pm_runtime_disable(dev); + phy_power_off(dp->phy); clk_disable_unprepare(dp->clock); } EXPORT_SYMBOL_GPL(analogix_dp_unbind);