mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: david@ixit.cz, Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	Casey Connolly <casey.connolly@linaro.org>,
	Jessica Zhang <jesszhan0024@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	Dmitry Baryshkov <lumag@kernel.org>,
	Vinod Koul <vkoul@kernel.org>,
	Petr Hodina <phodina@protonmail.com>,
	Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v7 4/8] drm/panel: sw43408: Separate reset sequence into own function
Date: Tue, 16 Dec 2025 10:53:37 +0100	[thread overview]
Message-ID: <6c04c58e-339b-4b5c-a2b4-8a9509612335@linaro.org> (raw)
In-Reply-To: <20251214-pixel-3-v7-4-b1c0cf6f224d@ixit.cz>

On 12/14/25 15:51, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
> 
> Splitting reset() from prepare() follows clean coding practices and lets
> us potentially make reset optional in the future for flicker-less
> takeover from a bootloader or framebuffer driver where the panel is
> already configured.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
>   drivers/gpu/drm/panel/panel-lg-sw43408.c | 17 +++++++++++------
>   1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-lg-sw43408.c b/drivers/gpu/drm/panel/panel-lg-sw43408.c
> index dcca7873acf8e..ed9c7452ea846 100644
> --- a/drivers/gpu/drm/panel/panel-lg-sw43408.c
> +++ b/drivers/gpu/drm/panel/panel-lg-sw43408.c
> @@ -119,6 +119,16 @@ static int sw43408_program(struct drm_panel *panel)
>   	return ctx.accum_err;
>   }
>   
> +static void sw43408_reset(struct sw43408_panel *ctx)
> +{
> +	gpiod_set_value(ctx->reset_gpio, 0);
> +	usleep_range(9000, 10000);
> +	gpiod_set_value(ctx->reset_gpio, 1);
> +	usleep_range(1000, 2000);
> +	gpiod_set_value(ctx->reset_gpio, 0);
> +	usleep_range(9000, 10000);
> +}
> +
>   static int sw43408_prepare(struct drm_panel *panel)
>   {
>   	struct sw43408_panel *ctx = to_panel_info(panel);
> @@ -130,12 +140,7 @@ static int sw43408_prepare(struct drm_panel *panel)
>   
>   	usleep_range(5000, 6000);
>   
> -	gpiod_set_value(ctx->reset_gpio, 0);
> -	usleep_range(9000, 10000);
> -	gpiod_set_value(ctx->reset_gpio, 1);
> -	usleep_range(1000, 2000);
> -	gpiod_set_value(ctx->reset_gpio, 0);
> -	usleep_range(9000, 10000);
> +	sw43408_reset(ctx);
>   
>   	ret = sw43408_program(panel);
>   	if (ret)
> 

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

  reply	other threads:[~2025-12-16  9:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-14 14:51 [PATCH v7 0/8] Add support for Pixel 3 and Pixel 3 XL David Heidelberg via B4 Relay
2025-12-14 14:51 ` [PATCH v7 1/8] dt-bindings: arm: qcom: Add Pixel 3 and " David Heidelberg via B4 Relay
2025-12-14 14:51 ` [PATCH v7 2/8] dt-bindings: panel: sw43408: adjust to reflect the DDIC and panel used David Heidelberg via B4 Relay
2025-12-14 14:51 ` [PATCH v7 3/8] drm/panel: sw43408: Introduce LH546WF1-ED01 panel compatible David Heidelberg via B4 Relay
2025-12-14 14:51 ` [PATCH v7 4/8] drm/panel: sw43408: Separate reset sequence into own function David Heidelberg via B4 Relay
2025-12-16  9:53   ` Neil Armstrong [this message]
2025-12-14 14:51 ` [PATCH v7 5/8] drm/panel: sw43408: Remove manual invocation of unprepare at remove David Heidelberg via B4 Relay
2025-12-14 14:51 ` [PATCH v7 6/8] drm/panel: sw43408: Switch to devm_regulator_bulk_get_const David Heidelberg via B4 Relay
2025-12-14 14:51 ` [PATCH v7 7/8] drm/panel: sw43408: Improve wording when reset-gpios aren't available David Heidelberg via B4 Relay
2025-12-14 14:51 ` [PATCH v7 8/8] arm64: dts: qcom: Add support for Pixel 3 and Pixel 3 XL David Heidelberg via B4 Relay
2025-12-16 10:23 ` (subset) [PATCH v7 0/8] " Neil Armstrong
2026-01-05 14:07 ` Bjorn Andersson

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=6c04c58e-339b-4b5c-a2b4-8a9509612335@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=airlied@gmail.com \
    --cc=andersson@kernel.org \
    --cc=casey.connolly@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=david@ixit.cz \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jesszhan0024@gmail.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marijn.suijten@somainline.org \
    --cc=mripard@kernel.org \
    --cc=phodina@protonmail.com \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=sumit.semwal@linaro.org \
    --cc=tzimmermann@suse.de \
    --cc=vkoul@kernel.org \
    /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®