From patchwork Fri May 11 14:49:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajesh Yadav X-Patchwork-Id: 10394525 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 6157E60236 for ; Fri, 11 May 2018 14:50:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48D7628E9A for ; Fri, 11 May 2018 14:50:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45D1E28F5D; Fri, 11 May 2018 14:50:51 +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 5B39328F3C for ; Fri, 11 May 2018 14:50:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753177AbeEKOur (ORCPT ); Fri, 11 May 2018 10:50:47 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51844 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753167AbeEKOur (ORCPT ); Fri, 11 May 2018 10:50:47 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C07F360C66; Fri, 11 May 2018 14:50:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526050246; bh=d7UIASK1IecuvcO7D4DzIA6Na1hhMvat/OHbJU92IvA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=De6fhZ1EUHkZl9rdD22/bkBCSh+AcbbfLKHDaTosmSu67mCD8+K934MJ33xJzUWU5 LQQjJ4pUkS2VS6HBrlJDG5CY5L6fogNoRX55kiLMJkTw03N89UBqs671HiMsCzwURT aDASXUNSwIula90e3QH+WWg77yBlxB2G1oRBVdaU= 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 6539E601EA; Fri, 11 May 2018 14:50:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526050245; bh=d7UIASK1IecuvcO7D4DzIA6Na1hhMvat/OHbJU92IvA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VmwBL9rzi/g6T6hmmRoEUc8Y+Sa/EG089YTGEbh0jGxhp3EYO/nvgykTVcVaFnc6u hbwNq0NEtqLg26xxE1k/ow0ZyIixF2K1ZSWd9RDpxtAa1OmOTQ+CfTAvaLH9yt2H0X zGe1VziaYSqTQ7+4Aha3eRrG0IqQ85yqi+FuxrQM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6539E601EA 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 v2 09/12] drm/msm/dp: remove dpu_power_handle calls from dp driver Date: Fri, 11 May 2018 20:19:35 +0530 Message-Id: <1526050178-31893-10-git-send-email-ryadav@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1526050178-31893-1-git-send-email-ryadav@codeaurora.org> References: <1526050178-31893-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 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); };