From: Cody Kang <codykang.hk@gmail.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
sashiko-reviews@lists.linux.dev, dri-devel@lists.freedesktop.org,
devicetree@vger.kernel.org, linux-phy@lists.infradead.org,
linux-clk@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
vkoul@kernel.org, neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH v4 09/16] drm/spacemit: add Saturn DPU KMS pipeline
Date: Wed, 02 Dec 2026 20:39:56 +0800 [thread overview]
Message-ID: <e2c0b2c3-ee2a-44d6-ae2d-7e41beaee6d4@gmail.com> (raw)
In-Reply-To: <sashiko-outbox-239612@kernel.org>
Hi Thomas,
On Sun, 29 Nov 2026 12:54:45 +0000, sashiko-bot@kernel.org wrote:
[...]
> > + ret = drm_mode_config_create_initial_state(drm);
[...]
> > + ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
[...]
> [Severity: High]
> Does calling drm_mode_config_create_initial_state() before
> drm_vblank_init() leave vblank enabled on the initially disabled CRTC and
> allow spacemit_crtc_enable_vblank() to race with runtime PM?
[...]
In v2 you suggested calling drm_vblank_init() after the mode config
reset [1], and v4 still has that order.
Although the race Sashiko describes won't happen, I checked the code
and this order does skip drm_crtc_vblank_reset(): the reset runs only
if drm_dev_has_vblank(), which is false until drm_vblank_init() is
called.
So before the first modeset, a vblank wait reaches the driver's
enable_vblank(), and only a check in the driver rejects it. With
drm_vblank_init() first, the core rejects it.
I tend to agree with Sashiko and swap the two calls in v5. What do you
think?
[1] https://lore.kernel.org/dri-devel/f0b2beb9-d0ad-4870-812a-fef530a964c3@suse.de/
Cody
--
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: Cody Kang <codykang.hk@gmail.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
sashiko-reviews@lists.linux.dev, dri-devel@lists.freedesktop.org,
devicetree@vger.kernel.org, linux-phy@lists.infradead.org,
linux-clk@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
vkoul@kernel.org, neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH v4 09/16] drm/spacemit: add Saturn DPU KMS pipeline
Date: Wed, 02 Dec 2026 20:39:56 +0800 [thread overview]
Message-ID: <e2c0b2c3-ee2a-44d6-ae2d-7e41beaee6d4@gmail.com> (raw)
In-Reply-To: <sashiko-outbox-239612@kernel.org>
Hi Thomas,
On Sun, 29 Nov 2026 12:54:45 +0000, sashiko-bot@kernel.org wrote:
[...]
> > + ret = drm_mode_config_create_initial_state(drm);
[...]
> > + ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
[...]
> [Severity: High]
> Does calling drm_mode_config_create_initial_state() before
> drm_vblank_init() leave vblank enabled on the initially disabled CRTC and
> allow spacemit_crtc_enable_vblank() to race with runtime PM?
[...]
In v2 you suggested calling drm_vblank_init() after the mode config
reset [1], and v4 still has that order.
Although the race Sashiko describes won't happen, I checked the code
and this order does skip drm_crtc_vblank_reset(): the reset runs only
if drm_dev_has_vblank(), which is false until drm_vblank_init() is
called.
So before the first modeset, a vblank wait reaches the driver's
enable_vblank(), and only a check in the driver rejects it. With
drm_vblank_init() first, the core rejects it.
I tend to agree with Sashiko and swap the two calls in v5. What do you
think?
[1] https://lore.kernel.org/dri-devel/f0b2beb9-d0ad-4870-812a-fef530a964c3@suse.de/
Cody
next prev parent reply other threads:[~2026-12-02 12:40 UTC|newest]
Thread overview: 102+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 12:32 [PATCH v4 00/16] drm/spacemit: add SpacemiT K3 display support Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` [PATCH v4 01/16] dt-bindings: display: spacemit: add K3 Saturn DPU controller Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:36 ` sashiko-bot
2026-11-29 12:36 ` sashiko-bot
2026-12-02 13:07 ` Cody Kang
2026-12-02 13:07 ` Cody Kang
2026-11-29 12:32 ` [PATCH v4 02/16] dt-bindings: phy: add SpacemiT K3 Innosilicon DP PHY Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang
2026-11-29 12:32 ` [PATCH v4 03/16] dt-bindings: display: spacemit: add K3 Innosilicon DP/eDP controller Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang
2026-11-29 12:38 ` sashiko-bot
2026-11-29 12:38 ` sashiko-bot
2026-12-02 13:07 ` Cody Kang
2026-12-02 13:07 ` Cody Kang
2026-11-29 12:32 ` [PATCH v4 04/16] dt-bindings: soc: spacemit: allow eDP/DP PHY PLL pixel clocks on K3 APMU Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` [PATCH v4 05/16] phy: spacemit: add Innosilicon DP TX PHY driver Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang
2026-11-29 12:48 ` sashiko-bot
2026-11-29 12:48 ` sashiko-bot
2026-11-29 12:32 ` [PATCH v4 06/16] drm/spacemit: add Saturn DPU register model Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang
2026-11-29 12:32 ` [PATCH v4 07/16] drm/spacemit: add Saturn DPU core types, cmdlist and display MMU Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang
2026-11-29 12:32 ` [PATCH v4 08/16] drm/spacemit: add Saturn DPU hardware backend Cody Kang
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:49 ` sashiko-bot
2026-11-29 12:49 ` sashiko-bot
2026-11-29 12:32 ` [PATCH v4 09/16] drm/spacemit: add Saturn DPU KMS pipeline Cody Kang
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:54 ` sashiko-bot
2026-11-29 12:54 ` sashiko-bot
2026-12-02 12:39 ` Cody Kang [this message]
2026-12-02 12:39 ` Cody Kang
2026-11-29 12:32 ` [PATCH v4 10/16] drm/spacemit: add Saturn DPU DRM device driver Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang
2026-11-29 12:32 ` [PATCH v4 11/16] drm/spacemit: add Innosilicon DP/eDP controller bridge driver Cody Kang
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 13:01 ` sashiko-bot
2026-11-29 13:01 ` sashiko-bot
2026-11-29 12:32 ` [PATCH v4 12/16] MAINTAINERS: add SpacemiT K3 display driver entry Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang
2026-11-29 12:32 ` [PATCH v4 13/16] riscv: dts: spacemit: k3: add display nodes Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang
2026-11-29 12:48 ` sashiko-bot
2026-11-29 12:48 ` sashiko-bot
2026-12-02 13:08 ` Cody Kang
2026-12-02 13:08 ` Cody Kang
2026-11-29 12:32 ` [PATCH v4 14/16] riscv: dts: spacemit: k3-pico-itx: enable the DisplayPort output Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang
2026-11-29 12:32 ` [PATCH v4 15/16] riscv: dts: spacemit: k3-com260-ifx: " Cody Kang
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` [PATCH v4 16/16] riscv: defconfig: spacemit: k3: enable display driver Cody Kang
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-11-29 12:32 ` Cody Kang via B4 Relay
2026-12-01 1:36 ` [PATCH v4 00/16] drm/spacemit: add SpacemiT K3 display support Encrow Thorne
2026-12-01 1:36 ` Encrow Thorne
2026-12-01 1:36 ` Encrow Thorne
2026-12-01 11:33 ` Cody Kang
2026-12-01 11:33 ` Cody Kang
2026-12-01 11:33 ` Cody Kang
2026-12-02 11:41 ` Cody Kang
2026-12-02 11:41 ` Cody Kang
2026-12-02 11:41 ` Cody Kang
2026-12-01 11:26 ` Cody Kang
2026-12-01 11:26 ` Cody Kang
2026-12-01 11:26 ` 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=e2c0b2c3-ee2a-44d6-ae2d-7e41beaee6d4@gmail.com \
--to=codykang.hk@gmail.com \
--cc=airlied@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=simona@ffwll.ch \
--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 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.