Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Maxime Ripard" <mripard@kernel.org>
Cc: Frank.Li@kernel.org, imx@lists.linux.dev,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 11/70] drm/imx: dc: Switch to drm_atomic_helper_crtc_create_state
Date: Fri, 21 Aug 2026 15:00:19 +0000	[thread overview]
Message-ID: <20260821150020.6FD231F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260821-drm-no-more-crtc-reset-v1-11-fb793475c05a@kernel.org>

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

Pre-existing issues:
- [High] CRTC atomic callbacks call sleeping functions in atomic context.
--

--- Patch [11]: [PATCH 11/70] drm/imx: dc: Switch to drm_atomic_helper_crtc_create_state ---
commit 81ac70d774e55256bc7f69e9538e45aed1e198c8
Author: Maxime Ripard <mripard@kernel.org>

drm/imx: dc: Switch to drm_atomic_helper_crtc_create_state

The imx dc crtc implementation uses the deprecated
drm_atomic_helper_crtc_reset() as its reset hook. Switch to
drm_atomic_helper_crtc_create_state() instead.

> diff --git a/drivers/gpu/drm/imx/dc/dc-crtc.c b/drivers/gpu/drm/imx/dc/dc-crtc.c
> index 764510ff90a4a..0d64186a99018 100644
> --- a/drivers/gpu/drm/imx/dc/dc-crtc.c
> +++ b/drivers/gpu/drm/imx/dc/dc-crtc.c
> @@ -98,7 +98,7 @@ static void dc_crtc_disable_vblank(struct drm_crtc *crtc)
>  }
>  
>  static const struct drm_crtc_funcs dc_crtc_funcs = {
> -	.reset			= drm_atomic_helper_crtc_reset,
> +	.atomic_create_state = drm_atomic_helper_crtc_create_state,

[Severity: High]
This isn't a bug introduced by this patch, but while reviewing the CRTC
implementation in this file, I noticed that several atomic callbacks might be
calling sleeping functions.

For example, does dc_crtc_atomic_enable() call pm_runtime_resume_and_get(),
which can sleep?

Additionally, it looks like dc_crtc_atomic_enable(), dc_crtc_atomic_flush(),
and dc_crtc_atomic_disable() all use DC_CRTC_WAIT_FOR_COMPLETION_TIMEOUT(),
which waits for a completion and puts the task to sleep.

According to DRM subsystem guidelines, CRTC atomic enable, disable, and update
callbacks run in an atomic context where sleeping is forbidden. Could this
cause scheduling while atomic panics or warnings during non-blocking commits
and page flips?

>  	.destroy		= drm_crtc_cleanup,
>  	.set_config		= drm_atomic_helper_set_config,
>  	.page_flip		= drm_atomic_helper_page_flip,

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260821-drm-no-more-crtc-reset-v1-0-fb793475c05a@kernel.org?part=11

  reply	other threads:[~2026-08-21 15:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 14:38 [PATCH 00/70] drm/crtc: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
2026-08-21 14:38 ` [PATCH 11/70] drm/imx: dc: Switch to drm_atomic_helper_crtc_create_state Maxime Ripard
2026-08-21 15:00   ` sashiko-bot [this message]
2026-08-21 14:38 ` [PATCH 12/70] drm/imx: dcss: " Maxime Ripard
2026-08-21 14:38 ` [PATCH 18/70] drm/mxs: mxsfb: " Maxime Ripard
2026-08-21 15:12   ` sashiko-bot
2026-08-21 14:39 ` [PATCH 49/70] drm/imx: ipuv3: Convert to atomic_create_state Maxime Ripard
2026-08-24 14:32   ` Philipp Zabel
2026-08-21 14:39 ` [PATCH 56/70] drm/mxsfb: lcdif: " Maxime Ripard
2026-08-24 11:28 ` [PATCH 00/70] drm/crtc: Convert all drivers to atomic_create_state and remove reset Thomas Zimmermann

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=20260821150020.6FD231F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imx@lists.linux.dev \
    --cc=mripard@kernel.org \
    --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