ARM Sunxi Platform Development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jernej Skrabec" <jernej.skrabec@gmail.com>
Cc: linux-sunxi@lists.linux.dev, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 07/13] drm/sun4i: hdmi: Don't leak sync polarity bits into packet control
Date: Mon, 03 Aug 2026 16:33:41 +0000	[thread overview]
Message-ID: <20260803163341.AEAC41F000E9@smtp.kernel.org> (raw)
In-Reply-To: <51ba0918ce016a4b45313d5df1b6ce31b8c8731e.1785772659.git.jernej.skrabec@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Encoder atomic enable callback calls functions that can sleep.
--

--- Patch [7]: [PATCH 07/13] drm/sun4i: hdmi: Don't leak sync polarity bits into packet control ---
commit 65d502c65ade8ff425b6b395888cc0a59bbbb7c3
Author: Jernej Skrabec <jernej.skrabec@gmail.com>

drm/sun4i: hdmi: Don't leak sync polarity bits into packet control

This commit fixes an issue where stale sync polarity bits were ORed into the
packet control register. It replaces the OR assignment with a direct
assignment to prevent selecting incorrect packet types.

> diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
> index e99f52ebb26f0..97253d631b2bd 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
> @@ -160,7 +160,7 @@ static void sun4i_hdmi_enable(struct drm_encoder *encoder,
>  
>  	drm_atomic_helper_connector_hdmi_update_infoframes(connector, state);

[Severity: High]
This isn't a bug introduced by this patch, but does this code sleep in an
atomic context?

The sun4i_hdmi_enable() function is registered as an encoder atomic enable
callback, which executes in an atomic context during non-blocking commits.
However, it calls drm_atomic_helper_connector_hdmi_update_infoframes() here,
which explicitly acquires a mutex. It also calls clk_prepare_enable() just
above this snippet, which can sleep.

Could calling these sleeping functions during atomic commit paths cause
kernel warnings or potential deadlocks?

> -	val |= SUN4I_HDMI_PKT_CTRL_TYPE(0, SUN4I_HDMI_PKT_AVI);
> +	val = SUN4I_HDMI_PKT_CTRL_TYPE(0, SUN4I_HDMI_PKT_AVI);
>  	val |= SUN4I_HDMI_PKT_CTRL_TYPE(1, SUN4I_HDMI_PKT_END);
>  	writel(val, hdmi->base + SUN4I_HDMI_PKT_CTRL_REG(0));
>

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1785772659.git.jernej.skrabec@gmail.com?part=7

  reply	other threads:[~2026-08-03 16:33 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1785772659.git.jernej.skrabec@gmail.com>
2026-08-03 16:10 ` [PATCH 01/13] drm/sun4i: Fix V3s YUV scanline size Jernej Skrabec
2026-08-03 16:13   ` Chen-Yu Tsai
2026-08-06  6:34   ` (subset) " Chen-Yu Tsai
2026-08-03 16:10 ` [PATCH 02/13] drm/sun4i: vi scaler: Fix coefficient selection Jernej Skrabec
2026-08-04  2:13   ` Chen-Yu Tsai
2026-08-03 16:10 ` [PATCH 03/13] drm/sun4i: vi scaler: Restore opaque alpha in video modes Jernej Skrabec
2026-08-03 16:35   ` Chen-Yu Tsai
2026-08-03 16:10 ` [PATCH 04/13] drm/sun4i: tcon-top: Keep mixer routes distinct Jernej Skrabec
2026-08-03 16:44   ` Chen-Yu Tsai
2026-08-03 16:10 ` [PATCH 05/13] drm/sun4i: tcon: Set output mux for DSI and LVDS Jernej Skrabec
2026-08-03 16:45   ` Chen-Yu Tsai
2026-08-03 16:10 ` [PATCH 06/13] drm/sun4i: tcon: Drop TCON TOP device reference Jernej Skrabec
2026-08-03 16:49   ` Chen-Yu Tsai
2026-08-03 16:10 ` [PATCH 07/13] drm/sun4i: hdmi: Don't leak sync polarity bits into packet control Jernej Skrabec
2026-08-03 16:33   ` sashiko-bot [this message]
2026-08-03 17:26   ` Chen-Yu Tsai
2026-08-03 16:10 ` [PATCH 08/13] drm/sun4i: crtc: Propagate layer initialization error Jernej Skrabec
2026-08-03 17:02   ` Chen-Yu Tsai
2026-08-03 16:10 ` [PATCH 09/13] drm/sun4i: tcon: Drop remote endpoint reference Jernej Skrabec
2026-08-03 17:04   ` Chen-Yu Tsai
2026-08-03 16:10 ` [PATCH 10/13] drm/sun4i: dw-hdmi: Drop TCON TOP port reference Jernej Skrabec
2026-08-03 17:05   ` Chen-Yu Tsai
2026-08-03 16:10 ` [PATCH 11/13] drm/sun4i: Drop node references while building component list Jernej Skrabec
2026-08-03 17:10   ` Chen-Yu Tsai
2026-08-03 16:10 ` [PATCH 12/13] drm/sun4i: hdmi-phy: Fix H6 8-bit MPLL config at 594 MHz Jernej Skrabec
2026-08-03 17:10   ` Chen-Yu Tsai
2026-08-03 16:10 ` [PATCH 13/13] drm/sun4i: Align VI buffer addresses for subsampled formats Jernej Skrabec
2026-08-03 17:25   ` Chen-Yu Tsai
2026-08-04 11:14     ` Chen-Yu Tsai
2026-08-04 16:25       ` Jernej Škrabec
2026-08-04 17:04         ` Chen-Yu Tsai
2026-08-04 17:58           ` Jernej Škrabec

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=20260803163341.AEAC41F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=linux-sunxi@lists.linux.dev \
    --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