]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
accel/ivpu: Fix error handling in recovery/reset
authorJacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Wed, 29 Jan 2025 12:40:09 +0000 (13:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Feb 2025 12:30:15 +0000 (04:30 -0800)
commit639fc79f84f3cc0646c55157d12e97ae86223324
treec852c3ab385a6ef0b5fea60c0d3b4404b81631de
parent6e254503a3883c74f76a4474841b181e0ef00df9
accel/ivpu: Fix error handling in recovery/reset

[ Upstream commit 41a2d8286c905614f29007f1bc8e652d54654b82 ]

Disable runtime PM for the duration of reset/recovery so it is possible
to set the correct runtime PM state depending on the outcome of the
`ivpu_resume()`. Don’t suspend or reset the HW if the NPU is suspended
when the reset/recovery is requested. Also, move common reset/recovery
code to separate functions for better code readability.

Fixes: 27d19268cf39 ("accel/ivpu: Improve recovery and reset support")
Cc: stable@vger.kernel.org # v6.8+
Reviewed-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250129124009.1039982-4-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/accel/ivpu/ivpu_pm.c