Received: by 10.213.65.68 with SMTP id h4csp787923imn; Tue, 13 Mar 2018 23:15:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELt2XSFxSaCo4seCq3tfrvf43SXRINbrCHH1MHCyByzz9iqI17x2M0u4XSNvv/L7ocz97/O5 X-Received: by 2002:a17:902:7843:: with SMTP id e3-v6mr3027317pln.83.1521008138387; Tue, 13 Mar 2018 23:15:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521008138; cv=none; d=google.com; s=arc-20160816; b=cgmy31BUPNiDbBhzWfMUsPOVGhZFbxYoe/8L1wNRxKnYh/EeLati24Dxyi7JmR84KL e5mqF5xGgfSKvuowQGsT9ImViLjhgUqd535nBP+xbd31dGAFtjYMBAPXbgr+ktF23gE3 NE3Q3HE3f1teq3W7AlmlBInHjYkj24NjZt36CnUBRk1lE/uTb/u+dzVPlZZjNqZdC4TW iKb6JyqC9OOcTKDMpKmIkfMuiH4aRcITqdNBaX1gyjAblI0z+3JPYq0GOeZgDz7ZZQHx aeyTUa6qR+Ymj9FZdx6mgS02gwVwCmmkcl7ySqglacqER/FCqavnV0j0Hh4M6ntRujC1 30/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=6rNApSPYPD4VOefKaCNSqWmG7BhcO00e1Z72FfzMhHo=; b=tpwkTXbvGHLtGrpFQj2T7FNBJcGznKARIEZD8yO+cudY6HY1JIGKhcvO/DIlD/xh4Q Z1UJNh8+Xfq3UfA0JfPXDsb9JagJXhoSQNuiN4D02Ye09f5KCFA2nkk5vPBXB4aYsbGc Acz4tdrd0tuVQaw84zjNcQsLaTGIe7z3VMs4IsMCW/Sj4jjeeEQP4IAekMCSPWjNs/SE 9p+VFPElzUrtAG/7b52Gaq4BAvDTOjUIKVN0hnw52XVEoO9XNW1AxnhkSrV2b8O+RQhY x1WDA4tGgDZmnRpgLn/mZ/LbWLWg8gCDtSTby9ErMOl0JPB0xp15CWCpp5VhKCwe1phF sD3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=dnl1ek9z; dkim=pass header.i=@codeaurora.org header.s=default header.b=DaIE3HeZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m75si1548248pfg.64.2018.03.13.23.15.23; Tue, 13 Mar 2018 23:15:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=dnl1ek9z; dkim=pass header.i=@codeaurora.org header.s=default header.b=DaIE3HeZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753352AbeCNGO3 (ORCPT + 99 others); Wed, 14 Mar 2018 02:14:29 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:38674 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751272AbeCNGO1 (ORCPT ); Wed, 14 Mar 2018 02:14:27 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id CD7CB6081A; Wed, 14 Mar 2018 06:14:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521008066; bh=43ZBkqxyV4lMfoii4VCkPA3BLYQ4WcmRlPTEY4w2jIA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=dnl1ek9zGJn0ilRrk4eP5FGK5+Iy9/XHQERunh3KsX3P7B6BkX3pl7/QFY1vvVNlH ShtEe+RG1koFBBpkqDAnpTb9fDe2oJXiaa/K+KkBe/tpgGUx2sTaLo7aoatWIh3yio kMsPzlvJRQuXOh8wT9umZTlHCRnuQrPlvlaPTgBM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.1.84] (unknown [182.71.117.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: architt@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2741360314; Wed, 14 Mar 2018 06:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1521008065; bh=43ZBkqxyV4lMfoii4VCkPA3BLYQ4WcmRlPTEY4w2jIA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=DaIE3HeZm0nU0dnjj09/VojM6W0OSdrpUUfxRYE+5d/r2PUHy6FNwvBuZ5yVGCmd5 CXPTTj9MrhqlyUBCWdKHxaZ+GkTbJPUd2wfYYVOpP8YDnz1LszvtRET0QEuqmCa+/U LRWqAkRy36f6CobN55kzM0NqWSu0LbTZynjDpDJ0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2741360314 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=architt@codeaurora.org Subject: Re: [PATCH v5 13/36] drm/bridge: analogix_dp: Ensure edp is disabled when shutting down the panel To: Enric Balletbo i Serra , inki.dae@samsung.com, thierry.reding@gmail.com, hjc@rock-chips.com, seanpaul@chromium.org, airlied@linux.ie, tfiga@chromium.org, heiko@sntech.de Cc: dri-devel@lists.freedesktop.org, dianders@chromium.org, a.hajda@samsung.com, ykk@rock-chips.com, kernel@collabora.com, m.szyprowski@samsung.com, linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, rydberg@bitmath.org, krzk@kernel.org, linux-rockchip@lists.infradead.org, kgene@kernel.org, linux-input@vger.kernel.org, orjan.eide@arm.com, wxt@rock-chips.com, jeffy.chen@rock-chips.com, linux-arm-kernel@lists.infradead.org, mark.yao@rock-chips.com, wzz@rock-chips.com, hl@rock-chips.com, jingoohan1@gmail.com, sw0312.kim@samsung.com, linux-kernel@vger.kernel.org, kyungmin.park@samsung.com, Laurent.pinchart@ideasonboard.com, kuankuan.y@gmail.com, hshi@chromium.org, =?UTF-8?Q?St=c3=a9phane_Marchesin?= References: <20180309222327.18689-1-enric.balletbo@collabora.com> <20180309222327.18689-14-enric.balletbo@collabora.com> From: Archit Taneja Message-ID: <4bdae224-4a88-db7e-f2d7-358232d0d406@codeaurora.org> Date: Wed, 14 Mar 2018 11:44:09 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180309222327.18689-14-enric.balletbo@collabora.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday 10 March 2018 03:53 AM, Enric Balletbo i Serra wrote: > From: Lin Huang > > When panel is shut down, we should make sure edp can be disabled to avoid > undefined behavior. Reviewed-by: Archit Taneja Thanks, Archit > > Cc: Stéphane Marchesin > Signed-off-by: Lin Huang > Signed-off-by: zain wang > Signed-off-by: Sean Paul > Signed-off-by: Thierry Escande > Reviewed-by: Andrzej Hajda > Signed-off-by: Enric Balletbo i Serra > Tested-by: Marek Szyprowski > --- > > drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > index 92fb9a072cb6..3a222e7e46ee 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > @@ -1160,6 +1160,12 @@ static int analogix_dp_set_bridge(struct analogix_dp_device *dp) > > pm_runtime_get_sync(dp->dev); > > + ret = clk_prepare_enable(dp->clock); > + if (ret < 0) { > + DRM_ERROR("Failed to prepare_enable the clock clk [%d]\n", ret); > + goto out_dp_clk_pre; > + } > + > if (dp->plat_data->power_on) > dp->plat_data->power_on(dp->plat_data); > > @@ -1191,6 +1197,8 @@ static int analogix_dp_set_bridge(struct analogix_dp_device *dp) > phy_power_off(dp->phy); > if (dp->plat_data->power_off) > dp->plat_data->power_off(dp->plat_data); > + clk_disable_unprepare(dp->clock); > +out_dp_clk_pre: > pm_runtime_put_sync(dp->dev); > > return ret; > @@ -1233,11 +1241,14 @@ static void analogix_dp_bridge_disable(struct drm_bridge *bridge) > } > > disable_irq(dp->irq); > + analogix_dp_set_analog_power_down(dp, POWER_ALL, 1); > phy_power_off(dp->phy); > > if (dp->plat_data->power_off) > dp->plat_data->power_off(dp->plat_data); > > + clk_disable_unprepare(dp->clock); > + > pm_runtime_put_sync(dp->dev); > > ret = analogix_dp_prepare_panel(dp, false, true); >