From patchwork Wed Jun 9 21:12:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 456827 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp5671937jae; Wed, 9 Jun 2021 14:12:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTgBKR6E1VZfi0Yllh0DGj3dOhf5xqkcW3hY37guezxIIpywMRp0ziBXKjp9aMKb+1ylAG X-Received: by 2002:a65:6a12:: with SMTP id m18mr1583984pgu.229.1623273136820; Wed, 09 Jun 2021 14:12:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623273136; cv=none; d=google.com; s=arc-20160816; b=iRrTMwsaIoM8xsqCU+vwFoPJTBiBN502vmEn3LQ7wQOzdVMyh7kwRqCg1vffRVkVBF dGi1VvDSa38MwZu6rWABS/7iPKCwOcZq77ouKjl91MM+Gp4TA6NWhCGcLOEhjPF6fPyR YXqRbzMuI7EdIWzmUT/2do0tb4Nichcjk747Ap54nwMddOjMAx8xZ1YjPPupzjWyqJsi 5AKf/bKnfCJa5wE3UgmHdmzTmetrm5e7/jpF/V4/GXLb+GiCzGjAm5+6OInZy3qdf8lh hJck5Tct4BUFfWHr38I3WQwFkLyQPZNdKpzbgJjRx1xBUWRxapjeP8/6MqXerkP35JyX n6dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :delivered-to; bh=ts8DwiaDqPOs2OwdpZWZvH9efpSW/cfgQfXfr2VJnsY=; b=tdA/THO3OJULdeZs+2OM2RhKQZzI5wkcjbSqtF/CRd9t6ndyJ1qYw5HzGHyzT7p4mG AjgOciaU5BwmWeL/CF2BkGzkYrifXUbPN02GZVPxUNVaFgHm/x+KHEGPdGtK9CgokW8I lls+3jl8YXBWzO2XQoxJGz2Aep+bVAr8UjvgV9Y+CcKZoaT2cQSIi5jSysnAKBw8odkA y1rPOmVL2RvdKTumnqsGIKQrYfFgwv5qjsEr3u4r4cgH+ZZ6verPH5Cmvz5lFfYr+w0f xu2S2N53rH1fqM3DAsuau9vIJoCV9kDOKMlE6GmtHgklY2EW8W7Kez8CNVrx1stF5t8E BY8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=qB6efk8W; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id az23si7710031pjb.87.2021.06.09.14.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 14:12:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=qB6efk8W; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A07C16E151; Wed, 9 Jun 2021 21:12:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by gabe.freedesktop.org (Postfix) with ESMTPS id BF9496E151 for ; Wed, 9 Jun 2021 21:12:14 +0000 (UTC) Received: by mail-lj1-x230.google.com with SMTP id u18so1632479lju.12 for ; Wed, 09 Jun 2021 14:12:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ts8DwiaDqPOs2OwdpZWZvH9efpSW/cfgQfXfr2VJnsY=; b=qB6efk8WElbeGE4xkHwIJoJRj6pWdF2CQRTPayPhe7XJlXaCsGpankVzP4BGpJ/kcH NJux/CPKhxHQ4qbPoVUClT6qO6qA9hid44j8x8MJu9bk6UvEqJg1c/j83GzyDeHo4TOz 2frDpgoEU2XMktH5vaLeLPGv5Y+vs5nAZTJGqfE8q2YraucJNTgea/79IhX0L6KoINC5 IiagOx74PxGjqwkH4YVjJu9tmOvDlTAi2dvQDZg9HrCSO3u5jf81lF7IGot/rFV1Y2qJ Di26JKunUoKcbdDOlILJFLWCK0Nx3oRrDZwgTDh4sR5ornwiProFxFbS5pR66cOAQ+40 BUtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ts8DwiaDqPOs2OwdpZWZvH9efpSW/cfgQfXfr2VJnsY=; b=JEuqkOYvX7nJtq8hTDdpNzPB3RHqwdl02lEEwb1yxFXa5knYH19OdZ0K41FlCyQxF7 qaS5r8zRq6UIl4QQQ6yT6qpejy7qsTD2nI9eAMArizCfobh8ArXo4HuzS9MzrxgF/HTF VGOEP4TYDyGYb9Ot9uhpQqRtj5zRfnZpQgr95myk4ULwkJVVxfozstl+WKOGbE6BGGg3 TJn7AmNvHhU6sCg5cxf8Q9R5hqHocAFGKmTaGA5EcKU2EW6C9EVq/WhsCyxyxXQf3MbZ IlIbYKUqa299eEv22Nge9X0nQsLu8Yv0cLabxKGsKw9LBwl8pidWZbjkqOYWw+gZzt7d RLiA== X-Gm-Message-State: AOAM532LgxMzx3TQ+bA/yHjmSCo3nNsu5zymBVJtXGaqUmy8PLi3MjJH wcr7ySyAnDkCwaBfzGGvOBabeA== X-Received: by 2002:a05:651c:2113:: with SMTP id a19mr579037ljq.431.1623273133115; Wed, 09 Jun 2021 14:12:13 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id k24sm93130lji.76.2021.06.09.14.12.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 14:12:12 -0700 (PDT) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH] drm/msm/dsi: do not enable PHYs when called for the slave DSI interface Date: Thu, 10 Jun 2021 00:12:11 +0300 Message-Id: <20210609211211.2561090-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jonathan Marek , Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Move the call to dsi_mgr_phy_enable after checking whether the DSI interface is slave, so that PHY enablement happens together with the host enablement. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_manager.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.30.2 diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c index cd016576e8c5..9243edada9ba 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c @@ -373,14 +373,14 @@ static void dsi_mgr_bridge_pre_enable(struct drm_bridge *bridge) if (!msm_dsi_device_connected(msm_dsi)) return; - ret = dsi_mgr_phy_enable(id, phy_shared_timings); - if (ret) - goto phy_en_fail; - /* Do nothing with the host if it is slave-DSI in case of dual DSI */ if (is_dual_dsi && !IS_MASTER_DSI_LINK(id)) return; + ret = dsi_mgr_phy_enable(id, phy_shared_timings); + if (ret) + goto phy_en_fail; + ret = msm_dsi_host_power_on(host, &phy_shared_timings[id], is_dual_dsi); if (ret) { pr_err("%s: power on host %d failed, %d\n", __func__, id, ret);