From: Neil Armstrong <neil.armstrong@linaro.org>
To: david@ixit.cz, Abel Vesa <abelvesa@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Casey Connolly <casey.connolly@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
David Airlie <airlied@gmail.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Jessica Zhang <jesszhan0024@gmail.com>,
Konrad Dybcio <konradybcio@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Marijn Suijten <marijn.suijten@somainline.org>,
Maxime Ripard <mripard@kernel.org>, Rob Herring <robh@kernel.org>,
Simona Vetter <simona@ffwll.ch>,
Sumit Semwal <sumit.semwal@linaro.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Vinod Koul <vkoul@kernel.org>
Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
phone-devel@vger.kernel.org
Subject: Re: [PATCH v3 2/5] drm/panel: lg-sw43408: skip backlight updates when unprepared
Date: Wed, 25 Nov 2026 19:49:56 +0100 [thread overview]
Message-ID: <9dcb4721-a756-43b9-a8c6-34922dd4a115@linaro.org> (raw)
In-Reply-To: <20261125-fix-blueline-panel-v3-2-914b4a30b73e@ixit.cz>
On 11/25/26 14:08, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
>
> sw43408_backlight_update_status() unconditionally sends a MIPI DSI DCS
> brightness command even when the panel is unprepared and the DSI host is
> powered down, causing sysfs brightness writes while blanked to fail with
> -EIO.
>
> Pass struct sw43408_panel as the backlight device private data and return
> early when !ctx->base.prepared, matching other mainline MIPI DSI panel
> drivers.
>
> Fixes: 069a6c0e94f9 ("drm: panel: Add LG sw43408 panel driver")
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> drivers/gpu/drm/panel/panel-lg-sw43408.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-lg-sw43408.c b/drivers/gpu/drm/panel/panel-lg-sw43408.c
> index 92cab6478ea61..7f7d7b6b17f61 100644
> --- a/drivers/gpu/drm/panel/panel-lg-sw43408.c
> +++ b/drivers/gpu/drm/panel/panel-lg-sw43408.c
> @@ -181,20 +181,23 @@ static const struct drm_display_mode lh546wf1_ed01_mode = {
> static int sw43408_get_modes(struct drm_panel *panel,
> struct drm_connector *connector)
> {
> return drm_connector_helper_get_modes_fixed(connector, &lh546wf1_ed01_mode);
> }
>
> static int sw43408_backlight_update_status(struct backlight_device *bl)
> {
> - struct mipi_dsi_device *dsi = bl_get_data(bl);
> + struct sw43408_panel *ctx = bl_get_data(bl);
> u16 brightness = backlight_get_brightness(bl);
>
> - return mipi_dsi_dcs_set_display_brightness_large(dsi, brightness);
> + if (!ctx->base.prepared)
> + return 0;
> +
> + return mipi_dsi_dcs_set_display_brightness_large(ctx->link, brightness);
> }
>
> static const struct backlight_ops sw43408_backlight_ops = {
> .update_status = sw43408_backlight_update_status,
> };
>
> static int sw43408_backlight_init(struct sw43408_panel *ctx)
> {
> @@ -202,17 +205,17 @@ static int sw43408_backlight_init(struct sw43408_panel *ctx)
> const struct backlight_properties props = {
> .type = BACKLIGHT_PLATFORM,
> .brightness = 255,
> /* HBM can go up to 1023, stay safe for now */
> .max_brightness = 900,
> };
>
> ctx->base.backlight = devm_backlight_device_register(dev, dev_name(dev), dev,
> - ctx->link,
> + ctx,
> &sw43408_backlight_ops,
> &props);
>
> if (IS_ERR(ctx->base.backlight))
> return dev_err_probe(dev, PTR_ERR(ctx->base.backlight),
> "Failed to create backlight\n");
>
> return 0;
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
next prev parent reply other threads:[~2026-11-25 18:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 13:08 [PATCH v3 0/5] Pixel 3 display fixes David Heidelberg via B4 Relay
2026-11-25 13:08 ` [PATCH v3 1/5] drm/panel: lg-sw43408: use the full DCS brightness range David Heidelberg via B4 Relay
2026-11-25 15:39 ` Neil Armstrong
2026-11-25 13:08 ` [PATCH v3 2/5] drm/panel: lg-sw43408: skip backlight updates when unprepared David Heidelberg via B4 Relay
2026-11-25 18:49 ` Neil Armstrong [this message]
2026-11-25 13:08 ` [PATCH v3 3/5] drm/panel: lg-sw43408: split enable/disable from prepare/unprepare David Heidelberg via B4 Relay
2026-12-03 10:35 ` Neil Armstrong
2026-11-25 13:08 ` [PATCH v3 4/5] drm/panel: lg-sw43408: keep VPNL paired with VDDI and reset deasserted David Heidelberg via B4 Relay
2026-11-25 13:08 ` [PATCH v3 5/5] arm64: dts: qcom: sdm845-google: drop panel regulator-always-on David Heidelberg via B4 Relay
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=9dcb4721-a756-43b9-a8c6-34922dd4a115@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=abelvesa@kernel.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=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=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®