Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2632402rdg; Mon, 16 Oct 2023 09:57:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFqRfywxpiuP31u5+D3+nODpVMHuWE9yEetWK2YO3MZz/tQ1xJGwC4LquZ9h9JOv/D1M0DB X-Received: by 2002:a05:6a00:2d07:b0:6b3:aded:7e9a with SMTP id fa7-20020a056a002d0700b006b3aded7e9amr7354876pfb.27.1697475461871; Mon, 16 Oct 2023 09:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697475461; cv=none; d=google.com; s=arc-20160816; b=dpUOJHJunAhVMPmyRhmssOG8yTD0SIX0gDWJGPhscWACBHIV2fwyQfx0W+kQPLWkfe q/RUL0xFSNAFZTzIic9ORjKZOc2Pxzb4Hup/y5wmJL5Rk7oZvq5JSaTe5qbXfITywbUs RkZaa3m8yZVxjQqMXYG0YHZlgZyPSoSVcB+/bktcFCBosonFSBtQqLYGiZ7RyC5e2TE8 KwzqTW4ktrFoMcSWEZ/teddX1/n56bQsmQKAcgdwLCiHV8G2oFD9ohG66PMBfujPJGQi DHtJkNov77fYXDkN+B7ud5RtIa5yNQYU5WtKAGAoJ7cJ4xk+m6DcU6DzfL1WDUjVZi+E WnSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Gh1i1qC5dBtLH8fnR85p04AUelnLL/86pQbMA34ZucQ=; fh=OT/8nNJKNCzw+WY7QnVxvWUM5gQckqwqCjGb4xh5RlI=; b=usj5D7XbYCLkqXQ6MIzKWn1uEyAYWZb8dH9NsKq0NbpDM0EyO3UvXlUQE9ThqBCLU7 oFdOAtWAO/lz3cSSvUX4HqDKQWAT2VZjtD0pSQP7yzGuXHq5dFcHDE+an7JYKiOTL7H3 v5Gk36zyhihcma6L3LWDolFPwc+NzrzmCBQQ0td75pEwU8QoH2puZt9QV8wAPKNR0yd2 Qiw2jni4WB/fZz0SMSSRcWe04ak5kLkasQHcYexyIanrbJ7pUi1zCKdWoTh1S5/JJAEl eubXV6k1oOj0zPqu/XLGQQddLc4kZUclzMegDwuy8ls+jjoiBAM/hWiDwIU/E/ousg+T EHOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vzHcoHsL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id 23-20020a631957000000b0056a1a149034si11212334pgz.650.2023.10.16.09.57.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 09:57:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vzHcoHsL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4B4DC802A82D; Mon, 16 Oct 2023 09:57:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234587AbjJPQ5e (ORCPT + 99 others); Mon, 16 Oct 2023 12:57:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234455AbjJPQ4k (ORCPT ); Mon, 16 Oct 2023 12:56:40 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 174A22133 for ; Mon, 16 Oct 2023 09:54:07 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40684f53bfcso44071365e9.0 for ; Mon, 16 Oct 2023 09:54:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697475245; x=1698080045; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Gh1i1qC5dBtLH8fnR85p04AUelnLL/86pQbMA34ZucQ=; b=vzHcoHsLhS7Ac6lXY9AEuKugvuwVMLa/702wfzhO2OHGHKi92a1lWVDvVcE39Et4xE mmxy3c9tqYzuAj9FO6qTYdUUMNY6Mz6aAFrHYYZhEfWyqBQTZ7VOO/QRd393HiTkdW78 zFw8SkPNo8Vclboj6FXPIsWrKiKrvZ0wlRfSRm1/Q58jamBoexjbMh01OeUHxPcluZZP UadpRGfKMDdFd1pL4X5BobrqU5q8sbC7FE8D2lsKPfG/y8mTOONjQMpapdahirOAcuRZ CkTJk5PbL5UMu/woAY7hXO/Gw4mdT/7TXELSW5Mo5o/j0XS0gL2JIwTeeHgEd9zu6jzu EHUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697475245; x=1698080045; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gh1i1qC5dBtLH8fnR85p04AUelnLL/86pQbMA34ZucQ=; b=PBW1OXcskAKvP905b21DXDnvRV7Xep6TUBvQ/v+DO/U/aCp/uhOqd50mqB4tvd0Qpo 3QrKIsmxpaBNFOz/IqIX8Y7JfPCL8YSjqJR2l3Sinw+DfGFkQhmGPe3B2kctxr70A1w7 XDE8AQUSMgZ7C1aef1BhjTsYqF+lboXh9Dw3tWGrQ2ieWxeop9DoUa0hpTMhiBpQzIz6 zlfhMc+Isk6QArMDnbyizF//+bZkoocjwtfCzq9rr94TRFq02n6Sg4H3ivdWYkUQNHW4 uIPOX+5hveoxe5xzx3fYu6TGqAbFuMNAbK6KcRtmQIx7SqeuZmgsU/EL/YQf9iULaW2f pXRg== X-Gm-Message-State: AOJu0YwhNd9wWkIhWYFKQdXG4GFp5+e5LCLIZPx1aQhMTs6qUCw7Dy5y iKeltqNDQC4xEvRGCSQYayNc+g== X-Received: by 2002:a7b:c419:0:b0:3fe:d630:f568 with SMTP id k25-20020a7bc419000000b003fed630f568mr29322698wmi.39.1697475245495; Mon, 16 Oct 2023 09:54:05 -0700 (PDT) Received: from eriador.lumag.spb.ru ([45.84.211.189]) by smtp.gmail.com with ESMTPSA id s19-20020a05600c45d300b0040648217f4fsm7638996wmo.39.2023.10.16.09.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 09:54:05 -0700 (PDT) From: Dmitry Baryshkov To: Dave Stevenson , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Douglas Anderson , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , Konrad Dybcio , Jessica Zhang Cc: Marek Vasut , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org Subject: [RFC PATCH 04/10] drm/msm/dsi: use dsi_mgr_bridge_power_off in dsi_mgr_bridge_post_disable Date: Mon, 16 Oct 2023 19:53:49 +0300 Message-ID: <20231016165355.1327217-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231016165355.1327217-1-dmitry.baryshkov@linaro.org> References: <20231016165355.1327217-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 16 Oct 2023 09:57:40 -0700 (PDT) Simplify dsi_mgr_bridge_post_disable() by using dsi_mgr_bridge_power_off() instead of hand-coding the same call sequence. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_manager.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c index 896f369fdd53..9fa1f29ec11a 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c @@ -372,8 +372,10 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge) * It is safe to call dsi_mgr_phy_disable() here because a single PHY * won't be diabled until both PHYs request disable. */ - if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) - goto disable_phy; + if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id)) { + dsi_mgr_phy_disable(id); + return; + } ret = msm_dsi_host_disable(host); if (ret) @@ -385,26 +387,10 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge) pr_err("%s: host1 disable failed, %d\n", __func__, ret); } - msm_dsi_host_disable_irq(host); - if (is_bonded_dsi && msm_dsi1) - msm_dsi_host_disable_irq(msm_dsi1->host); - /* Save PHY status if it is a clock source */ msm_dsi_phy_pll_save_state(msm_dsi->phy); - ret = msm_dsi_host_power_off(host); - if (ret) - pr_err("%s: host %d power off failed,%d\n", __func__, id, ret); - - if (is_bonded_dsi && msm_dsi1) { - ret = msm_dsi_host_power_off(msm_dsi1->host); - if (ret) - pr_err("%s: host1 power off failed, %d\n", - __func__, ret); - } - -disable_phy: - dsi_mgr_phy_disable(id); + dsi_mgr_bridge_power_off(bridge); } static void dsi_mgr_bridge_mode_set(struct drm_bridge *bridge, -- 2.42.0