Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: Hefei <3066883572@qq.com>, dri-devel@lists.freedesktop.org
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH v4 4/6] drm/panel: add VIEWE JD9365TX 7 inch DSI panel
Date: Wed, 25 Nov 2026 02:53:46 +0000	[thread overview]
Message-ID: <sashiko-outbox-232426@kernel.org> (raw)
In-Reply-To: <tencent_C80F7DF059E17C7313CE3E35FF62A1A28D0A@qq.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] drm/panel: jd9365tx_probe() calls removed
  of_drm_get_panel_orientation()
- [Low] drm/panel: jd9365tx_send_cmds() duplicates
  mipi_dsi_dcs_write_seq_multi()
--

commit ca140a7fa3afff2f94a32e601392829d717fcccf
Author: Hefei <3066883572@qq.com>

drm/panel: add VIEWE JD9365TX 7 inch DSI panel

This commit adds a DRM panel driver for the VIEWE 7KF82 720x1280 Jadard
JD9365TX 2-lane MIPI-DSI panel module.

> diff --git a/drivers/gpu/drm/panel/panel-viewe-jd9365tx.c b/drivers/gpu/drm/panel/panel-viewe-jd9365tx.c
> new file mode 100644
> index 0000000000000..7455dff834c4d
> --- /dev/null
> +++ b/drivers/gpu/drm/panel/panel-viewe-jd9365tx.c
> @@ -0,0 +1,340 @@

[ ... ]

> +struct jd9365tx_cmd {
> +	u8 len;
> +	u8 data[64];
> +	u16 delay_ms;
> +};
> +
> +#define JD_CMD(...) {					\
> +	.len = sizeof((u8[]){ __VA_ARGS__ }),		\
> +	.data = { __VA_ARGS__ },			\
> +	.delay_ms = 0,					\
> +}
> +
> +#define JD_CMD_DELAY(ms, ...) {				\
> +	.len = sizeof((u8[]){ __VA_ARGS__ }),		\
> +	.data = { __VA_ARGS__ },			\
> +	.delay_ms = (ms),				\
> +}

[ ... ]

> +static int jd9365tx_send_cmds(struct mipi_dsi_device *dsi,
> +			      const struct jd9365tx_cmd *cmds,
> +			      unsigned int count)
> +{
> +	unsigned int i;
> +	int ret;
> +
> +	for (i = 0; i < count; i++) {
> +		const struct jd9365tx_cmd *cmd = &cmds[i];
> +
> +		if (cmd->len) {
> +			ret = mipi_dsi_dcs_write_buffer(dsi, cmd->data, cmd->len);
> +			if (ret < 0) {
> +				dev_err(&dsi->dev,
> +					"DCS write 0x%02x failed: %d\n",
> +					cmd->data[0], ret);
> +				return ret;
> +			}
> +		}
> +		if (cmd->delay_ms)
> +			msleep(cmd->delay_ms);
> +	}
> +	return 0;
> +}

[Severity: Low]
Can the init sequence use mipi_dsi_dcs_write_seq_multi() and
mipi_dsi_msleep() with the dsi_ctx that jd9365tx_prepare() already sets
up?  That avoids calling the deprecated mipi_dsi_dcs_write_buffer()
helper, removes the custom jd9365tx_send_cmds() loop, and drops the fixed
64-byte data[] padding per entry in struct jd9365tx_cmd.

[ ... ]

> +static int jd9365tx_probe(struct mipi_dsi_device *dsi)
> +{
> +	struct device *dev = &dsi->dev;
> +	struct jd9365tx_panel *ctx;
> +	int ret;

[ ... ]

> +	ret = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation);
> +	if (ret < 0)
> +		return dev_err_probe(dev, ret, "failed to get orientation\n");

[Severity: High]
Does this fail to build when CONFIG_DRM_PANEL_VIEWE_JD9365TX is enabled?
Commit b5a8b1f2a973 ("drm/panel: Use drm_of_get_panel_orientation()")
removed of_drm_get_panel_orientation() in favor of
drm_of_get_panel_orientation() declared in <drm/drm_of.h>, which also
needs to be included here.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_7B5CDF8F84744FFBBFCFA89FE3651F675608@qq.com?part=4

  reply	other threads:[~2026-11-25  2:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20261125024226.1293-1-3066883572@qq.com>
2026-11-25  2:42 ` [PATCH v4 1/6] dt-bindings: display: add VIEWE 7KF82 JD9365TX panel Hefei
2026-11-25  2:42 ` [PATCH v4 2/6] dt-bindings: input: add Jadard JD9365TX touchscreen Hefei
2026-11-25  2:42 ` [PATCH v4 3/6] dt-bindings: backlight: add VIEWE 7KF82 I2C backlight Hefei
2026-11-25  2:42 ` [PATCH v4 4/6] drm/panel: add VIEWE JD9365TX 7 inch DSI panel Hefei
2026-11-25  2:53   ` sashiko-bot [this message]
2026-11-25  2:42 ` [PATCH v4 5/6] Input: add Jadard JD9365TX in-cell touchscreen driver Hefei
2026-11-25  2:49   ` sashiko-bot
2026-11-25  2:42 ` [PATCH v4 6/6] backlight: add VIEWE 7KF82 I2C backlight driver Hefei

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=sashiko-outbox-232426@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=3066883572@qq.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-input@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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