public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Lizhi Hou <lizhi.hou@amd.com>
To: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>,
	<dri-devel@lists.freedesktop.org>
Cc: <jeff.hugo@oss.qualcomm.com>,
	Karol Wachowski <karol.wachowski@intel.com>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH] accel/ivpu: Trigger device recovery on engine reset/resume failure
Date: Thu, 5 Jun 2025 01:51:52 -0700	[thread overview]
Message-ID: <94095b1d-cb72-ae2f-034a-e9fb2745bba0@amd.com> (raw)
In-Reply-To: <861208c3-3505-4386-848f-a7c7a9508604@linux.intel.com>


On 6/2/25 06:05, Jacek Lawrynowicz wrote:
> Hi,
>
> On 5/28/2025 7:53 PM, Lizhi Hou wrote:
>> On 5/28/25 08:42, Jacek Lawrynowicz wrote:
>>> From: Karol Wachowski <karol.wachowski@intel.com>
>>>
>>> Trigger full device recovery when the driver fails to restore device state
>>> via engine reset and resume operations. This is necessary because, even if
>>> submissions from a faulty context are blocked, the NPU may still process
>>> previously submitted faulty jobs if the engine reset fails to abort them.
>>> Such jobs can continue to generate faults and occupy device resources.
>>> When engine reset is ineffective, the only way to recover is to perform
>>> a full device recovery.
>>>
>>> Fixes: dad945c27a42 ("accel/ivpu: Add handling of VPU_JSM_STATUS_MVNCI_CONTEXT_VIOLATION_HW")
>>> Cc: <stable@vger.kernel.org> # v6.15+
>>> Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
>>> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
>>> ---
>>>    drivers/accel/ivpu/ivpu_job.c     | 6 ++++--
>>>    drivers/accel/ivpu/ivpu_jsm_msg.c | 9 +++++++--
>>>    2 files changed, 11 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/accel/ivpu/ivpu_job.c b/drivers/accel/ivpu/ivpu_job.c
>>> index 1c8e283ad9854..fae8351aa3309 100644
>>> --- a/drivers/accel/ivpu/ivpu_job.c
>>> +++ b/drivers/accel/ivpu/ivpu_job.c
>>> @@ -986,7 +986,8 @@ void ivpu_context_abort_work_fn(struct work_struct *work)
>>>            return;
>>>          if (vdev->fw->sched_mode == VPU_SCHEDULING_MODE_HW)
>>> -        ivpu_jsm_reset_engine(vdev, 0);
>>> +        if (ivpu_jsm_reset_engine(vdev, 0))
>>> +            return;
>> Is it possible the context aborting is entered again before the full device recovery work is executed?
> This is a good point but ivpu_context_abort_work_fn() is triggered by an IRQ and the first thing we do when triggering recovery is disabling IRQs.
> The recovery work also flushes context_abort_work before staring to tear down everything, so we should be safe.
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
>
> Regards,
> Jacek
>

  reply	other threads:[~2025-06-05  8:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-28 15:42 [PATCH] accel/ivpu: Trigger device recovery on engine reset/resume failure Jacek Lawrynowicz
2025-05-28 17:53 ` Lizhi Hou
2025-06-02 13:05   ` Jacek Lawrynowicz
2025-06-05  8:51     ` Lizhi Hou [this message]
2025-06-05 12:45 ` Jacek Lawrynowicz

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=94095b1d-cb72-ae2f-034a-e9fb2745bba0@amd.com \
    --to=lizhi.hou@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jacek.lawrynowicz@linux.intel.com \
    --cc=jeff.hugo@oss.qualcomm.com \
    --cc=karol.wachowski@intel.com \
    --cc=stable@vger.kernel.org \
    /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