lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 10 May 2024 08:39:41 +0200
From: "Luca Weiss" <luca.weiss@...rphone.com>
To: "Douglas Anderson" <dianders@...omium.org>,
 <dri-devel@...ts.freedesktop.org>, "Maxime Ripard" <mripard@...nel.org>
Cc: "Linus Walleij" <linus.walleij@...aro.org>, "Chris Morgan"
 <macromorgan@...mail.com>, "Yuran Pereira" <yuran.pereira@...mail.com>,
 "Neil Armstrong" <neil.armstrong@...aro.org>, "Konrad Dybcio"
 <konrad.dybcio@...aro.org>, "Daniel Vetter" <daniel@...ll.ch>, "David
 Airlie" <airlied@...il.com>, "Jessica Zhang" <quic_jesszhan@...cinc.com>,
 "Maarten Lankhorst" <maarten.lankhorst@...ux.intel.com>, "Sam Ravnborg"
 <sam@...nborg.org>, "Thomas Zimmermann" <tzimmermann@...e.de>,
 <linux-kernel@...r.kernel.org>
Subject: Re: [RFT PATCH v2 01/48] drm/panel: raydium-rm692e5: Stop tracking
 prepared

On Fri May 3, 2024 at 11:32 PM CEST, Douglas Anderson wrote:
> As talked about in commit d2aacaf07395 ("drm/panel: Check for already
> prepared/enabled in drm_panel"), we want to remove needless code from
> panel drivers that was storing and double-checking the
> prepared/enabled state. Even if someone was relying on the
> double-check before, that double-check is now in the core and not
> needed in individual drivers.
>
> Cc: Luca Weiss <luca.weiss@...rphone.com>
> Cc: Konrad Dybcio <konrad.dybcio@...aro.org>
> Signed-off-by: Douglas Anderson <dianders@...omium.org>

Seems to match with the changes I did for another (generated) panel
driver I upstreamed - see also:
https://github.com/msm8916-mainline/linux-mdss-dsi-panel-driver-generator/commit/74c104440dfd828aa94194fd279c0c505ab55854

Functionally also seems to be fine, I don't see any problems. Thanks!

Tested-by: Luca Weiss <luca.weiss@...rphone.com>

Regards
Luca

> ---
>
> Changes in v2:
> - New
>
>  drivers/gpu/drm/panel/panel-raydium-rm692e5.c | 10 ----------
>  1 file changed, 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-raydium-rm692e5.c b/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
> index a613ba5b816c..21d97f6b8a2f 100644
> --- a/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
> +++ b/drivers/gpu/drm/panel/panel-raydium-rm692e5.c
> @@ -23,7 +23,6 @@ struct rm692e5_panel {
>  	struct drm_dsc_config dsc;
>  	struct regulator_bulk_data supplies[3];
>  	struct gpio_desc *reset_gpio;
> -	bool prepared;
>  };
>  
>  static inline struct rm692e5_panel *to_rm692e5_panel(struct drm_panel *panel)
> @@ -171,9 +170,6 @@ static int rm692e5_prepare(struct drm_panel *panel)
>  	struct device *dev = &ctx->dsi->dev;
>  	int ret;
>  
> -	if (ctx->prepared)
> -		return 0;
> -
>  	ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
>  	if (ret < 0) {
>  		dev_err(dev, "Failed to enable regulators: %d\n", ret);
> @@ -213,8 +209,6 @@ static int rm692e5_prepare(struct drm_panel *panel)
>  
>  	mipi_dsi_generic_write_seq(ctx->dsi, 0xfe, 0x00);
>  
> -	ctx->prepared = true;
> -
>  	return 0;
>  }
>  
> @@ -222,13 +216,9 @@ static int rm692e5_unprepare(struct drm_panel *panel)
>  {
>  	struct rm692e5_panel *ctx = to_rm692e5_panel(panel);
>  
> -	if (!ctx->prepared)
> -		return 0;
> -
>  	gpiod_set_value_cansleep(ctx->reset_gpio, 1);
>  	regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
>  
> -	ctx->prepared = false;
>  	return 0;
>  }
>  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ