From patchwork Fri Dec 29 22:56:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 759118 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 738B614F78 for ; Fri, 29 Dec 2023 22:56:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Xa06FCAV" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-50e7abe4be4so5050741e87.2 for ; Fri, 29 Dec 2023 14:56:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703890614; x=1704495414; 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=n4pFhJH5mQfqCVMvmQQbHNi1KAwIKvpP2d1YL1kukAk=; b=Xa06FCAVbn+gtkVNpSGN0dF/qaHJYTomJ9W02pE/2HwM6JcB7J8/IfpLMoJEJIaNak dqLkEKpZAV2x1CC1tJFwBvz6C+Y1PPYVMeL7A7yom/4u2l68TMyyqVbQQkE/LosYgEOi OMn+DaOg2pVPdvmJo/5MJcgvko9nRaLTghi2hiLiG6NBpKMWqDbTbbNs7sjWHvg4bnuf 0OyR6hRkZeF1m7w09FwJ/7ZgBtSjd0EGM1UAoNuTUDf0+WYI2fST1Ey3zsbW/PsvwiDr kElWp+hbCRBCb82VTUUnAMb0bnzrlerDJJ2qk+lvJeGuqcMpRxULHFEv6W5ZuDQGGrsA 46gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703890614; x=1704495414; 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=n4pFhJH5mQfqCVMvmQQbHNi1KAwIKvpP2d1YL1kukAk=; b=N1f/mW07TtIM7QbXpbx2XSpckenXNv02i5E3iY/kre5gB9qSiqcSKs2XthiIhy+7UG HNvqBjx9ENfknxYe4P3LfcsC6pub2EZWdl+OhZugGej+/O5zzGRXiGSz0Haxajs225P2 /3ocW8BPAtYuTJHEeO2IBhzX8wq7tAVwAC5XscT1KLSumTtpyTBC1UCiQSJTNVmyjWWA r7o83bAhplUq0c4uHe25VptfQ/Y4Hqt8uUMfdplS8W05/DBWM9ufZQ311/Di88CUIxy0 N1Ayr4wqBKiPgj3DTWysxmtXvTy2oNtCfi2hdXs586DXHdlJs9k0g+Ej3uYNtlYOy12+ /XFw== X-Gm-Message-State: AOJu0Yw3eD/fiWL9LOfZU3PAEu+55vDuPQTgusMkfRFNVcj37bEnkpf9 aYXNBBfzIFMw3cfudRt4YidL4osUUc123A== X-Google-Smtp-Source: AGHT+IGvc0O8jDz3WMXRb2jv1Ko/MujAtbwsbHD6NbUQHVTlM8E4QI1tRuTPh1ctY+aia/WmV0Y5kg== X-Received: by 2002:a05:6512:401b:b0:50e:7fb5:a07e with SMTP id br27-20020a056512401b00b0050e7fb5a07emr4006691lfb.56.1703890614557; Fri, 29 Dec 2023 14:56:54 -0800 (PST) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j26-20020ac2455a000000b0050e7f5794cbsm1326952lfm.309.2023.12.29.14.56.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 14:56:54 -0800 (PST) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Kuogee Hsieh , Sankeerth Billakanti Cc: Bjorn Andersson , Konrad Dybcio , Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH 04/14] drm/msm/dp: inline dp_power_(de)init Date: Sat, 30 Dec 2023 00:56:40 +0200 Message-Id: <20231229225650.912751-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231229225650.912751-1-dmitry.baryshkov@linaro.org> References: <20231229225650.912751-1-dmitry.baryshkov@linaro.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In preparation to cleanup of the dp_power module, inline dp_power_init() and dp_power_deinit() functions, which are now just turning the clocks on and off. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 4 ++-- drivers/gpu/drm/msm/dp/dp_power.c | 10 ---------- drivers/gpu/drm/msm/dp/dp_power.h | 21 --------------------- 3 files changed, 2 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 67b48f0a6c83..8cd18705740f 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -434,7 +434,7 @@ static void dp_display_host_init(struct dp_display_private *dp) dp->dp_display.connector_type, dp->core_initialized, dp->phy_initialized); - dp_power_init(dp->power); + dp_power_clk_enable(dp->power, DP_CORE_PM, true); dp_ctrl_reset_irq_ctrl(dp->ctrl, true); dp_aux_init(dp->aux); dp->core_initialized = true; @@ -448,7 +448,7 @@ static void dp_display_host_deinit(struct dp_display_private *dp) dp_ctrl_reset_irq_ctrl(dp->ctrl, false); dp_aux_deinit(dp->aux); - dp_power_deinit(dp->power); + dp_power_clk_enable(dp->power, DP_CORE_PM, false); dp->core_initialized = false; } diff --git a/drivers/gpu/drm/msm/dp/dp_power.c b/drivers/gpu/drm/msm/dp/dp_power.c index b095a5b47c8b..f49e3aede308 100644 --- a/drivers/gpu/drm/msm/dp/dp_power.c +++ b/drivers/gpu/drm/msm/dp/dp_power.c @@ -152,16 +152,6 @@ int dp_power_client_init(struct dp_power *dp_power) return dp_power_clk_init(power); } -int dp_power_init(struct dp_power *dp_power) -{ - return dp_power_clk_enable(dp_power, DP_CORE_PM, true); -} - -int dp_power_deinit(struct dp_power *dp_power) -{ - return dp_power_clk_enable(dp_power, DP_CORE_PM, false); -} - struct dp_power *dp_power_get(struct device *dev, struct dp_parser *parser) { struct dp_power_private *power; diff --git a/drivers/gpu/drm/msm/dp/dp_power.h b/drivers/gpu/drm/msm/dp/dp_power.h index 55ada51edb57..eb836b5aa24a 100644 --- a/drivers/gpu/drm/msm/dp/dp_power.h +++ b/drivers/gpu/drm/msm/dp/dp_power.h @@ -22,27 +22,6 @@ struct dp_power { bool stream_clks_on; }; -/** - * dp_power_init() - enable power supplies for display controller - * - * @power: instance of power module - * return: 0 if success or error if failure. - * - * This API will turn on the regulators and configures gpio's - * aux/hpd. - */ -int dp_power_init(struct dp_power *power); - -/** - * dp_power_deinit() - turn off regulators and gpios. - * - * @power: instance of power module - * return: 0 for success - * - * This API turns off power and regulators. - */ -int dp_power_deinit(struct dp_power *power); - /** * dp_power_clk_status() - display controller clocks status *