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 v3 4/6] drm/panel: add VIEWE JD9365TX 7 inch DSI panel
Date: Wed, 25 Nov 2026 02:26:08 +0000 [thread overview]
Message-ID: <sashiko-outbox-232409@kernel.org> (raw)
In-Reply-To: <tencent_3D3EC29E27E9DF37D4C9F1A60F2F2BA3EF07@qq.com>
Thank you for your contribution! Sashiko AI review found 5 potential
issues to consider:
- [High] drm/panel: call to removed of_drm_get_panel_orientation() in
jd9365tx_probe()
- [High] drm/panel: call to static drm_panel_init() in jd9365tx_probe()
- [Low] drm/panel: undocumented compatible jadard,jd9365tx-7kf82 in
jd9365tx_of_match
- [Low] drm/panel: open-coded DSI command sender and helpers in
panel-viewe-jd9365tx
- [Low] drm/panel: non-alphabetical Kconfig and Makefile order for
VIEWE_JD9365TX
--
commit 0ea4165795cc39804999640f1fa6be9c2c2143db
Author: Hefei <3066883572@qq.com>
drm/panel: add VIEWE JD9365TX 7 inch DSI panel
This commit adds a DRM panel driver for the VIEWE 7" 720x1280 Jadard
JD9365TX (7KF82) 2-lane MIPI-DSI panel.
> diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
> index 26ffa2378f55c..9a3038bf60987 100644
> --- a/drivers/gpu/drm/panel/Kconfig
> +++ b/drivers/gpu/drm/panel/Kconfig
> @@ -427,6 +427,17 @@ config DRM_PANEL_INNOLUX_P079ZCA
> 24 bit RGB per pixel. It provides a MIPI DSI interface to
> the host and has a built-in LED backlight.
>
> +config DRM_PANEL_VIEWE_JD9365TX
> + tristate "VIEWE 7\" JD9365TX DSI panel"
> + depends on OF
> + depends on DRM_MIPI_DSI
> + depends on BACKLIGHT_CLASS_DEVICE
> + help
> + Say Y here to enable the VIEWE 7" 720x1280 Jadard JD9365TX
> + MIPI-DSI panel.
> +
> + If unsure, say N.
> +
> config DRM_PANEL_JADARD_JD9365DA_H3
> tristate "Jadard JD9365DA-H3 WXGA DSI panel"
> depends on OF
> diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
> index 365f2e73f6b45..84ed0891a40d1 100644
> --- a/drivers/gpu/drm/panel/Makefile
> +++ b/drivers/gpu/drm/panel/Makefile
> @@ -42,6 +42,7 @@ obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o
> obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9882T) += panel-ilitek-ili9882t.o
> obj-$(CONFIG_DRM_PANEL_INNOLUX_EJ030NA) += panel-innolux-ej030na.o
> obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o
> +obj-$(CONFIG_DRM_PANEL_VIEWE_JD9365TX) += panel-viewe-jd9365tx.o
> obj-$(CONFIG_DRM_PANEL_JADARD_JD9365DA_H3) += panel-jadard-jd9365da-h3.o
> obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o
> obj-$(CONFIG_DRM_PANEL_JDI_LPM102A188A) += panel-jdi-lpm102a188a.o
[Severity: Low]
This isn't a bug, but DRM_PANEL_VIEWE_JD9365TX is placed between the
INNOLUX and JADARD entries instead of in alphabetical order in both
Kconfig and Makefile.
> 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..b511dd6bfed96
> --- /dev/null
> +++ b/drivers/gpu/drm/panel/panel-viewe-jd9365tx.c
[ ... ]
> +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;
> +}
[ ... ]
> +static int jd9365tx_get_modes(struct drm_panel *panel,
> + struct drm_connector *connector)
> +{
> + struct jd9365tx_panel *ctx = to_jd9365tx(panel);
> + struct drm_display_mode *mode;
> +
> + mode = drm_mode_duplicate(connector->dev, &jd9365tx_7kf82_mode);
> + if (!mode)
> + return -ENOMEM;
> +
> + drm_mode_set_name(mode);
> + mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> + drm_mode_probed_add(connector, mode);
> +
> + connector->display_info.width_mm = mode->width_mm;
> + connector->display_info.height_mm = mode->height_mm;
> + drm_connector_set_panel_orientation(connector, ctx->orientation);
> + return 1;
> +}
[Severity: Low]
Can this driver use the existing DRM and MIPI-DSI helpers instead of
open-coding them?
Since jd9365tx_prepare() already sets up a struct mipi_dsi_multi_context,
using mipi_dsi_dcs_write_seq_multi() and mipi_dsi_msleep() avoids the
custom struct jd9365tx_cmd table and jd9365tx_send_cmds() loop.
In jd9365tx_get_modes(), using drm_connector_helper_get_modes_fixed()
avoids returning a negative errno from .get_modes on allocation failure and
drops the redundant drm_connector_set_panel_orientation() call (which
panel_bridge_attach() already handles via .get_orientation). Using
devm_drm_panel_add() and devm_mipi_dsi_attach() in jd9365tx_probe() would
also allow dropping jd9365tx_remove(), and a brief commit message body
describing the panel hardware would be helpful.
[ ... ]
> +static int jd9365tx_probe(struct mipi_dsi_device *dsi)
> +{
> + struct device *dev = &dsi->dev;
> + struct jd9365tx_panel *ctx;
> + int ret;
> +
> + ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
> + if (!ctx)
> + return -ENOMEM;
> +
> + ctx->dsi = dsi;
> + mipi_dsi_set_drvdata(dsi, ctx);
> +
> + dsi->lanes = 2;
> + dsi->format = MIPI_DSI_FMT_RGB888;
> + dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
> + MIPI_DSI_MODE_LPM;
> +
> + ctx->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
> + if (IS_ERR(ctx->reset))
> + return PTR_ERR(ctx->reset);
> +
> + ctx->vdd = devm_regulator_get(dev, "vdd");
> + if (IS_ERR(ctx->vdd))
> + return PTR_ERR(ctx->vdd);
> +
> + ctx->iovcc = devm_regulator_get(dev, "iovcc");
> + if (IS_ERR(ctx->iovcc))
> + return PTR_ERR(ctx->iovcc);
> +
> + ret = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation);
> + if (ret)
> + return ret;
[Severity: High]
Does calling of_drm_get_panel_orientation() fail to compile 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 include/drm/drm_of.h.
> +
> + drm_panel_init(&ctx->panel, dev, &jd9365tx_funcs, DRM_MODE_CONNECTOR_DSI);
[Severity: High]
Does calling drm_panel_init() here also break the build and leave
ctx->panel.bridge uninitialized?
Commit fe417df954a9 ("drm/panel: Make drm_panel_init() static") made
drm_panel_init() static to drivers/gpu/drm/drm_panel.c. Allocating ctx
with devm_kzalloc() instead of devm_drm_panel_alloc() also skips
initializing the embedded refcounted struct drm_bridge that
drm_panel_add() registers.
[ ... ]
> +static const struct of_device_id jd9365tx_of_match[] = {
> + { .compatible = "viewe,7kf82" },
> + { .compatible = "jadard,jd9365tx-7kf82" },
> + { }
> +};
[Severity: Low]
Is "jadard,jd9365tx-7kf82" documented in the Device Tree bindings?
Documentation/devicetree/bindings/display/panel/viewe,jd9365tx.yaml only
documents "viewe,7kf82".
--
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_A3BF23A8B6E3691F0D567ADF8B84194F4408@qq.com?part=4
next prev parent reply other threads:[~2026-11-25 2:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20261125021127.1430-1-3066883572@qq.com>
2026-11-25 2:11 ` [PATCH v3 1/6] dt-bindings: display: add VIEWE JD9365TX panel binding Hefei
2026-11-25 2:18 ` sashiko-bot
2026-11-25 2:11 ` [PATCH v3 2/6] dt-bindings: input: add Jadard JD9365TX touchscreen binding Hefei
2026-11-25 2:22 ` sashiko-bot
2026-11-25 2:11 ` [PATCH v3 3/6] dt-bindings: backlight: add VIEWE I2C backlight binding Hefei
2026-11-25 2:19 ` sashiko-bot
2026-11-25 2:11 ` [PATCH v3 4/6] drm/panel: add VIEWE JD9365TX 7 inch DSI panel Hefei
2026-11-25 2:26 ` sashiko-bot [this message]
2026-11-25 2:11 ` [PATCH v3 5/6] Input: add Jadard JD9365TX in-cell touchscreen driver Hefei
2026-11-25 2:24 ` sashiko-bot
2026-11-25 2:32 ` Dmitry Torokhov
2026-11-25 2:11 ` [PATCH v3 6/6] backlight: add VIEWE I2C backlight driver Hefei
2026-11-25 2:22 ` sashiko-bot
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-232409@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