linux/drivers/accel
Karol Wachowski 5eaa497411 accel/ivpu: Prevent recovery invocation during probe and resume
Refactor IPC send and receive functions to allow correct
handling of operations that should not trigger a recovery process.

Expose ivpu_send_receive_internal(), which is now utilized by the D0i3
entry, DCT initialization, and HWS initialization functions.
These functions have been modified to return error codes gracefully,
rather than initiating recovery.

The updated functions are invoked within ivpu_probe() and ivpu_resume(),
ensuring that any errors encountered during these stages result in a proper
teardown or shutdown sequence. The previous approach of triggering recovery
within these functions could lead to a race condition, potentially causing
undefined behavior and kernel crashes due to null pointer dereferences.

Fixes: 45e45362e0 ("accel/ivpu: Introduce ivpu_ipc_send_receive_active()")
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240930195322.461209-23-jacek.lawrynowicz@linux.intel.com
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
2024-10-11 12:44:39 +02:00
..
habanalabs accel/habanalabs: gradual sleep in polling memory macro 2024-06-23 09:53:33 +03:00
ivpu accel/ivpu: Prevent recovery invocation during probe and resume 2024-10-11 12:44:39 +02:00
qaic Merge drm/drm-next into drm-misc-next 2024-09-30 10:50:54 +02:00
drm_accel.c accel: Use XArray instead of IDR for minors 2024-08-26 17:06:22 +02:00
Kconfig accel/qaic: Add qaic driver to the build system 2023-04-06 08:23:03 +02:00
Makefile accel/qaic: Add qaic driver to the build system 2023-04-06 08:23:03 +02:00