]> www.infradead.org Git - users/jedix/linux-maple.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)
committerJacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Mon, 3 Feb 2025 08:59:18 +0000 (09:59 +0100)
commit41a2d8286c905614f29007f1bc8e652d54654b82
treed196699dac95ae2ba9cd73f413103d46c5a47135
parentf2bc2afe34c107a02ce829a4039e85514feafe55
accel/ivpu: Fix error handling in recovery/reset

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
drivers/accel/ivpu/ivpu_pm.c