summaryrefslogtreecommitdiff
path: root/drivers/accel
diff options
context:
space:
mode:
authorWachowski, Karol <karol.wachowski@intel.com>2024-06-11 14:04:29 +0200
committerJacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>2024-06-14 09:14:57 +0200
commita4d46253fa056d56b1c48dd5dfe3635817296bdb (patch)
tree20b6a4cc64d269775dd3783a22cd0b02329abd60 /drivers/accel
parent86c1d13b8fb6cc63def27abd90a22fb1683eb67d (diff)
downloadlwn-a4d46253fa056d56b1c48dd5dfe3635817296bdb.tar.gz
lwn-a4d46253fa056d56b1c48dd5dfe3635817296bdb.zip
accel/ivpu: Synchronize device unbind with recovery work
Do not allow unbinding device in the middle of recovery flow. Signed-off-by: Wachowski, Karol <karol.wachowski@intel.com> Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240611120433.1012423-13-jacek.lawrynowicz@linux.intel.com
Diffstat (limited to 'drivers/accel')
-rw-r--r--drivers/accel/ivpu/ivpu_drv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c
index c59c6f113098..c91400ecf926 100644
--- a/drivers/accel/ivpu/ivpu_drv.c
+++ b/drivers/accel/ivpu/ivpu_drv.c
@@ -695,14 +695,14 @@ static void ivpu_bo_unbind_all_user_contexts(struct ivpu_device *vdev)
static void ivpu_dev_fini(struct ivpu_device *vdev)
{
+ ivpu_jobs_abort_all(vdev);
+ ivpu_pm_cancel_recovery(vdev);
ivpu_pm_disable(vdev);
ivpu_prepare_for_reset(vdev);
ivpu_shutdown(vdev);
ivpu_ms_cleanup_all(vdev);
- ivpu_jobs_abort_all(vdev);
ivpu_job_done_consumer_fini(vdev);
- ivpu_pm_cancel_recovery(vdev);
ivpu_bo_unbind_all_user_contexts(vdev);
ivpu_ipc_fini(vdev);