From patchwork Wed Feb 21 10:04:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 129006 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp442478ljc; Wed, 21 Feb 2018 02:05:01 -0800 (PST) X-Google-Smtp-Source: AH8x225Uu6Aoc8IP7TRRe6wcxT6/nnBIFEAOpOqkWWY4QucSx9InxiBbnnub7hsCJcZmvockA+cQ X-Received: by 10.98.73.4 with SMTP id w4mr2736550pfa.227.1519207501383; Wed, 21 Feb 2018 02:05:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519207501; cv=none; d=google.com; s=arc-20160816; b=sR6JrdGROUzO+tazgDRYcK9LnRg0sIEReETMcT0JgSeuG0QggoIJK4nIkpYsoxRlKn kR/lfBJDpgQPCwHc7QLJCICXtXOqInjaHuARAdDVwdpLrl69N9cKsgYE7Fz2W+YFprk4 5Iy2NOuofxNE53AzhMYCNUgj4lNTAb9v+otnbv0HWn+XqhTP5I8eQcuNGabsw+2gH8kO hHTTgihpAUeZNmcqH7FsINhAqVspAQY/ESw6LGROlONFGHj+mtSH7CpBGbQNYH8ux0ru WTfnXtIVtlQTaSOpLsjkDAjcUqASAqbAfyQaThYKV2znZHgDc7wRp9dt0GLr/t5o/2IO cAew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=asGpXzq6xLdqRcbYfXxQFd8qY3Y8S3cGDHg5j59sP74=; b=beT6ibNloiGNLVroop4QqkciGpPsjWCNRm4xzu1qFQjliSXBkO64TtWD4L5Xg0UFj+ exgTveqPhhZPaGaL2nsYfcK6rJJ8Fe3o9ji10acMBfFK5MJCcoKj29KgQIh/WbaNhLOO 9Q+dembQiHr3NWrOb9I37yVtDn84yPC86XndftQTWGxqLIq4IdZSYPKPkGRjS5ChL4Zz 7NCq9Cd3rQeKOW8Z23Vk1upSjcbAvv2gUHmTPfYmolHbpPlJCAoe/ufBqk5CcjY8LjK4 ycHj+qvScfQGumJ0HzucPbDrnRur2w09iHJH/eh0LNFntSiwwODHYwgxjuIN3YUYlhCz JLuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=jilgu8Td; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b127si1075916pgc.220.2018.02.21.02.05.01; Wed, 21 Feb 2018 02:05:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@samsung.com header.s=mail20170921 header.b=jilgu8Td; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932651AbeBUKFA (ORCPT + 3 others); Wed, 21 Feb 2018 05:05:00 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:48209 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932631AbeBUKE7 (ORCPT ); Wed, 21 Feb 2018 05:04:59 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180221100457euoutp01ad6f986686f5b7104a3e430aed44dbcb~VTyt8Jr9w2654826548euoutp01r; Wed, 21 Feb 2018 10:04:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180221100457euoutp01ad6f986686f5b7104a3e430aed44dbcb~VTyt8Jr9w2654826548euoutp01r DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1519207497; bh=n0kP1PULpLz/nfvF+40UzkVz4k2d9xlmmuPxHZayDMo=; h=From:To:Cc:Subject:Date:References:From; b=jilgu8TdavGUvhabds2AevQZxxeXsQ7fwx8JTG6s8YGgTZ4uRdqOEj7MJDMZLazrY mBLSLrckk2ftup+0eyzTPDs4XVnGXs3NmtHpD1yS136+eVwqcM5h+RaTQN198P/pPB ersV0I7OBvnv8FXTyfe7Va02ZhZLEKbanqMKqSc8= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180221100456eucas1p2952528b1ea5e1dd194b20f724122d457~VTys9CC0d1065610656eucas1p2r; Wed, 21 Feb 2018 10:04:56 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 74.0A.10409.7444D8A5; Wed, 21 Feb 2018 10:04:55 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180221100455eucas1p1613b6fa148d3e8a80f0053a3542aaa18~VTyr2pHK00181901819eucas1p1Y; Wed, 21 Feb 2018 10:04:55 +0000 (GMT) X-AuditID: cbfec7f5-b5fff700000028a9-41-5a8d4447cd0a Received: from eusync3.samsung.com ( [203.254.199.213]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 9A.21.04178.7444D8A5; Wed, 21 Feb 2018 10:04:55 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P4H00KFGW015V30@eusync3.samsung.com>; Wed, 21 Feb 2018 10:04:54 +0000 (GMT) From: Marek Szyprowski To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Archit Taneja , Yakir Yang , Sean Paul , Bartlomiej Zolnierkiewicz , Laurent Pinchart , Andrzej Hajda Subject: [PATCH] drm/bridge: analogix_dp: Keep PHY powered from between driver bind/unbind Date: Wed, 21 Feb 2018 11:04:43 +0100 Message-id: <20180221100443.13041-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.15.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFIsWRmVeSWpSXmKPExsWy7djP87ruLr1RBj9XWFncWneO1aKp4y2r xcYZ61ktrnx9z2bROXEJu8WM8/uYLNYeuctucXfDWUaLcw2T2R04PWY3XGTxuNzXy+Qxu2Mm q8f97uNMHn9n7Wfx6NuyitHj8ya5APYoLpuU1JzMstQifbsErozTJyeyFuzjrzj3dw1TA+Nk 3i5GDg4JAROJ/6eKuhi5OIQEVjBKbD/Tzw7hfGaU+Dx9HTtMUUuPDER8GaPE1389jF2MnEBO A5PEvDYNEJtNwFCi620XG4gtIuAm0XR4JitIA7PAFiaJxzs3s4MkhAViJM7sewBWxCKgKnGl 7RYzyAJeAVuJN8eTQMISAvISi7/vZAPplRDoYJPY+OAqG0TCRWLLuwvsELawxKvjW6BsGYnO joNMEA39jBL//r+EcmYwSqz/2ApVZS1x+PhFVhCbWYBPYtK26cwQr/FKdLQJQZR4SHRNOQQV dpSYctUX4slYiS8fVzJPYJRcwMiwilE8tbQ4Nz212DgvtVyvODG3uDQvXS85P3cTIzBGT/87 /nUH474/SYcYBTgYlXh4LXR6ooRYE8uKK3MPMUpwMCuJ8FYK9UYJ8aYkVlalFuXHF5XmpBYf YpTmYFES543TqIsSEkhPLEnNTk0tSC2CyTJxcEo1MDI3rd36cvXLY6scrjnt0HPQ4/dqbs+I lLjTc+62wfU9lkE+ZztY+xKPemhcaNnPdXRFyUTmDfcP//f5FNW+rlsy9tjxaWHqAhyHJ7If LGvY96Bz1ctbYYzMG6ckrS2+a8d44tSvuVPP789MDl1p/EZO16/Htq2el2Od41PW5gNhTXc/ 7EhaXqvEUpyRaKjFXFScCACKGCOlzQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpiluLIzCtJLcpLzFFi42I5/e/4VV13l94og+tLuCxurTvHatHU8ZbV YuOM9awWV76+Z7PonLiE3WLG+X1MFmuP3GW3uLvhLKPFuYbJ7A6cHrMbLrJ4XO7rZfKY3TGT 1eN+93Emj7+z9rN49G1ZxejxeZNcAHsUl01Kak5mWWqRvl0CV8bpkxNZC/bxV5z7u4apgXEy bxcjB4eEgIlES49MFyMXh5DAEkaJr0dusEA4TUwSB6/1M3cxcnKwCRhKdL3tYgOxRQTcJJoO z2QFKWIW2MYkceLXHLCEsECMxLRZfWA2i4CqxJW2W8wgG3gFbCXeHE8CCUsIyEss/r6TbQIj 1wJGhlWMIqmlxbnpucWGesWJucWleel6yfm5mxiBIbPt2M/NOxgvbQw+xCjAwajEw2uh0xMl xJpYVlyZe4hRgoNZSYS3Uqg3Sog3JbGyKrUoP76oNCe1+BCjNAeLkjjveYPKKCGB9MSS1OzU 1ILUIpgsEwenVAOj6iZp5aSNeqWP3W9VJbkdkG+yKherz1yp5nLBd6HyugTpKyeFpzLMtCtf rs6RtTaCt/zw7nUSSin1yqff2ZpadZvxzrpSofD1umX+radV2czFPRtFVlftPmaeUVn8oTJe +VCAlWmg9qpr+Rfz66R6w9kYAkNVbzTrP8q14pB3vJBlZvF/rxJLcUaioRZzUXEiADI7NM0V AgAA X-CMS-MailID: 20180221100455eucas1p1613b6fa148d3e8a80f0053a3542aaa18 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180221100455eucas1p1613b6fa148d3e8a80f0053a3542aaa18 X-RootMTR: 20180221100455eucas1p1613b6fa148d3e8a80f0053a3542aaa18 References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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 require reset of all components for proper shutdown. Having PHY powered is also needed for proper EDID handling, which initially 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 --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.15.0 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index b2756bc4225a..42595863cb03 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1415,7 +1415,6 @@ 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); return 0; @@ -1448,6 +1447,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);