From patchwork Thu Feb 17 05:55:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 543375 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp136695imn; Wed, 16 Feb 2022 21:55:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxslb/FfwKyxcBJPGYqij2nACOSEscStVMji/5GxVdFxn33edThjCVZSv/dg71f+9u1Zieg X-Received: by 2002:a17:90b:2496:b0:1b9:a6dd:ae7 with SMTP id nt22-20020a17090b249600b001b9a6dd0ae7mr5655906pjb.35.1645077351671; Wed, 16 Feb 2022 21:55:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645077351; cv=none; d=google.com; s=arc-20160816; b=qBaAxZFFwc0G42V76u2IRLWo1dqpuRpS/0Vn8M1URyvxnrIm706cYmR6z/G2t4L87E T4/E/D9q7bwGJz/WIJAC874XAY3Ikq7kmqpE8YdfLQmpj76rHIsYLDAmiAiUO/vVoSmm 8WmTTtMS+H8LVVe7SGpnAleH3M9dmVcwzSQkhNFaKP6REo8By4Nq5+iKrsuKbMcwAv7U UXC2hAdr5X7JT8I+7FlDLDAaNCtdNxpI+qQDcs7hssLtbO3e9oIwhT/+Zru8BDt0r7+h BVaoFOg2BUcDoROc9UiK0nxtA1eCDy2SQQXyBkTmwTT61yGrXLGOTw4Oymry6yU1Vm5H vRcA== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=ELWJzwknTbo8V/NBjl+dsOP5IJD11EhzymdHIJHz4Lo=; b=HTvDiy/XgemKuexZGEcA0F/BqW8GvEZ9GyQkLU3bPfHLTRAfE9NyJND7gwrvMB8PRB Yo7v3a7WfE0uYcQyKcAtYdcdmrwXTY7gJIuRL77yBE/t4WEzwZEMAgwYcmZ8m1fpxreA 3S2AFptOLktBe2udw74FUzCXIO8GS2AE3ka8iOwHCstMrr1GQBLIKxgvWloa4ZsNNeel 9lQvHxGmlKl9DWmrBjMg6f6s+MKLupLXzN+5lTAM4F9a46UzBLESJxm56qUHEt/I2AWi BfNhj8nmNsXizXipsxYI6LDXgMmCmyQELQ/ngwNZYdvIHA/q8Nnps5BoRDAVrq6Ke7mY 8ekQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=yCDDfsBM; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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. [131.252.210.177]) by mx.google.com with ESMTPS id h17si6682389pgb.824.2022.02.16.21.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 21:55:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=yCDDfsBM; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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 AB20310E716; Thu, 17 Feb 2022 05:55:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2C46010E708 for ; Thu, 17 Feb 2022 05:55:36 +0000 (UTC) Received: by mail-lj1-x231.google.com with SMTP id e17so6679077ljk.5 for ; Wed, 16 Feb 2022 21:55:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ELWJzwknTbo8V/NBjl+dsOP5IJD11EhzymdHIJHz4Lo=; b=yCDDfsBMHBjAf/YtdEVTAviPOlHteynapJRfsV8un6d4eyfRZPbUdrr7H1jHc9RLu7 S2ubQ2F5ghpCmdgyuZpO5QWmETu1rJ4LarnZNlV5q2XktSQ2PGHjj7H4UrzBSbdKMm5u maMBoW4nCw929vnJF7aaakSeiXCyiZDFNDq4M42XorEDHXMauy53AXFcYXBZbo+y8Wdg BYt4uSDCWkGGG8vpS0cztMbzcwOKsnGLXml/ywMlVx0g4lh/qdyIOeqReO0KGIPn1SRm THkzjnZioicHP5gFvfWIciN5HlnF7WXpII1wPZ4kqKTFzJq5HItSqnU9dQFnbIJL3lqb p6Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ELWJzwknTbo8V/NBjl+dsOP5IJD11EhzymdHIJHz4Lo=; b=hqmaUK1bWs5C3OQKvBGirRWuhiu0w55T3FmchXyrOq1EDwxP6JUifmK+IHu4g0nqY5 bzDgzo6kcPg3tQJYlusYcU4HWeg9wQXzwQ7wnm7jAJLg9Vb7IVDJXywvexch+FKTrItV Q4FBLyQILtTxHixeAGo2+LkT7jKDCLsdrwQmsNq/BoOcpCaa8lvC5IQHyrXPpeV/6NOS v/VeiHifnKrqYrQgpH7sZvDcRTRNxeAHFFXP7IDabsr5OPPNo41sHaFjd/FdF8ThXbwV aK+qKZkYhGuRjYrTqRjcFu1kj5/pEJUoJk8YcWkj/zcYt5qjzF6uvi/gonL01q+B2EOw XzSA== X-Gm-Message-State: AOAM533SEa3n75gJXJ6o8PLAow/fq3O/riik9adzRb92wFUdd3F+qEMt 0gx+kmMUk0UVeBp/miX9cFb9qA== X-Received: by 2002:a05:651c:160a:b0:23d:1418:8db2 with SMTP id f10-20020a05651c160a00b0023d14188db2mr1069229ljq.361.1645077334537; Wed, 16 Feb 2022 21:55:34 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u13sm5015998lfs.260.2022.02.16.21.55.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 21:55:34 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v5 4/5] drm/msm/dp: inline dp_power_clk_set_rate() Date: Thu, 17 Feb 2022 08:55:28 +0300 Message-Id: <20220217055529.499829-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220217055529.499829-1-dmitry.baryshkov@linaro.org> References: <20220217055529.499829-1-dmitry.baryshkov@linaro.org> 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: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Inline the dp_power_clk_set_rate() function, replacing it with the call to msm_dss_enable_clk(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_power.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_power.c b/drivers/gpu/drm/msm/dp/dp_power.c index 6920d787e7aa..8d63a51cce7d 100644 --- a/drivers/gpu/drm/msm/dp/dp_power.c +++ b/drivers/gpu/drm/msm/dp/dp_power.c @@ -150,21 +150,6 @@ static int dp_power_clk_deinit(struct dp_power_private *power) return 0; } -static int dp_power_clk_set_rate(struct dp_power_private *power, - enum dp_pm_type module, bool enable) -{ - int rc = 0; - struct dss_module_power *mp = &power->parser->mp[module]; - - rc = msm_dss_enable_clk(mp->clk_config, mp->num_clk, enable); - if (rc) { - DRM_ERROR("failed to %d clks, err: %d\n", enable, rc); - return rc; - } - - return 0; -} - int dp_power_clk_status(struct dp_power *dp_power, enum dp_pm_type pm_type) { DRM_DEBUG_DP("core_clk_on=%d link_clk_on=%d stream_clk_on=%d\n", @@ -187,6 +172,7 @@ int dp_power_clk_enable(struct dp_power *dp_power, { int rc = 0; struct dp_power_private *power; + struct dss_module_power *mp; power = container_of(dp_power, struct dp_power_private, dp_power); @@ -214,9 +200,11 @@ int dp_power_clk_enable(struct dp_power *dp_power, } if ((pm_type == DP_CTRL_PM) && (!dp_power->core_clks_on)) { + mp = &power->parser->mp[DP_CORE_PM]; + DRM_DEBUG_DP("Enable core clks before link clks\n"); - rc = dp_power_clk_set_rate(power, DP_CORE_PM, enable); + rc = msm_dss_enable_clk(mp->clk_config, mp->num_clk, enable); if (rc) { DRM_ERROR("fail to enable clks: %s. err=%d\n", dp_parser_pm_name(DP_CORE_PM), rc); @@ -226,7 +214,8 @@ int dp_power_clk_enable(struct dp_power *dp_power, } } - rc = dp_power_clk_set_rate(power, pm_type, enable); + mp = &power->parser->mp[pm_type]; + rc = msm_dss_enable_clk(mp->clk_config, mp->num_clk, enable); if (rc) { DRM_ERROR("failed to '%s' clks for: %s. err=%d\n", enable ? "enable" : "disable",