From patchwork Mon May 14 15:26:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajesh Yadav X-Patchwork-Id: 10398713 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C7E1A60216 for ; Mon, 14 May 2018 15:28:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B05D9201B1 for ; Mon, 14 May 2018 15:28:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A455628372; Mon, 14 May 2018 15:28:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, TVD_SUBJ_WIPE_DEBT, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C2A42836F for ; Mon, 14 May 2018 15:28:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932804AbeENP2B (ORCPT ); Mon, 14 May 2018 11:28:01 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42264 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932797AbeENP2A (ORCPT ); Mon, 14 May 2018 11:28:00 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7A0C8602B6; Mon, 14 May 2018 15:28:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526311680; bh=52b2JFzGBeEsItono7o1JEYHiTRbW0f8dyZOYOA9CPo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jdDeK1+WdFW6FIuwAljOFRp2+GobLjBJFGDQpAVUiWIJSRVx7d9lqk+O99af1UMFE 7Lax4UkZZLF2nAKcFsFhb149fIrxuvQhM+VL+mfhhuOr4fyKZ586YF66vyPJ0WINXz kZWf54r/r3d6V49x0kn//e7FY8UTNAD+9ncrAEm8= Received: from ryadav-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ryadav@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3EF3360C66; Mon, 14 May 2018 15:27:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526311679; bh=52b2JFzGBeEsItono7o1JEYHiTRbW0f8dyZOYOA9CPo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ANKjiyxnxXvw/EM5DSf1EHIKth9Q9gulHZtE1L+qVaa8AyRAIrdrhANzUPhkaCi1b BDe9sxcw9Sp3A95BH+Y1PfLNCiqnukFCxhMcEwgM51sJc9dRIop8p447y8WdhvSAM5 BgOMElBaGXtexnLuMGCJRT2SgCrFcV1K4VPoH12I= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3EF3360C66 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=ryadav@codeaurora.org From: Rajesh Yadav To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: Rajesh Yadav , robdclark@gmail.com, seanpaul@chromium.org, hoegsberg@chromium.org Subject: [DPU PATCH v3 09/12] drm/msm/dp: remove dpu_power_handle calls from dp driver Date: Mon, 14 May 2018 20:56:56 +0530 Message-Id: <1526311619-3309-10-git-send-email-ryadav@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1526311619-3309-1-git-send-email-ryadav@codeaurora.org> References: <1526311619-3309-1-git-send-email-ryadav@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DP driver was dependent on dpu_power_handle for MDSS common clocks and gdsc (main power supply). The common clocks and power is managed by MDSS top wrapper device now which is parent of all sub-devices like DP device. For same reason, clock and power management code is removed from dpu_power_handle. Hence, remove the dpu_power_handle calls from dp driver. Changes in v3: - none Changes in v2: - none Signed-off-by: Rajesh Yadav Reviewed-by: Sean Paul --- drivers/gpu/drm/msm/dp/dp_power.c | 32 +------------------------------- drivers/gpu/drm/msm/dp/dp_power.h | 4 +--- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_power.c b/drivers/gpu/drm/msm/dp/dp_power.c index f6e341b..2a85b38 100644 --- a/drivers/gpu/drm/msm/dp/dp_power.c +++ b/drivers/gpu/drm/msm/dp/dp_power.c @@ -26,8 +26,6 @@ struct dp_power_private { struct clk *pixel_parent; struct dp_power dp_power; - struct dpu_power_client *dp_core_client; - struct dpu_power_handle *phandle; bool core_clks_on; bool link_clks_on; @@ -410,8 +408,7 @@ static int dp_power_config_gpios(struct dp_power_private *power, bool flip, return 0; } -static int dp_power_client_init(struct dp_power *dp_power, - struct dpu_power_handle *phandle) +static int dp_power_client_init(struct dp_power *dp_power) { int rc = 0; struct dp_power_private *power; @@ -436,19 +433,8 @@ static int dp_power_client_init(struct dp_power *dp_power, goto error_clk; } - power->phandle = phandle; - snprintf(dp_client_name, DP_CLIENT_NAME_SIZE, "dp_core_client"); - power->dp_core_client = dpu_power_client_create(phandle, - dp_client_name); - if (IS_ERR_OR_NULL(power->dp_core_client)) { - pr_err("[%s] client creation failed for DP", dp_client_name); - rc = -EINVAL; - goto error_client; - } return 0; -error_client: - dp_power_clk_init(power, false); error_clk: dp_power_regulator_deinit(power); error_power: @@ -466,7 +452,6 @@ static void dp_power_client_deinit(struct dp_power *dp_power) power = container_of(dp_power, struct dp_power_private, dp_power); - dpu_power_client_destroy(power->phandle, power->dp_core_client); dp_power_clk_init(power, false); dp_power_regulator_deinit(power); } @@ -521,13 +506,6 @@ static int dp_power_init(struct dp_power *dp_power, bool flip) goto err_gpio; } - rc = dpu_power_resource_enable(power->phandle, - power->dp_core_client, true); - if (rc) { - pr_err("Power resource enable failed\n"); - goto err_dpu_power; - } - rc = dp_power_clk_enable(dp_power, DP_CORE_PM, true); if (rc) { pr_err("failed to enable DP core clocks\n"); @@ -537,8 +515,6 @@ static int dp_power_init(struct dp_power *dp_power, bool flip) return 0; err_clk: - dpu_power_resource_enable(power->phandle, power->dp_core_client, false); -err_dpu_power: dp_power_config_gpios(power, flip, false); err_gpio: dp_power_pinctrl_set(power, false); @@ -562,12 +538,6 @@ static int dp_power_deinit(struct dp_power *dp_power) power = container_of(dp_power, struct dp_power_private, dp_power); dp_power_clk_enable(dp_power, DP_CORE_PM, false); - rc = dpu_power_resource_enable(power->phandle, - power->dp_core_client, false); - if (rc) { - pr_err("Power resource enable failed, rc=%d\n", rc); - goto exit; - } dp_power_config_gpios(power, false, false); dp_power_pinctrl_set(power, false); dp_power_regulator_ctrl(power, false); diff --git a/drivers/gpu/drm/msm/dp/dp_power.h b/drivers/gpu/drm/msm/dp/dp_power.h index 84fe01d..d9dab72 100644 --- a/drivers/gpu/drm/msm/dp/dp_power.h +++ b/drivers/gpu/drm/msm/dp/dp_power.h @@ -16,7 +16,6 @@ #define _DP_POWER_H_ #include "dp_parser.h" -#include "dpu_power_handle.h" /** * sruct dp_power - DisplayPort's power related data @@ -32,8 +31,7 @@ struct dp_power { int (*clk_enable)(struct dp_power *power, enum dp_pm_type pm_type, bool enable); int (*set_pixel_clk_parent)(struct dp_power *power); - int (*power_client_init)(struct dp_power *power, - struct dpu_power_handle *phandle); + int (*power_client_init)(struct dp_power *power); void (*power_client_deinit)(struct dp_power *power); };