linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luca Weiss" <luca.weiss@fairphone.com>
To: "Douglas Anderson" <dianders@chromium.org>,
	<dri-devel@lists.freedesktop.org>,
	"Maxime Ripard" <mripard@kernel.org>
Cc: "Linus Walleij" <linus.walleij@linaro.org>,
	"Chris Morgan" <macromorgan@hotmail.com>,
	"Yuran Pereira" <yuran.pereira@hotmail.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"David Airlie" <airlied@gmail.com>,
	"Jessica Zhang" <quic_jesszhan@quicinc.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [RFT PATCH v2 01/48] drm/panel: raydium-rm692e5: Stop tracking prepared
Date: Fri, 10 May 2024 08:39:41 +0200	[thread overview]
Message-ID: <D15RBIV5HF6S.2FFLSGU60X1UB@fairphone.com> (raw)
In-Reply-To: <20240503143327.RFT.v2.1.I784238de4810658212a5786b219f128460562a37@changeid>

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@fairphone.com>
> Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
> Signed-off-by: Douglas Anderson <dianders@chromium.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@fairphone.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;
>  }
>  


  reply	other threads:[~2024-05-10  6:39 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03 21:32 [RFT PATCH v2 00/48] drm/panel: Remove most store/double-check of prepared/enabled state Douglas Anderson
2024-05-03 21:32 ` [RFT PATCH v2 01/48] drm/panel: raydium-rm692e5: Stop tracking prepared Douglas Anderson
2024-05-10  6:39   ` Luca Weiss [this message]
2024-05-03 21:32 ` [RFT PATCH v2 02/48] drm/panel: boe-himax8279d: Stop tracking prepared/enabled Douglas Anderson
2024-05-03 21:32 ` [RFT PATCH v2 03/48] drm/panel: boe-himax8279d: Don't call unprepare+disable at shutdown/remove Douglas Anderson
2024-05-03 21:32 ` [RFT PATCH v2 04/48] drm/panel: boe-tv101wum-nl6: Stop tracking prepared Douglas Anderson
2024-05-03 21:32 ` [RFT PATCH v2 05/48] drm/panel: boe-tv101wum-nl6: Don't call unprepare+disable at shutdown/remove Douglas Anderson
2024-05-03 21:32 ` [RFT PATCH v2 06/48] drm/panel: edp: Stop tracking prepared/enabled Douglas Anderson
2024-05-03 21:32 ` [RFT PATCH v2 07/48] drm/panel: edp: Add a comment about unprepare+disable at shutdown/remove Douglas Anderson
2024-05-03 21:32 ` [RFT PATCH v2 08/48] drm/panel: innolux-p079zca: Stop tracking prepared/enabled Douglas Anderson
2024-05-06 16:28   ` Heiko Stübner
2024-05-03 21:32 ` [RFT PATCH v2 09/48] drm/panel: innolux-p079zca: Don't call unprepare+disable at shutdown/remove Douglas Anderson
2024-05-06 16:29   ` Heiko Stübner
2024-05-03 21:32 ` [RFT PATCH v2 10/48] drm/panel: khadas-ts050: Stop tracking prepared/enabled Douglas Anderson
2024-05-03 21:32 ` [RFT PATCH v2 11/48] drm/panel: khadas-ts050: Don't call unprepare+disable at shutdown/remove Douglas Anderson
2024-05-03 21:32 ` [RFT PATCH v2 12/48] drm/panel: kingdisplay-kd097d04: Stop tracking prepared/enabled Douglas Anderson
2024-05-06 16:29   ` Heiko Stübner
2024-05-03 21:32 ` [RFT PATCH v2 13/48] drm/panel: kingdisplay-kd097d04: Don't call unprepare+disable at shutdown/remove Douglas Anderson
2024-05-06 16:29   ` Heiko Stübner
2024-05-03 21:32 ` [RFT PATCH v2 14/48] drm/panel: ltk050h3146w: Stop tracking prepared Douglas Anderson
2024-05-06 11:17   ` Quentin Schulz
2024-05-06 16:26   ` Heiko Stübner
2024-05-03 21:32 ` [RFT PATCH v2 15/48] drm/panel: ltk050h3146w: Don't call unprepare+disable at shutdown/remove Douglas Anderson
2024-05-06 14:04   ` Quentin Schulz
2024-05-06 15:17     ` Doug Anderson
2024-05-06 16:21   ` Heiko Stübner
2024-05-03 21:32 ` [RFT PATCH v2 16/48] drm/panel: ltk500hd1829: Stop tracking prepared Douglas Anderson
2024-05-06 16:30   ` Heiko Stübner
2024-05-03 21:32 ` [RFT PATCH v2 17/48] drm/panel: ltk500hd1829: Don't call unprepare+disable at shutdown/remove Douglas Anderson
2024-05-06 16:30   ` Heiko Stübner
2024-05-03 21:32 ` [RFT PATCH v2 18/48] drm/panel: novatek-nt36672a: Stop tracking prepared Douglas Anderson
2024-05-04 23:58   ` Joel Selvaraj
2024-05-03 21:33 ` [RFT PATCH v2 19/48] drm/panel: novatek-nt36672a: Don't call unprepare+disable at shutdown/remove Douglas Anderson
2024-05-04 23:58   ` Joel Selvaraj
2024-05-05  0:10     ` Joel Selvaraj
2024-05-03 21:33 ` [RFT PATCH v2 20/48] drm/panel: olimex-lcd-olinuxino: Stop tracking prepared/enabled Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 21/48] drm/panel: olimex-lcd-olinuxino: Don't call unprepare+disable at remove Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 22/48] drm/panel: osd-osd101t2587-53ts: Stop tracking prepared/enabled Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 23/48] drm/panel: osd-osd101t2587-53ts: Don't call unprepare+disable at shutdown/remove Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 24/48] drm/panel: samsung-atna33xc20: Stop tracking prepared/enabled Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 25/48] drm/panel: samsung-atna33xc20: Don't call unprepare+disable at shutdown/remove Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 26/48] drm/panel: simple: Stop tracking prepared/enabled Douglas Anderson
2024-05-18 13:20   ` [RFT,v2,26/48] " Sui Jingfeng
2024-05-03 21:33 ` [RFT PATCH v2 27/48] drm/panel: simple: Add a comment about unprepare+disable at shutdown/remove Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 28/48] drm/panel: tdo-tl070wsh30: Stop tracking prepared Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 29/48] drm/panel: tdo-tl070wsh30: Don't call unprepare+disable at shutdown/remove Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 30/48] drm/panel: xinpeng-xpp055c272: Stop tracking prepared Douglas Anderson
2024-05-06 16:30   ` Heiko Stübner
2024-05-03 21:33 ` [RFT PATCH v2 31/48] drm/panel: xinpeng-xpp055c272: Don't call unprepare+disable at shutdown/remove Douglas Anderson
2024-05-06 16:31   ` Heiko Stübner
2024-05-03 21:33 ` [RFT PATCH v2 32/48] drm/panel: jdi-lt070me05000: Stop tracking prepared/enabled Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 33/48] drm/panel: jdi-lt070me05000: Don't call disable at shutdown/remove Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 34/48] drm/panel: panasonic-vvx10f034n00: Stop tracking prepared/enabled Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 35/48] drm/panel: panasonic-vvx10f034n00: Don't call disable at shutdown/remove Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 36/48] drm/panel: seiko-43wvf1g: Stop tracking prepared/enabled Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 37/48] drm/panel: seiko-43wvf1g: Don't call disable at shutdown/remove Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 38/48] drm/panel: sharp-lq101r1sx01: Stop tracking prepared/enabled Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 39/48] drm/panel: sharp-lq101r1sx01: Don't call disable at shutdown/remove Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 40/48] drm/panel: sharp-ls043t1le01: Stop tracking prepared Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 41/48] drm/panel: sharp-ls043t1le01: Don't call disable at shutdown/remove Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 42/48] drm/panel: sitronix-st7703: Stop tracking prepared Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 43/48] drm/panel: sitronix-st7703: Don't call disable at shutdown/remove Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 44/48] drm/panel: raydium-rm67191: Stop tracking enabled Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 45/48] drm/panel: raydium-rm67191: Don't call unprepare+disable at shutdown Douglas Anderson
2024-05-03 21:33 ` [RFT PATCH v2 46/48] drm/panel: sony-acx565akm: Don't double-check enabled state in disable Douglas Anderson
2024-05-06  6:49   ` Linus Walleij
2024-05-03 21:33 ` [RFT PATCH v2 47/48] drm/panel: sony-acx565akm: Don't call disable at remove Douglas Anderson
2024-05-06  6:49   ` Linus Walleij
2024-05-06  6:49   ` Linus Walleij
2024-05-03 21:33 ` [RFT PATCH v2 48/48] drm/panel: Update TODO list item for cleaning up prepared/enabled tracking Douglas Anderson
2024-05-06  6:52 ` [RFT PATCH v2 00/48] drm/panel: Remove most store/double-check of prepared/enabled state Linus Walleij
2024-05-06  7:17   ` Ondřej Jirman
2024-05-08 21:14   ` Doug Anderson
2024-05-06  7:27 ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D15RBIV5HF6S.2FFLSGU60X1UB@fairphone.com \
    --to=luca.weiss@fairphone.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=macromorgan@hotmail.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_jesszhan@quicinc.com \
    --cc=sam@ravnborg.org \
    --cc=tzimmermann@suse.de \
    --cc=yuran.pereira@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).