From: sashiko-bot@kernel.org
To: "Cody Kang" <codykang.hk@gmail.com>
Cc: dri-devel@lists.freedesktop.org, neil.armstrong@linaro.org,
robh@kernel.org, conor+dt@kernel.org, vkoul@kernel.org,
linux-phy@lists.infradead.org, olteanv@gmail.com,
devicetree@vger.kernel.org
Subject: Re: [PATCH 15/17] riscv: dts: spacemit: k3-pico-itx: enable the DisplayPort output
Date: Sat, 25 Jul 2026 05:23:08 +0000 [thread overview]
Message-ID: <20260725052308.EB92B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260724-k3-display-v1-15-f22a10a52867@gmail.com>
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] Pixel clock truncation causes DisplayPort Transfer Unit (TU) miscalculation.
- [High] EDID extension block reads fail due to omitted DP_AUX_I2C_MOT bit in I2C-over-AUX transactions.
- [Medium] Missing get_modes implementation for DRM_BRIDGE_OP_MODES capability.
- [Medium] Dropped hotplug interrupt notifications due to omitted DRM_BRIDGE_OP_HPD.
--
--- Patch [15]: [PATCH 15/17] riscv: dts: spacemit: k3-pico-itx: enable the DisplayPort output ---
commit 81b9c7b43f433a109ef12eb306af123e3e5941fc
Author: Cody Kang <codykang.hk@gmail.com>
riscv: dts: spacemit: k3-pico-itx: enable the DisplayPort output
Pico-ITX brings the second DPU's output to an external DisplayPort
connector. Enable that DPU and the DisplayPort controller it feeds.
> diff --git a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
> index b89c1521e6649..6c31460990a75 100644
> --- a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
> +++ b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
[ ... ]
> @@ -221,3 +222,13 @@ hub@1 {
> &usb2_phy {
> status = "okay";
> };
> +
> +&dpu1_crtc0 {
> + status = "okay";
> +};
> +
> +&dp1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&dp1_1_cfg>;
> + status = "okay";
> +};
[Severity: Medium]
Enabling this DisplayPort output exposes some issues in the underlying driver.
Does the DisplayPort driver incorrectly declare support for
DRM_BRIDGE_OP_MODES?
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_bind()
dp->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID |
DRM_BRIDGE_OP_MODES;
The callback structure omits the logically required .get_modes callback:
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_bridge_funcs
static const struct drm_bridge_funcs spacemit_dp_bridge_funcs = {
.attach = spacemit_dp_bridge_attach,
...
[Severity: Medium]
Will hotplug events be silently dropped here? The driver omits the
DRM_BRIDGE_OP_HPD flag:
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_bind()
/*
* No OP_HPD: the HPD interrupt is gated by the DP pixel clock.
* Leaving it out marks the connector POLL_CONNECT |
* POLL_DISCONNECT instead.
*/
dp->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID |
DRM_BRIDGE_OP_MODES;
However, the hardware interrupt is fully enabled:
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_dev_init()
enable_irq(dp->irq);
And the handler invokes the notification function:
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_hotplug_event_handler()
drm_bridge_hpd_notify(&dp->bridge, status);
Because DRM_BRIDGE_OP_HPD is omitted, the DRM core never registers a hotplug
callback. This turns the notification into a no-op and forces the system to
fall back to a 10-second polling interval.
[Severity: High]
Could this calculation result in an incorrect DisplayPort Transfer Unit (TU)?
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_hw_set_msa_and_enable_video()
fp = mode->clock / 1000;
The pixel clock is truncated from kHz to an integer MHz value, losing
precision for standard clocks like 148.5 MHz. This truncated value is then
used directly to compute the Transfer Unit:
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_hw_set_msa_and_enable_video()
/* Transfer unit: tu = fp * bpp * 640 / (8 * lanes * link_rate) */
{
u64 temp_tu = (u64)fp * bpp * 640;
This math error produces a systematically incorrect Transfer Unit which can
lead to FIFO underflows and video corruption.
[Severity: High]
Can EDID extension block reads fail due to protocol violations on the
I2C-over-AUX transactions?
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_conn_get_edid_block()
ret = spacemit_dp_aux_i2c_write(dp, DDC_ADDR,
&edid_offset, 1);
if (ret)
continue;
ret = spacemit_dp_aux_i2c_read(dp, DDC_ADDR,
buf + offset, chunk);
The custom message request explicitly lacks the DP_AUX_I2C_MOT (Middle Of
Transaction) bit:
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_aux_i2c_write()
.request = DP_AUX_I2C_WRITE,
Issuing a write and a read separately without maintaining I2C transaction
continuity triggers an I2C STOP condition. This can cause I2C EEPROMs to
reset their address pointers, preventing the reading of EDID extension blocks.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260724-k3-display-v1-0-f22a10a52867@gmail.com?part=15
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
WARNING: multiple messages have this Message-ID (diff)
From: sashiko-bot@kernel.org
To: "Cody Kang" <codykang.hk@gmail.com>
Cc: dri-devel@lists.freedesktop.org, neil.armstrong@linaro.org,
robh@kernel.org, conor+dt@kernel.org, vkoul@kernel.org,
linux-phy@lists.infradead.org, olteanv@gmail.com,
devicetree@vger.kernel.org
Subject: Re: [PATCH 15/17] riscv: dts: spacemit: k3-pico-itx: enable the DisplayPort output
Date: Sat, 25 Jul 2026 05:23:08 +0000 [thread overview]
Message-ID: <20260725052308.EB92B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260724-k3-display-v1-15-f22a10a52867@gmail.com>
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] Pixel clock truncation causes DisplayPort Transfer Unit (TU) miscalculation.
- [High] EDID extension block reads fail due to omitted DP_AUX_I2C_MOT bit in I2C-over-AUX transactions.
- [Medium] Missing get_modes implementation for DRM_BRIDGE_OP_MODES capability.
- [Medium] Dropped hotplug interrupt notifications due to omitted DRM_BRIDGE_OP_HPD.
--
--- Patch [15]: [PATCH 15/17] riscv: dts: spacemit: k3-pico-itx: enable the DisplayPort output ---
commit 81b9c7b43f433a109ef12eb306af123e3e5941fc
Author: Cody Kang <codykang.hk@gmail.com>
riscv: dts: spacemit: k3-pico-itx: enable the DisplayPort output
Pico-ITX brings the second DPU's output to an external DisplayPort
connector. Enable that DPU and the DisplayPort controller it feeds.
> diff --git a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
> index b89c1521e6649..6c31460990a75 100644
> --- a/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
> +++ b/arch/riscv/boot/dts/spacemit/k3-pico-itx.dts
[ ... ]
> @@ -221,3 +222,13 @@ hub@1 {
> &usb2_phy {
> status = "okay";
> };
> +
> +&dpu1_crtc0 {
> + status = "okay";
> +};
> +
> +&dp1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&dp1_1_cfg>;
> + status = "okay";
> +};
[Severity: Medium]
Enabling this DisplayPort output exposes some issues in the underlying driver.
Does the DisplayPort driver incorrectly declare support for
DRM_BRIDGE_OP_MODES?
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_bind()
dp->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID |
DRM_BRIDGE_OP_MODES;
The callback structure omits the logically required .get_modes callback:
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_bridge_funcs
static const struct drm_bridge_funcs spacemit_dp_bridge_funcs = {
.attach = spacemit_dp_bridge_attach,
...
[Severity: Medium]
Will hotplug events be silently dropped here? The driver omits the
DRM_BRIDGE_OP_HPD flag:
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_bind()
/*
* No OP_HPD: the HPD interrupt is gated by the DP pixel clock.
* Leaving it out marks the connector POLL_CONNECT |
* POLL_DISCONNECT instead.
*/
dp->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID |
DRM_BRIDGE_OP_MODES;
However, the hardware interrupt is fully enabled:
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_dev_init()
enable_irq(dp->irq);
And the handler invokes the notification function:
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_hotplug_event_handler()
drm_bridge_hpd_notify(&dp->bridge, status);
Because DRM_BRIDGE_OP_HPD is omitted, the DRM core never registers a hotplug
callback. This turns the notification into a no-op and forces the system to
fall back to a 10-second polling interval.
[Severity: High]
Could this calculation result in an incorrect DisplayPort Transfer Unit (TU)?
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_hw_set_msa_and_enable_video()
fp = mode->clock / 1000;
The pixel clock is truncated from kHz to an integer MHz value, losing
precision for standard clocks like 148.5 MHz. This truncated value is then
used directly to compute the Transfer Unit:
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_hw_set_msa_and_enable_video()
/* Transfer unit: tu = fp * bpp * 640 / (8 * lanes * link_rate) */
{
u64 temp_tu = (u64)fp * bpp * 640;
This math error produces a systematically incorrect Transfer Unit which can
lead to FIFO underflows and video corruption.
[Severity: High]
Can EDID extension block reads fail due to protocol violations on the
I2C-over-AUX transactions?
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_conn_get_edid_block()
ret = spacemit_dp_aux_i2c_write(dp, DDC_ADDR,
&edid_offset, 1);
if (ret)
continue;
ret = spacemit_dp_aux_i2c_read(dp, DDC_ADDR,
buf + offset, chunk);
The custom message request explicitly lacks the DP_AUX_I2C_MOT (Middle Of
Transaction) bit:
drivers/gpu/drm/spacemit/spacemit_inno_dp.c:spacemit_dp_aux_i2c_write()
.request = DP_AUX_I2C_WRITE,
Issuing a write and a read separately without maintaining I2C transaction
continuity triggers an I2C STOP condition. This can cause I2C EEPROMs to
reset their address pointers, preventing the reading of EDID extension blocks.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260724-k3-display-v1-0-f22a10a52867@gmail.com?part=15
next prev parent reply other threads:[~2026-07-25 5:23 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-25 3:16 [PATCH 00/17] drm/spacemit: add SpacemiT K3 display support Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` [PATCH 01/17] dt-bindings: display: spacemit: add K3 Saturn DPU controller Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` [PATCH 02/17] dt-bindings: phy: add SpacemiT K3 Innosilicon DP PHY Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` [PATCH 03/17] dt-bindings: display: spacemit: add K3 Innosilicon DP/eDP controller Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` [PATCH 04/17] dt-bindings: soc: spacemit: allow eDP/DP PHY PLL pixel clocks on K3 APMU Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 5:16 ` sashiko-bot
2026-07-25 5:16 ` sashiko-bot
2026-07-25 3:16 ` [PATCH 05/17] phy: spacemit: add Innosilicon DP TX PHY driver Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 5:16 ` sashiko-bot
2026-07-25 5:16 ` sashiko-bot
2026-07-25 3:16 ` [PATCH 06/17] clk: spacemit: k3: parent eDP/DP pixel clock to the PHY PLL Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` [PATCH 07/17] drm/spacemit: add Saturn DPU register model Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` [PATCH 08/17] drm/spacemit: add Saturn DPU core types, cmdlist and display MMU Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 5:16 ` sashiko-bot
2026-07-25 5:16 ` sashiko-bot
2026-07-25 3:16 ` [PATCH 09/17] drm/spacemit: add Saturn DPU hardware backend Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 5:22 ` sashiko-bot
2026-07-25 5:22 ` sashiko-bot
2026-07-25 3:16 ` [PATCH 10/17] drm/spacemit: add Saturn DPU KMS pipeline Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 5:18 ` sashiko-bot
2026-07-25 5:18 ` sashiko-bot
2026-07-25 3:16 ` [PATCH 11/17] drm/spacemit: add Saturn DPU DRM device driver Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 5:17 ` sashiko-bot
2026-07-25 5:17 ` sashiko-bot
2026-07-25 3:16 ` [PATCH 12/17] drm/spacemit: add Innosilicon DP/eDP controller bridge driver Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 5:20 ` sashiko-bot
2026-07-25 5:20 ` sashiko-bot
2026-07-25 3:16 ` [PATCH 13/17] MAINTAINERS: add SpacemiT K3 display driver entry Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` [PATCH 14/17] riscv: dts: spacemit: k3: add display nodes Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 5:20 ` sashiko-bot
2026-07-25 5:20 ` sashiko-bot
2026-07-25 3:16 ` [PATCH 15/17] riscv: dts: spacemit: k3-pico-itx: enable the DisplayPort output Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 5:23 ` sashiko-bot [this message]
2026-07-25 5:23 ` sashiko-bot
2026-07-25 3:16 ` [PATCH 16/17] riscv: dts: spacemit: k3-com260-ifx: " Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` [PATCH 17/17] riscv: defconfig: spacemit: k3: enable display driver Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 3:16 ` Cody Kang
2026-07-25 6:36 ` [PATCH 00/17] drm/spacemit: add SpacemiT K3 display support Cody Kang
2026-07-25 6:36 ` Cody Kang
2026-07-25 6:36 ` Cody Kang
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=20260725052308.EB92B1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=codykang.hk@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--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 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.