All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Adrián Larumbe" <adrian.larumbe@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v11 06/15] drm/panfrost: Fix PM refcnt and autosuspend issues at device probe/remove
Date: Fri, 25 Sep 2026 18:57:55 +0000	[thread overview]
Message-ID: <20260925185755.EC56A1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260925-claude-fixes-v11-6-0dbf5a58e7ce@collabora.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] pm: omitted reordering of pm_runtime_set_suspended() contrary to commit message
--

commit e5b622a5bf50c2417ee98e980c4b45ec511cb4e7
Author: Adrián Larumbe <adrian.larumbe@collabora.com>

drm/panfrost: Fix PM refcnt and autosuspend issues at device probe/remove

This commit attempts to fix PM reference count and autosuspend issues
during device probe and removal. It manually adjusts the PM reference
count, disables autosuspend in wind-down paths, and aims to reorder
PM teardown steps to mirror initialization.

> diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
> index 55fc22e8d4d4e..907d4a14a0b55 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
[ ... ]
> @@ -866,13 +871,16 @@ static int panfrost_probe(struct platform_device *pdev)
[ ... ]
>  err_out1:
> +	pm_runtime_dont_use_autosuspend(pfdev->base.dev);
>  	pm_runtime_disable(pfdev->base.dev);
>  	panfrost_device_fini(pfdev);
>  	pm_runtime_set_suspended(pfdev->base.dev);

[Severity: Medium]
The commit message states "Move pm_runtime_set_suspended() before
panfrost_device_fini() so that resource unwinding happens in the opposite
order as initialisation." However, this structural reordering appears to be
missing from the code.

Should pm_runtime_set_suspended() be moved above panfrost_device_fini() in
the panfrost_probe() error path to match the intent described in the commit
message?

> +	pm_runtime_put_noidle(pfdev->base.dev);
>  err_out0:
>  	return err;
>  }
> @@ -884,9 +892,12 @@ static void panfrost_remove(struct platform_device *pdev)
[ ... ]
>  	pm_runtime_get_sync(pfdev->base.dev);
> +	pm_runtime_dont_use_autosuspend(pfdev->base.dev);
>  	pm_runtime_disable(pfdev->base.dev);
>  	panfrost_device_fini(pfdev);
>  	pm_runtime_set_suspended(pfdev->base.dev);

[Severity: Medium]
Similarly, in the panfrost_remove() path, the reordering mentioned in the
commit message is omitted.

Should pm_runtime_set_suspended() be moved above panfrost_device_fini()
here as well?

> +	pm_runtime_put_noidle(pfdev->base.dev);
> +
>  }

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260925-claude-fixes-v11-0-0dbf5a58e7ce@collabora.com?part=6

  reply	other threads:[~2026-09-25 18:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25 18:45 [PATCH v11 00/15] Collection of fixes for Panfrost: Perfcnt, RPM, refactorings Adrián Larumbe
2026-09-25 18:45 ` [PATCH v11 01/15] drm/panfrost: Move shrinker initialization and unplug one level down Adrián Larumbe
2026-09-25 18:45 ` [PATCH v11 02/15] drm/panfrost: Move lock and modparam initialisations into their subsystems Adrián Larumbe
2026-09-25 18:45 ` [PATCH v11 03/15] drm/panfrost: Move debugfs initialisation to relevant subsystems Adrián Larumbe
2026-09-25 18:45 ` [PATCH v11 04/15] drm/panfrost: Skip NULL checks for clock enable/disabling Adrián Larumbe
2026-09-25 18:45 ` [PATCH v11 05/15] drm/panfrost: Consolidate device clock management and reset Adrián Larumbe
2026-09-25 18:57   ` sashiko-bot
2026-09-25 18:45 ` [PATCH v11 06/15] drm/panfrost: Fix PM refcnt and autosuspend issues at device probe/remove Adrián Larumbe
2026-09-25 18:57   ` sashiko-bot [this message]
2026-09-25 18:45 ` [PATCH v11 07/15] drm/panfrost: Explicitly enable MMU interrupts at device init Adrián Larumbe
2026-09-25 18:45 ` [PATCH v11 08/15] drm/panfrost: Move all DRM device initialisation into device_init() Adrián Larumbe
2026-09-25 18:58   ` sashiko-bot
2026-09-25 19:45   ` Adrián Larumbe
2026-09-25 18:45 ` [PATCH v11 09/15] drm/panfrost: Add warning messages to fatal error conditions Adrián Larumbe
2026-09-25 18:45 ` [PATCH v11 10/15] drm/panfrost: Add debugfs knob for manually triggering a GPU reset Adrián Larumbe
2026-09-25 18:45 ` [PATCH v11 11/15] drm/panfrost: Move perfcnt GPU disable sequence into a helper Adrián Larumbe
2026-09-25 18:45 ` [PATCH v11 12/15] drm/panfrost: Skip cache flush/invalidate when enabling perfcnt Adrián Larumbe
2026-09-25 18:45 ` [PATCH v11 13/15] drm/panfrost: Avoid cache flush after perfcnt sample in fully coherent systems Adrián Larumbe
2026-09-25 18:45 ` [PATCH v11 14/15] drm/panfrost: Introduce a reset lock Adrián Larumbe
2026-09-25 18:45 ` [PATCH v11 15/15] drm/panfrost: Fix races between perfcnt and reset sequence Adrián Larumbe
2026-09-25 19:02   ` sashiko-bot
2026-09-25 20:29   ` Adrián Larumbe

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=20260925185755.EC56A1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=adrian.larumbe@collabora.com \
    --cc=dri-devel@lists.freedesktop.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 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.