dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Nicolas Frattaroli" <nicolas.frattaroli@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 3/3] drm/panthor: Take reqs_lock in soft_reset for clearing pending_reqs
Date: Wed, 12 Aug 2026 15:05:24 +0000	[thread overview]
Message-ID: <20260812150524.CE9841F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260812-panthor-cache-flush-fix-v4-3-751e32901898@collabora.com>

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

Pre-existing issues:
- [High] Timeout paths in GPU and PWR requests return early without clearing pending flags, permanently breaking subsequent requests.
--

--- Patch [3]: [PATCH v4 3/3] drm/panthor: Take reqs_lock in soft_reset for clearing pending_reqs ---
commit d885508a531cdec1cd82fefa1c02cfc762aa4b05
Author: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>

drm/panthor: Take reqs_lock in soft_reset for clearing pending_reqs

This commit adds a missing lock around the clearing of pending_reqs in
panthor_gpu_soft_reset().

> diff --git a/drivers/gpu/drm/panthor/panthor_gpu.c b/drivers/gpu/drm/panthor/panthor_gpu.c
> index 55e33f145b40b..fb2702e1e0a2e 100644
> --- a/drivers/gpu/drm/panthor/panthor_gpu.c
> +++ b/drivers/gpu/drm/panthor/panthor_gpu.c
> @@ -424,7 +424,10 @@ int panthor_gpu_soft_reset(struct panthor_device *ptdev)
>  		return -ETIMEDOUT;
>  	}

[Severity: High]
This is a pre-existing issue, but does returning early here permanently wedge
the state machine?

If a hardware timeout occurs, this path returns -ETIMEDOUT and bypasses the
cleanup of pending_reqs. Subsequent calls to panthor_gpu_soft_reset() will
then hit the drm_WARN_ON for GPU_IRQ_RESET_COMPLETED, skip issuing the actual
hardware command, and inevitably time out again.

Similar issues appear to exist in the timeout paths for
panthor_gpu_flush_caches() and panthor_pwr_reset() where early returns
bypass clearing the pending flags.

>  
> -	ptdev->gpu->pending_reqs = 0;
> +	scoped_guard(spinlock, &ptdev->gpu->reqs_lock) {
> +		ptdev->gpu->pending_reqs = 0;
> +	}
> +
>  	return 0;
>  }

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260812-panthor-cache-flush-fix-v4-0-751e32901898@collabora.com?part=3

  reply	other threads:[~2026-08-12 15:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 14:07 [PATCH v4 0/3] Rework panthor's cache flush and soft reset locking Nicolas Frattaroli
2026-08-12 14:07 ` [PATCH v4 1/3] drm/panthor: Add tracepoint for cache flushing Nicolas Frattaroli
2026-08-12 15:07   ` Boris Brezillon
2026-08-19 15:37   ` Steven Price
2026-08-20 10:58   ` Liviu Dudau
2026-08-12 14:07 ` [PATCH v4 2/3] drm/panthor: Revisit reqs_lock handling in flush/reset paths Nicolas Frattaroli
2026-08-19 15:37   ` Steven Price
2026-08-20 11:03   ` Liviu Dudau
2026-08-12 14:07 ` [PATCH v4 3/3] drm/panthor: Take reqs_lock in soft_reset for clearing pending_reqs Nicolas Frattaroli
2026-08-12 15:05   ` sashiko-bot [this message]
2026-08-19 15:37   ` Steven Price
2026-08-20 11:06   ` Liviu Dudau

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=20260812150524.CE9841F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=nicolas.frattaroli@collabora.com \
    --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