From: "Maíra Canal" <mcanal@igalia.com>
To: Lucas Tanure <lucas.tanure@neat.no>,
Maxime Ripard <mripard@kernel.org>,
Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: Dom Cobley <popcornmix@gmail.com>,
Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] drm/vc4: hdmi: always cancel the scrambling work synchronously
Date: Sat, 24 Oct 2026 10:23:29 -0300 [thread overview]
Message-ID: <dd94d07e-464c-43e8-bbea-c0b659077d41@igalia.com> (raw)
In-Reply-To: <20261020151948.83459-3-lucas.tanure@neat.no>
On 20/10/26 12:19, Lucas Tanure wrote:
> The scrambling work re-arms itself every second while a scrambled mode
> is active. When the output is disabled, the work may be executing at
> that moment rather than pending, and delayed_work_pending() is then
> false, so the cancel is skipped. The running instance finishes after
> the disable, sees the sink report scrambling off, writes the SCDC
> scrambling and clock ratio bits back on, and queues itself again. The
> sink is left configured for a scrambled 1/40 link that no longer exists
> and the work keeps running until the next enable.
>
> cancel_delayed_work_sync() handles both states: it waits for a running
> instance and blocks it from queueing itself again.
>
> Fixes: 257d36d493e9 ("drm/vc4: hdmi: Add a workqueue to set scrambling")
> Assisted-by: LLM
> Signed-off-by: Lucas Tanure <lucas.tanure@neat.no>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Best regards,
- Maíra
> ---
> drivers/gpu/drm/vc4/vc4_hdmi.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
> index 2cc46036f11d..4a386e053d3f 100644
> --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
> +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
> @@ -843,8 +843,7 @@ static void vc4_hdmi_disable_scrambling(struct drm_encoder *encoder)
>
> vc4_hdmi->scdc_enabled = false;
>
> - if (delayed_work_pending(&vc4_hdmi->scrambling_work))
> - cancel_delayed_work_sync(&vc4_hdmi->scrambling_work);
> + cancel_delayed_work_sync(&vc4_hdmi->scrambling_work);
>
> if (!drm_dev_enter(drm, &idx))
> return;
next prev parent reply other threads:[~2026-10-24 13:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 15:19 [PATCH v2 0/3] drm/vc4: hdmi: enable scrambling before the TMDS clock starts Lucas Tanure
2026-10-20 15:19 ` [PATCH v2 1/3] drm/vc4: Implement vc6_hdmi_phy_disable Lucas Tanure
2026-10-24 13:13 ` Maíra Canal
2026-10-20 15:19 ` [PATCH v2 2/3] drm/vc4: hdmi: always cancel the scrambling work synchronously Lucas Tanure
2026-10-24 13:23 ` Maíra Canal [this message]
2026-10-20 15:19 ` [PATCH v2 3/3] drm/vc4: hdmi: enable scrambling before the TMDS clock starts Lucas Tanure
2026-10-24 13:34 ` Maíra Canal
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=dd94d07e-464c-43e8-bbea-c0b659077d41@igalia.com \
--to=mcanal@igalia.com \
--cc=airlied@gmail.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-list@raspberrypi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.tanure@neat.no \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=popcornmix@gmail.com \
--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®