From: sashiko-bot@kernel.org
To: "Adrián Larumbe" <adrian.larumbe@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v5 07/11] drm/panfrost: Add debugfs knob for manually triggering a GPU reset
Date: Tue, 11 Aug 2026 21:54:37 +0000 [thread overview]
Message-ID: <20260811215438.2C99E1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260811-claude-fixes-v5-7-3d692c9e98c2@collabora.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The debugfs reset knob silently ignores manual reset requests if the GPU is idle or if the kernel is built without CONFIG_PM, returning success without performing the requested reset.
--
--- Patch [7]: [PATCH v5 07/11] drm/panfrost: Add debugfs knob for manually triggering a GPU reset ---
commit b4df81709774bfc91adda2d5d8e8a0109269e143
Author: Adrián Larumbe <adrian.larumbe@collabora.com>
drm/panfrost: Add debugfs knob for manually triggering a GPU reset
This commit adds a debugfs knob to manually trigger a GPU reset. This is
intended to help test potential races between the GPU reset sequence and
other parts of the code accessing HW registers.
> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
> index 52f4b8c6a05fe..5b66173c75b9b 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
[ ... ]
> +static int reset_set(void *data, u64 val)
> +{
> + struct panfrost_device *pfdev =
> + container_of(data, struct panfrost_device, base);
> + int ret;
> +
> + ret = pm_runtime_get_if_in_use(pfdev->base.dev);
> +
> + if (ret > 0) {
> + panfrost_device_schedule_reset(pfdev);
> + flush_work(&pfdev->reset.work);
> + pm_runtime_put(pfdev->base.dev);
> + }
> +
> + return 0;
[Severity: Medium]
Will this silently ignore the manual reset request when the GPU is idle or if
CONFIG_PM is disabled?
If pm_runtime_get_if_in_use() returns <= 0, such as 0 when the device is idle
or -EINVAL when the kernel is built without CONFIG_PM, the reset is bypassed.
However, the function still returns 0 (success).
This could cause test scripts writing to this debugfs file to become flaky or
unreliable, as they will falsely assume the GPU was reset. Would it be better
to return an error code when the reset is skipped?
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260811-claude-fixes-v5-0-3d692c9e98c2@collabora.com?part=7
next prev parent reply other threads:[~2026-08-11 21:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 21:42 [PATCH v5 00/11] RPM, perfcnt and other minor fixes for Panfrost Adrián Larumbe
2026-08-11 21:42 ` [PATCH v5 01/11] drm/panfrost: Check another bo field for cache option query Adrián Larumbe
2026-08-11 21:42 ` [PATCH v5 02/11] drm/panfrost: Prevent division by 0 Adrián Larumbe
2026-08-11 21:57 ` sashiko-bot
2026-08-12 7:59 ` Boris Brezillon
2026-08-11 21:42 ` [PATCH v5 03/11] drm/panfrost: Remove unnecessary header file include Adrián Larumbe
2026-08-12 8:00 ` Boris Brezillon
2026-08-11 21:42 ` [PATCH v5 04/11] drm/panfrost: Move shrinker initialization and unplug one level down Adrián Larumbe
2026-08-11 21:55 ` sashiko-bot
2026-08-12 8:07 ` Boris Brezillon
2026-08-11 21:42 ` [PATCH v5 05/11] drm/panfrost: Move all device power up and down into RPM callbacks Adrián Larumbe
2026-08-11 21:54 ` sashiko-bot
2026-08-11 21:42 ` [PATCH v5 06/11] drm/panfrost: Explicitly enable MMU interrupts at device init Adrián Larumbe
2026-08-11 21:54 ` sashiko-bot
2026-08-11 21:42 ` [PATCH v5 07/11] drm/panfrost: Add debugfs knob for manually triggering a GPU reset Adrián Larumbe
2026-08-11 21:54 ` sashiko-bot [this message]
2026-08-11 21:42 ` [PATCH v5 08/11] drm/panfrost: Move perfcnt GPU disable sequence into a helper Adrián Larumbe
2026-08-11 21:42 ` [PATCH v5 09/11] drm/panfrost: Introduce a reset lock Adrián Larumbe
2026-08-11 21:55 ` sashiko-bot
2026-08-11 21:42 ` [PATCH v5 10/11] drm/panfrost: Fix races between perfcnt and reset sequence Adrián Larumbe
2026-08-11 21:58 ` sashiko-bot
2026-08-11 21:42 ` [PATCH v5 11/11] drm/panfrost: Bump driver minor to reflect new DUMP IOCTL req field Adrián Larumbe
2026-08-11 21:55 ` sashiko-bot
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=20260811215438.2C99E1F000E9@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.