diff mbox series

[V2,5/5] drm/panel-elida-kd35t133: Drop prepare/unprepare logic

Message ID 20231117194405.1386265-6-macroalpha82@gmail.com (mailing list archive)
State New, archived
Headers show
Series Elida KD35T133 Panel Improvements | expand

Commit Message

Chris Morgan Nov. 17, 2023, 7:44 p.m. UTC
From: Chris Morgan <macromorgan@hotmail.com>

Drop the prepare/unprepare logic, as this is now tracked elsewhere
since this commit [1].

[1] commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel")

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
 drivers/gpu/drm/panel/panel-elida-kd35t133.c | 11 -----------
 1 file changed, 11 deletions(-)

Comments

Neil Armstrong Nov. 20, 2023, 8:30 a.m. UTC | #1
On 17/11/2023 20:44, Chris Morgan wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
> 
> Drop the prepare/unprepare logic, as this is now tracked elsewhere
> since this commit [1].
> 
> [1] commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel")
> 
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> ---
>   drivers/gpu/drm/panel/panel-elida-kd35t133.c | 11 -----------
>   1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> index fea3d9e84905..00791ea81e90 100644
> --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> @@ -43,7 +43,6 @@ struct kd35t133 {
>   	struct regulator *vdd;
>   	struct regulator *iovcc;
>   	enum drm_panel_orientation orientation;
> -	bool prepared;
>   };
>   
>   static inline struct kd35t133 *panel_to_kd35t133(struct drm_panel *panel)
> @@ -91,9 +90,6 @@ static int kd35t133_unprepare(struct drm_panel *panel)
>   	struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
>   	int ret;
>   
> -	if (!ctx->prepared)
> -		return 0;
> -
>   	ret = mipi_dsi_dcs_set_display_off(dsi);
>   	if (ret < 0)
>   		dev_err(ctx->dev, "failed to set display off: %d\n", ret);
> @@ -109,8 +105,6 @@ static int kd35t133_unprepare(struct drm_panel *panel)
>   	regulator_disable(ctx->iovcc);
>   	regulator_disable(ctx->vdd);
>   
> -	ctx->prepared = false;
> -
>   	return 0;
>   }
>   
> @@ -120,9 +114,6 @@ static int kd35t133_prepare(struct drm_panel *panel)
>   	struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
>   	int ret;
>   
> -	if (ctx->prepared)
> -		return 0;
> -
>   	dev_dbg(ctx->dev, "Resetting the panel\n");
>   	ret = regulator_enable(ctx->vdd);
>   	if (ret < 0) {
> @@ -166,8 +157,6 @@ static int kd35t133_prepare(struct drm_panel *panel)
>   
>   	msleep(50);
>   
> -	ctx->prepared = true;
> -
>   	return 0;
>   
>   disable_iovcc:

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
index fea3d9e84905..00791ea81e90 100644
--- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c
+++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
@@ -43,7 +43,6 @@  struct kd35t133 {
 	struct regulator *vdd;
 	struct regulator *iovcc;
 	enum drm_panel_orientation orientation;
-	bool prepared;
 };
 
 static inline struct kd35t133 *panel_to_kd35t133(struct drm_panel *panel)
@@ -91,9 +90,6 @@  static int kd35t133_unprepare(struct drm_panel *panel)
 	struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
 	int ret;
 
-	if (!ctx->prepared)
-		return 0;
-
 	ret = mipi_dsi_dcs_set_display_off(dsi);
 	if (ret < 0)
 		dev_err(ctx->dev, "failed to set display off: %d\n", ret);
@@ -109,8 +105,6 @@  static int kd35t133_unprepare(struct drm_panel *panel)
 	regulator_disable(ctx->iovcc);
 	regulator_disable(ctx->vdd);
 
-	ctx->prepared = false;
-
 	return 0;
 }
 
@@ -120,9 +114,6 @@  static int kd35t133_prepare(struct drm_panel *panel)
 	struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
 	int ret;
 
-	if (ctx->prepared)
-		return 0;
-
 	dev_dbg(ctx->dev, "Resetting the panel\n");
 	ret = regulator_enable(ctx->vdd);
 	if (ret < 0) {
@@ -166,8 +157,6 @@  static int kd35t133_prepare(struct drm_panel *panel)
 
 	msleep(50);
 
-	ctx->prepared = true;
-
 	return 0;
 
 disable_iovcc: