From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
To: Daniel Stone <daniel@fooishbar.org>
Cc: "Sandy Huang" <hjc@rock-chips.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Andy Yan" <andy.yan@rock-chips.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>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Daniel Stone" <daniels@collabora.com>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Andrzej Hajda" <andrzej.hajda@intel.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Robert Foss" <rfoss@kernel.org>,
"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
"Jonas Karlman" <jonas@kwiboo.se>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Luca Ceresoli" <luca.ceresoli@bootlin.com>,
"Nicolas Frattaroli" <nicolas.frattaroli@collabora.com>,
kernel@collabora.com, "Andy Yan" <andyshrk@163.com>,
dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Sashiko <sashiko-bot@kernel.org>,
"Igor Paunovic" <royalnet026@gmail.com>
Subject: Re: [PATCH v5 04/15] drm/rockchip: vop2: Send pending event when atomic_enable() fails
Date: Wed, 4 Nov 2026 22:13:16 +0200 [thread overview]
Message-ID: <cd6321bf-9737-4949-9906-c0206e54bab6@collabora.com> (raw)
In-Reply-To: <CAPj87rN1rzjDMPvVJytwmvHGipCCuYOyX3abTRqYp4Vq5PyrYQ@mail.gmail.com>
Hi Daniel,
Thanks for reviewing the series!
On 10/30/26 1:21 PM, Daniel Stone wrote:
> Hi Cristian,
>
> On Tue, 13 Oct 2026 at 23:51, Cristian Ciocaltea
> <cristian.ciocaltea@collabora.com> wrote:
>> vop2_crtc_atomic_flush() stashes the CRTC completion event in vp->event
>> and relies on the frame start interrupt (VP_INT_FS_FIELD) to deliver it
>> later via drm_crtc_send_vblank_event(). Since atomic_enable() runs
>> before atomic_flush(), bailing on an error path makes it skip
>> drm_crtc_vblank_on() and leave the video port disabled. atomic_flush()
>> still traps the event in vp->event, but since the port never scans out,
>> the frame start interrupt does not fire and the event is not delivered.
>> Userspace waiting for the flip completion then blocks indefinitely.
>>
>> Note the event cannot be flushed from atomic_disable(), as userspace
>> waits for the completion before committing the next state, so the
>> disable does not arrive and draining it there would deadlock.
>>
>> Use the newly added vp->enabled flag to detect this in atomic_flush()
>> and send the event immediately when the port did not come up, rather
>> than deferring it to an interrupt that will never occur. This also
>> avoids the spurious drm_crtc_vblank_get() WARN previously hit on the
>> failed enable path, where the vblank is not on.
>
> I really don't know how I feel about this one.
>
> atomic_enable() is not supposed to fail at all, hence returning void.
> (Obviously, there are scenarios where it will fail, which Sashiko
> keeps 'helpfully' pointing out ...)
>
> I don't like how this just papers over the issue. It turns an eventual
> WARN on vblank timeout - which surfaces the issue - into a silent
> false-success. Userspace just sees commit completion requests arrive
> as soon as it's posted the commit, so it keeps on going on and
> everyone's happy. Having the flips time out is a messy splat of WARNs,
> but at least that messy splat points at the exact issues, rather than
> the screen just going black and userspace blithely trying to continue
> on.
Ack. Let's drop the patch.
Cristian
next prev parent reply other threads:[~2026-11-04 20:13 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 22:51 [PATCH v5 00/15] Support 10-bit YUV422 and 8/10-bit YUV420 color format on DW HDMI QP Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 01/15] dt-bindings: display: vop2: Add missing reset properties Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 02/15] drm/rockchip: vop2: Fix resource leak on vop2_enable() error path Cristian Ciocaltea
2026-10-30 11:34 ` Daniel Stone
2026-10-13 22:51 ` [PATCH v5 03/15] drm/rockchip: vop2: Balance state on atomic_enable() error paths Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 04/15] drm/rockchip: vop2: Send pending event when atomic_enable() fails Cristian Ciocaltea
2026-10-30 11:21 ` Daniel Stone
2026-11-04 20:13 ` Cristian Ciocaltea [this message]
2026-10-13 22:51 ` [PATCH v5 05/15] drm/rockchip: vop2: Avoid division by zero when computing max_dclk Cristian Ciocaltea
2026-10-30 11:34 ` Daniel Stone
2026-10-13 22:51 ` [PATCH v5 06/15] drm/rockchip: vop2: Fix VOP2_MAX_DCLK_RATE overflow on 32-bit Cristian Ciocaltea
2026-10-30 11:36 ` Daniel Stone
2026-10-13 22:51 ` [PATCH v5 07/15] drm/rockchip: vop2: Reset AXI and DCLK to improve robustness Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 08/15] drm/rockchip: vop2: Avoid DCLK source switch for 10-bit YUV422 output Cristian Ciocaltea
2026-10-30 11:42 ` Daniel Stone
2026-11-04 20:38 ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 09/15] drm/rockchip: vop2: Consolidate HDMI PHY PLL clock parent switch Cristian Ciocaltea
2026-10-30 11:44 ` Daniel Stone
2026-11-04 20:41 ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 10/15] drm/rockchip: vop2: Switch to enum vop_csc_format Cristian Ciocaltea
2026-10-30 11:47 ` Daniel Stone
2026-10-13 22:51 ` [PATCH v5 11/15] drm/bridge: dw-hdmi-qp: Log resolution and refresh rate in atomic_enable() Cristian Ciocaltea
2026-10-30 11:48 ` Daniel Stone
2026-10-13 22:51 ` [PATCH v5 12/15] drm/rockchip: dw_hdmi_qp: Do not mask error code in atomic_check() Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 13/15] drm/rockchip: dw_hdmi_qp: Support 10-bit YUV422 output format Cristian Ciocaltea
2026-10-30 11:52 ` Daniel Stone
2026-11-04 20:56 ` Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 14/15] drm/rockchip: dw_hdmi_qp: Enable YUV420 " Cristian Ciocaltea
2026-10-13 22:51 ` [PATCH v5 15/15] arm64: dts: rockchip: Add RK3588 VOP2 resets Cristian Ciocaltea
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=cd6321bf-9737-4949-9906-c0206e54bab6@collabora.com \
--to=cristian.ciocaltea@collabora.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=andy.yan@rock-chips.com \
--cc=andyshrk@163.com \
--cc=conor+dt@kernel.org \
--cc=daniel@fooishbar.org \
--cc=daniels@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kernel@collabora.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=nicolas.frattaroli@collabora.com \
--cc=p.zabel@pengutronix.de \
--cc=rfoss@kernel.org \
--cc=robh@kernel.org \
--cc=royalnet026@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=sashiko-bot@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®