Re: [DPU PATCH 09/11] drm/msm/dp: remove dpu_power_handle calls from dp driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 10, 2018 at 01:59:43PM +0530, Rajesh Yadav wrote:
> 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.
> 
> Signed-off-by: Rajesh Yadav <ryadav@xxxxxxxxxxxxxx>

Reviewed-by: Sean Paul <seanpaul@xxxxxxxxxxxx>

> ---
>  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);
>  };
>  
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux