From: Neil Armstrong <neil.armstrong@linaro.org>
To: Icenowy Zheng <zhengxingda@iscas.ac.cn>,
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>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Pengyu Luo <mitltlatltl@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] drm/panel: himax-hx83121a: pass the panel pointer when creating BL
Date: Thu, 18 Jun 2026 14:23:24 +0200 [thread overview]
Message-ID: <d7e482c2-80aa-49ec-b339-8bffbdd7e664@linaro.org> (raw)
In-Reply-To: <20260608162622.403713-2-zhengxingda@iscas.ac.cn>
On 6/8/26 18:26, Icenowy Zheng wrote:
> As backlight powering on/off support will be added, more fields of the
> panel context will be accessed in the backlight update function.
>
> Pass the whole panel struct instead of the DSI device when creating the
> backlight device.
>
> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> ---
> drivers/gpu/drm/panel/panel-himax-hx83121a.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-himax-hx83121a.c b/drivers/gpu/drm/panel/panel-himax-hx83121a.c
> index bed79aa06f46a..1a7e0125bced8 100644
> --- a/drivers/gpu/drm/panel/panel-himax-hx83121a.c
> +++ b/drivers/gpu/drm/panel/panel-himax-hx83121a.c
> @@ -193,10 +193,11 @@ static const struct drm_panel_funcs himax_panel_funcs = {
>
> static int himax_bl_update_status(struct backlight_device *bl)
> {
> - struct mipi_dsi_device *dsi = bl_get_data(bl);
> + struct himax *ctx = bl_get_data(bl);
> u16 brightness = backlight_get_brightness(bl);
> /* TODO: brightness to raw map table */
> - return mipi_dsi_dcs_set_display_brightness_large(dsi, brightness);
> + return mipi_dsi_dcs_set_display_brightness_large(to_primary_dsi(ctx),
> + brightness);
> }
>
> static const struct backlight_ops himax_bl_ops = {
> @@ -205,9 +206,9 @@ static const struct backlight_ops himax_bl_ops = {
> };
>
> static struct backlight_device *
> -himax_create_backlight(struct mipi_dsi_device *dsi)
> +himax_create_backlight(struct himax *ctx)
> {
> - struct device *dev = &dsi->dev;
> + struct device *dev = &to_primary_dsi(ctx)->dev;
> const struct backlight_properties props = {
> .type = BACKLIGHT_RAW,
> .brightness = 512,
> @@ -215,7 +216,7 @@ himax_create_backlight(struct mipi_dsi_device *dsi)
> .scale = BACKLIGHT_SCALE_NON_LINEAR,
> };
>
> - return devm_backlight_device_register(dev, dev_name(dev), dev, dsi,
> + return devm_backlight_device_register(dev, dev_name(dev), dev, ctx,
> &himax_bl_ops, &props);
> }
>
> @@ -646,7 +647,7 @@ static int himax_probe(struct mipi_dsi_device *dsi)
> ctx->panel.prepare_prev_first = true;
>
> if (desc->has_dcs_backlight) {
> - ctx->backlight = himax_create_backlight(to_primary_dsi(ctx));
> + ctx->backlight = himax_create_backlight(ctx);
> if (IS_ERR(ctx->backlight))
> return dev_err_probe(dev, PTR_ERR(ctx->backlight),
> "Failed to create backlight\n");
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
next prev parent reply other threads:[~2026-06-18 12:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 16:26 [PATCH 1/3] dt-bindings: display: panel: himax,hx83121a: add optional bl supply Icenowy Zheng
2026-06-08 16:26 ` [PATCH 2/3] drm/panel: himax-hx83121a: pass the panel pointer when creating BL Icenowy Zheng
2026-06-08 16:39 ` sashiko-bot
2026-06-18 12:23 ` Neil Armstrong [this message]
2026-06-08 16:26 ` [PATCH 3/3] drm/panel: himax-hx83121a: add backlight regulator support Icenowy Zheng
2026-06-08 16:49 ` sashiko-bot
2026-06-11 5:26 ` Pengyu Luo
2026-06-11 5:43 ` Icenowy Zheng
2026-06-11 5:51 ` Pengyu Luo
2026-06-18 12:23 ` Neil Armstrong
2026-06-08 17:11 ` [PATCH 1/3] dt-bindings: display: panel: himax,hx83121a: add optional bl supply Conor Dooley
2026-06-11 5:26 ` Pengyu Luo
2026-06-11 5:36 ` Icenowy Zheng
2026-06-11 5:45 ` Pengyu Luo
2026-06-11 6:15 ` Icenowy Zheng
2026-06-18 14:01 ` Neil Armstrong
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=d7e482c2-80aa-49ec-b339-8bffbdd7e664@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=airlied@gmail.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mitltlatltl@gmail.com \
--cc=mripard@kernel.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=zhengxingda@iscas.ac.cn \
/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