All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marijn Suijten <marijn.suijten@somainline.org>
To: Linus Walleij <linusw@kernel.org>
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
	 Sam Ravnborg <sam@ravnborg.org>,
	David Airlie <airlied@gmail.com>,
	 Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Andy Gross <agross@kernel.org>,
	 Bjorn Andersson <andersson@kernel.org>,
	Jessica Zhang <jesszhan0024@gmail.com>,
	 Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	 Thomas Zimmermann <tzimmermann@suse.de>,
	Simona Vetter <simona@ffwll.ch>,
	 Casey Connolly <casey.connolly@linaro.org>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Simona Vetter <simona.vetter@ffwll.ch>,
	 ~postmarketos/upstreaming@lists.sr.ht,
	 AngeloGioacchino Del Regno
	<angelogioacchino.delregno@somainline.org>,
	Martin Botka <martin.botka@somainline.org>,
	 Jami Kettunen <jami.kettunen@somainline.org>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	 devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	 Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Kuogee Hsieh <quic_khsieh@quicinc.com>,
	 Jessica Zhang <quic_jesszhan@quicinc.com>,
	 AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
	 Konrad Dybcio <konradybcio@kernel.org>,
	Dmitry Baryshkov <lumag@kernel.org>
Subject: Re: [PATCH v2 03/11] drm/panel: Add LGD LH599QH3-EDB1 panel driver for Sony Xperia XZ3
Date: Mon, 29 Dec 2025 12:21:37 +0100	[thread overview]
Message-ID: <aVJh2xdCreGpi_f9@SoMainline.org> (raw)
In-Reply-To: <CAD++jL=c0AVm+BD_G_AJjiXYVyWdM_HscqyoNQ-tBByJ1Dp1jQ@mail.gmail.com>

On 2025-12-26 14:12:25, Linus Walleij wrote:
...
> > +static int lgd_lh599qh3_edb1_program(struct lgd_lh599qh3_edb1 *ctx)
> > +{
> > +       struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
> > +
> > +       dsi_ctx.dsi->mode_flags |= MIPI_DSI_MODE_LPM;
> > +
> > +       mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x7f, 0x5a, 0x5a);
> > +       mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0x5a, 0x5a);
> > +       mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf1, 0x5a, 0x5a);
> > +       mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf2, 0x5a, 0x5a);
> 
> Clearly an "unlock" sequence.
> 
> > +       mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x02, 0x01);
> > +       mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x59, 0x01);
> > +       mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_CONTROL_DISPLAY,
> > +                                    WRITE_CONTROL_DISPLAY_BACKLIGHT);
> > +       mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x57, 0x20, 0x80, 0xde, 0x60, 0x00);
> > +       mipi_dsi_dcs_set_column_address_multi(&dsi_ctx, 0, 1440 - 1);
> > +       mipi_dsi_dcs_set_page_address_multi(&dsi_ctx, 0, 2880 - 1);
> > +
> > +       mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_POWER_SAVE, 0x00);
> > +
> > +       mipi_dsi_dcs_set_tear_on_multi(&dsi_ctx, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
> > +
> > +       mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x7f, 0x5a, 0x5a);
> > +       mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0x5a, 0x5a);
> > +       mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf1, 0x5a, 0x5a);
> > +       mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf2, 0x5a, 0x5a);
> 
> Cleary another copy of the "unlock" sequence.
> 
> Can you break it out to a subroutine?
> lgd_lh599qh3_edb1_unlock()?

Sure, though unsure where the "lock" sequence resides (and why it needs to be
unlocked twice, unless this was autogenerated and is unnecessary, or implies a
"flush" of sorts) or why it looks so familiar to the Samsung panels.

Will rename it to lgd_lh599qh3_edb1_unlock_multi() and pass it a
mipi_dsi_multi_context so that no extra return-code handling needs to be
implemented.

> +/- this nitpick:
> Reviewed-by: Linus Walleij <linusw@kernel.org>

Just making sure, you reviewed the SOFEF01 driver with your Linaro address,
which one do you prefer or should I keep this distinction?

- Marijn

  reply	other threads:[~2025-12-29 11:21 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-21 23:32 [PATCH v2 00/11] drm/panel: Add 5 DDIC panel drivers for 14 Sony phones Marijn Suijten
2025-12-21 23:32 ` [PATCH v2 01/11] drm/panel: Clean up SOFEF00 config dependencies Marijn Suijten
2026-02-23 22:28   ` David Heidelberg
2025-12-21 23:32 ` [PATCH v2 02/11] dt-bindings: display: panel: Describe LGD LH599QH3-EDB1 panel Marijn Suijten
2025-12-21 23:32 ` [PATCH v2 03/11] drm/panel: Add LGD LH599QH3-EDB1 panel driver for Sony Xperia XZ3 Marijn Suijten
2025-12-24  1:12   ` Dmitry Baryshkov
2025-12-26 13:12   ` Linus Walleij
2025-12-29 11:21     ` Marijn Suijten [this message]
2025-12-29 12:33       ` Linus Walleij
2025-12-21 23:32 ` [PATCH v2 04/11] dt-bindings: display: panel: Describe Samsung SOFEF01-M DDIC Marijn Suijten
2025-12-26 13:25   ` Linus Walleij
2025-12-26 13:48     ` Marijn Suijten
2025-12-26 17:38       ` Linus Walleij
2025-12-29 11:52         ` Marijn Suijten
2025-12-29 12:37           ` Linus Walleij
2025-12-30  1:51   ` Rob Herring
2025-12-21 23:32 ` [PATCH v2 05/11] drm/panel: Add panel driver for Samsung SOFEF01 DDIC Marijn Suijten
2025-12-24  1:12   ` Dmitry Baryshkov
2025-12-24 16:13   ` kernel test robot
2025-12-26 13:21   ` Linus Walleij
2025-12-26 14:16     ` Marijn Suijten
2025-12-26 14:23       ` Marijn Suijten
2025-12-26 17:43       ` Linus Walleij
2025-12-29 11:43         ` Marijn Suijten
2025-12-29 12:39           ` Linus Walleij
2025-12-21 23:32 ` [PATCH v2 06/11] dt-bindings: display: panel: Describe Samsung SOFEF03-M DDIC Marijn Suijten
2025-12-22  3:51   ` Rob Herring (Arm)
2025-12-22  8:33   ` Krzysztof Kozlowski
2025-12-22  8:36     ` Krzysztof Kozlowski
2025-12-28 22:49       ` Marijn Suijten
2025-12-30  1:53         ` Rob Herring
2025-12-28 22:31     ` Marijn Suijten
2025-12-21 23:32 ` [PATCH v2 07/11] drm/panel: Add panel driver for " Marijn Suijten
2025-12-24  1:15   ` Dmitry Baryshkov
2025-12-24  9:43   ` Marijn Suijten
2025-12-21 23:32 ` [PATCH v2 08/11] dt-bindings: display: panel: Describe Samsung SOUXP00-A DDIC Marijn Suijten
2025-12-22  3:51   ` Rob Herring (Arm)
2025-12-21 23:32 ` [PATCH v2 09/11] drm/panel: Add panel driver for " Marijn Suijten
2025-12-24  1:15   ` Dmitry Baryshkov
2025-12-24 17:26   ` kernel test robot
2026-02-26 12:04   ` David Heidelberg
2025-12-21 23:32 ` [PATCH v2 10/11] dt-bindings: display: panel: Describe Samsung ANA6707 DDIC Marijn Suijten
2025-12-22  3:51   ` Rob Herring (Arm)
2025-12-21 23:32 ` [PATCH v2 11/11] drm/panel: Add panel driver for " Marijn Suijten
2025-12-24  1:16   ` Dmitry Baryshkov

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=aVJh2xdCreGpi_f9@SoMainline.org \
    --to=marijn.suijten@somainline.org \
    --cc=agross@kernel.org \
    --cc=airlied@gmail.com \
    --cc=andersson@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=casey.connolly@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jami.kettunen@somainline.org \
    --cc=jesszhan0024@gmail.com \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linusw@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=martin.botka@somainline.org \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_jesszhan@quicinc.com \
    --cc=quic_khsieh@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=simona.vetter@ffwll.ch \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.