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: 12311163 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F79FC48BCD for ; Wed, 9 Jun 2021 21:12:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2B58B613EE for ; Wed, 9 Jun 2021 21:12:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B58B613EE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.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) 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-Google-Smtp-Source: ABdhPJxfRYXQjSzaFokCrJrThcfusHj/YwvYPxQ0C2/I6g+9g2UmLnKTBe+UUgUB8fatAO0nyvtKQg== 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(-) 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);