mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: neil.armstrong@linaro.org
To: Yuran Pereira <yuran.pereira@hotmail.com>
Cc: sam@ravnborg.org, airlied@gmail.com, daniel@ffwll.ch,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dianders@chromium.org
Subject: Re: [RFC] Clean up check for already prepared panel
Date: Mon, 23 Oct 2023 16:57:54 +0200	[thread overview]
Message-ID: <53982fa5-3396-4c1f-8360-18957fd687e8@linaro.org> (raw)
In-Reply-To: <DB3PR10MB68352B33759F5DB6CC041C84E8D8A@DB3PR10MB6835.EURPRD10.PROD.OUTLOOK.COM>

Hi,

On 23/10/2023 16:51, Yuran Pereira wrote:
> Since the core function drm_panel_prepare already checks if the
> panel is prepared, we can remove this duplicate check from tm5p5_nt35596_prepare
> which acts as a no-op. As suggested in the GPU TODO [1]
> 
> [1] https://docs.kernel.org/gpu/todo.html#clean-up-checks-for-already-prepared-enabled-in-panels
> 
> Suggested-by: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Yuran Pereira <yuran.pereira@hotmail.com>
> ---
>   drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c b/drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c
> index 075a7af81eff..af83451b3374 100644
> --- a/drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c
> +++ b/drivers/gpu/drm/panel/panel-asus-z00t-tm5p5-n35596.c
> @@ -112,9 +112,6 @@ static int tm5p5_nt35596_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);
> @@ -132,7 +129,6 @@ static int tm5p5_nt35596_prepare(struct drm_panel *panel)
>   		return ret;
>   	}
>   
> -	ctx->prepared = true;
>   	return 0;
>   }
>   

This has already been done and merged in:
https://patchwork.freedesktop.org/patch/msgid/20230804140605.RFC.1.Ia54954fd2f7645c1b86597494902973f57feeb71@changeid

Thanks,
Neil

      reply	other threads:[~2023-10-23 14:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 14:51 Yuran Pereira
2023-10-23 14:57 ` neil.armstrong [this message]

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=53982fa5-3396-4c1f-8360-18957fd687e8@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --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

all inboxes | Powered by JetHome®