Christian König
b2ef808786
drm/sched: add optional errno to drm_sched_start()
...
The current implementation of drm_sched_start uses a hardcoded
-ECANCELED to dispose of a job when the parent/hw fence is NULL.
This results in drm_sched_job_done being called with -ECANCELED for
each job with a NULL parent in the pending list, making it difficult
to distinguish between recovery methods, whether a queue reset or a
full GPU reset was used.
To improve this, we first try a soft recovery for timeout jobs and
use the error code -ENODATA. If soft recovery fails, we proceed with
a queue reset, where the error code remains -ENODATA for the job.
Finally, for a full GPU reset, we use error codes -ECANCELED or
-ETIME. This patch adds an error code parameter to drm_sched_start,
allowing us to differentiate between queue reset and GPU reset
failures. This enables user mode and test applications to validate
the expected correctness of the requested operation. After a
successful queue reset, the only way to continue normal operation is
to call drm_sched_job_done with the specific error code -ENODATA.
v1: Initial implementation by Jesse utilized amdgpu_device_lock_reset_domain
and amdgpu_device_unlock_reset_domain to allow user mode to track
the queue reset status and distinguish between queue reset and
GPU reset.
v2: Christian suggested using the error codes -ENODATA for queue reset
and -ECANCELED or -ETIME for GPU reset, returned to
amdgpu_cs_wait_ioctl.
v3: To meet the requirements, we introduce a new function
drm_sched_start_ex with an additional parameter to set
dma_fence_set_error, allowing us to handle the specific error
codes appropriately and dispose of bad jobs with the selected
error code depending on whether it was a queue reset or GPU reset.
v4: Alex suggested using a new name, drm_sched_start_with_recovery_error,
which more accurately describes the function's purpose.
Additionally, it was recommended to add documentation details
about the new method.
v5: Fixed declaration of new function drm_sched_start_with_recovery_error.(Alex)
v6 (chk): rebase on upstream changes, cleanup the commit message,
drop the new function again and update all callers,
apply the errno also to scheduler fences with hw fences
v7 (chk): rebased
Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com >
Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20240826122541.85663-1-christian.koenig@amd.com
2024-09-06 18:05:52 +02:00
..
2024-07-08 16:46:14 -04:00
2024-08-23 10:53:45 -04:00
2024-06-19 12:51:23 -04:00
2024-04-26 17:22:39 -04:00
2024-06-14 16:17:11 -04:00
2024-04-30 09:44:34 -04:00
2024-08-06 10:43:18 -04:00
2023-07-12 10:58:01 -04:00
2024-09-06 18:05:52 +02:00
2024-01-05 16:10:43 -05:00
2024-08-06 10:43:18 -04:00
2023-11-17 09:29:54 -05:00
2023-11-17 09:29:54 -05:00
2024-08-13 12:12:52 -04:00
2024-08-06 10:43:18 -04:00
2024-08-06 10:43:18 -04:00
2024-08-06 10:43:18 -04:00
2024-08-06 10:43:18 -04:00
2024-08-06 10:43:18 -04:00
2024-05-02 16:18:13 -04:00
2024-07-23 17:42:54 -04:00
2024-08-23 10:53:16 -04:00
2024-08-23 10:53:16 -04:00
2024-08-06 11:11:03 -04:00
2023-08-09 09:43:40 -04:00
2024-06-27 17:09:41 -04:00
2024-01-15 18:35:38 -05:00
2023-08-07 17:13:10 -04:00
2024-04-26 17:22:38 -04:00
2024-08-13 12:12:52 -04:00
2023-11-09 16:59:57 -05:00
2023-10-05 17:59:35 -04:00
2024-08-13 10:27:03 -04:00
2024-07-27 17:35:05 -04:00
2024-05-23 14:37:24 +03:00
2024-08-20 22:06:43 -04:00
2023-07-12 14:14:50 +02:00
2024-02-16 15:41:50 -05:00
2023-06-09 12:47:26 -04:00
2024-08-13 13:03:57 -04:00
2023-06-15 11:37:55 -04:00
2024-08-06 10:42:09 -04:00
2023-12-07 17:43:13 -05:00
2024-08-06 10:42:22 -04:00
2024-03-22 15:51:48 -04:00
2024-09-06 18:05:52 +02:00
2024-07-24 17:30:23 -04:00
2024-08-23 10:54:57 -04:00
2024-05-17 17:40:36 -04:00
2024-08-02 11:29:17 -04:00
2024-06-19 14:17:25 -04:00
2023-10-09 17:59:29 -04:00
2023-10-09 17:02:34 -04:00
2024-08-13 16:21:08 +02:00
2023-06-09 09:59:20 -04:00
2024-06-05 10:57:47 -04:00
2024-05-20 16:20:26 -04:00
2023-06-09 10:38:09 -04:00
2024-02-16 12:52:50 +01:00
2023-05-24 18:03:29 +02:00
2024-06-19 14:17:25 -04:00
2024-05-02 15:49:11 -04:00
2023-10-09 16:52:17 -04:00
2023-07-25 13:36:08 -04:00
2024-06-14 16:15:59 -04:00
2024-08-16 14:23:16 -04:00
2024-07-05 11:39:23 +02:00
2023-06-09 10:36:38 -04:00
2024-08-20 22:07:35 -04:00
2024-08-23 10:54:57 -04:00
2024-08-23 10:53:16 -04:00
2024-08-16 14:27:50 -04:00
2024-08-07 18:23:42 -04:00
2024-06-14 16:15:58 -04:00
2024-05-13 15:44:02 -04:00
2024-04-26 17:22:43 -04:00
2024-03-04 15:59:08 -05:00
2024-08-16 14:27:45 -04:00
2024-08-16 14:27:45 -04:00
2023-07-12 10:57:25 -04:00
2023-09-26 16:54:51 -04:00
2024-06-27 17:34:40 -04:00
2023-06-09 09:43:50 -04:00
2024-06-27 17:34:40 -04:00
2024-07-27 17:28:58 -04:00
2024-09-06 18:05:52 +02:00
2024-08-20 22:06:43 -04:00
2024-02-12 16:12:00 -05:00
2024-06-27 17:34:33 -04:00
2024-08-27 14:33:12 +02:00
2024-08-06 11:11:01 -04:00
2024-06-19 12:50:31 -04:00
2024-08-20 22:14:04 -04:00
2024-08-20 22:14:04 -04:00
2024-08-23 10:53:16 -04:00
2024-07-27 17:35:05 -04:00
2024-02-22 10:21:27 -05:00
2024-05-08 15:17:06 -04:00
2024-07-05 11:39:23 +02:00
2024-07-23 17:42:54 -04:00
2023-08-09 18:08:51 -04:00
2024-08-20 23:04:17 -04:00
2024-07-24 17:30:23 -04:00
2024-07-16 11:44:30 -04:00
2023-06-23 15:33:09 -04:00
2024-07-24 17:30:23 -04:00
2024-06-05 11:25:14 -04:00
2024-08-06 11:11:01 -04:00
2024-08-06 11:11:01 -04:00
2024-04-22 19:44:16 +02:00
2024-06-14 16:15:58 -04:00
2024-08-16 14:27:50 -04:00
2024-08-16 14:17:31 -04:00
2023-07-27 15:04:19 -04:00
2024-08-13 12:50:01 -04:00
2024-08-16 14:27:42 -04:00
2024-01-15 18:35:38 -05:00
2024-05-02 16:18:10 -04:00
2023-09-01 15:12:07 +02:00
2023-06-09 09:25:02 -04:00
2024-06-14 16:17:12 -04:00
2024-07-23 17:07:08 -04:00
2024-05-08 15:17:04 -04:00
2024-02-16 15:41:50 -05:00
2024-01-22 17:13:18 -05:00
2024-03-20 13:38:16 -04:00
2024-02-22 12:05:16 -05:00
2024-06-19 14:17:25 -04:00
2024-07-08 16:47:27 -04:00
2024-07-08 16:47:27 -04:00
2024-06-27 17:34:39 -04:00
2024-06-27 17:34:39 -04:00
2024-08-06 11:11:01 -04:00
2024-07-23 17:32:20 -04:00
2024-01-15 18:35:38 -05:00
2024-08-13 10:27:03 -04:00
2024-05-13 15:45:41 -04:00
2024-08-13 12:13:03 -04:00
2023-11-10 11:33:08 -05:00
2024-08-13 12:13:03 -04:00
2023-11-10 11:33:08 -05:00
2024-07-16 11:44:04 -04:00
2024-08-16 14:23:45 -04:00
2024-08-13 13:04:48 -04:00
2024-08-13 12:12:52 -04:00
2024-07-27 17:35:05 -04:00
2024-03-20 13:38:14 -04:00
2024-05-29 17:03:20 -04:00
2024-04-30 09:58:53 -04:00
2024-03-20 13:38:14 -04:00
2024-08-27 14:33:12 +02:00
2024-08-23 10:55:13 -04:00
2024-07-02 18:06:13 -04:00
2024-03-07 15:33:01 -05:00
2024-08-07 18:23:59 -04:00
2024-04-22 19:44:16 +02:00
2024-07-10 10:12:28 -04:00
2023-09-26 16:54:51 -04:00
2024-08-06 11:11:01 -04:00
2024-03-20 13:38:13 -04:00
2024-08-27 14:33:12 +02:00
2024-08-13 10:25:49 -04:00
2024-08-20 22:08:02 -04:00
2023-09-20 12:23:28 -04:00
2023-09-20 12:23:28 -04:00
2023-09-20 12:23:28 -04:00
2024-01-15 18:31:45 -05:00
2024-02-12 16:08:12 -05:00
2024-02-12 16:08:12 -05:00
2024-06-14 15:34:10 -04:00
2024-01-15 18:35:37 -05:00
2024-01-15 18:35:37 -05:00
2024-01-15 18:35:37 -05:00
2024-08-27 14:33:12 +02:00
2024-01-15 18:35:37 -05:00
2024-04-26 17:22:39 -04:00
2024-06-14 16:17:12 -04:00
2024-04-26 17:22:39 -04:00
2024-08-16 14:24:18 -04:00
2024-01-15 18:35:38 -05:00
2024-05-02 16:18:10 -04:00
2024-01-18 15:37:52 -05:00
2024-04-26 17:22:39 -04:00
2024-07-27 17:35:05 -04:00
2024-07-27 17:35:05 -04:00
2024-07-27 17:35:05 -04:00
2024-07-27 17:35:05 -04:00
2024-05-08 15:17:07 -04:00
2023-10-26 19:02:52 -04:00
2023-10-26 19:02:52 -04:00
2024-07-24 17:30:23 -04:00
2024-07-24 17:30:23 -04:00
2024-06-19 12:52:36 -04:00
2024-08-16 14:24:18 -04:00
2024-08-16 14:24:09 -04:00
2024-08-20 22:07:07 -04:00
2024-08-20 22:07:58 -04:00
2023-04-18 16:28:55 -04:00
2024-03-20 13:37:36 -04:00
2024-08-20 22:07:16 -04:00
2024-08-20 22:07:16 -04:00
2024-08-20 22:08:02 -04:00
2023-06-09 09:49:56 -04:00
2024-01-15 18:35:40 -05:00
2024-08-20 22:51:31 -04:00
2024-08-06 11:11:01 -04:00
2024-08-20 22:14:14 -04:00
2024-08-16 14:24:56 -04:00
2024-08-23 10:53:25 -04:00
2024-05-02 16:18:10 -04:00
2024-08-23 10:53:16 -04:00
2024-08-23 10:53:16 -04:00
2023-06-09 09:49:56 -04:00
2023-10-09 16:59:06 -04:00
2024-03-20 13:12:57 -04:00
2023-10-09 16:59:06 -04:00
2023-10-09 16:59:06 -04:00
2023-10-09 16:59:06 -04:00
2023-08-30 15:01:15 -04:00
2024-07-08 16:46:36 -04:00
2024-04-30 10:00:30 -04:00
2024-06-14 16:17:12 -04:00
2024-06-14 16:17:12 -04:00
2024-06-14 16:17:12 -04:00
2024-08-23 10:55:13 -04:00
2024-08-23 10:55:13 -04:00
2024-08-13 13:04:48 -04:00
2024-08-13 13:04:48 -04:00
2024-04-30 10:00:39 -04:00
2024-08-20 22:14:14 -04:00
2024-08-20 22:14:14 -04:00
2024-08-20 22:14:14 -04:00
2024-08-20 22:14:14 -04:00
2024-02-12 16:09:57 -05:00
2024-04-26 17:22:39 -04:00
2024-06-27 17:30:27 -04:00
2024-06-27 17:34:40 -04:00
2023-08-07 16:35:38 -04:00
2024-07-08 16:47:09 -04:00
2024-02-12 16:09:42 -05:00
2024-07-02 18:05:35 -04:00
2024-06-14 16:17:12 -04:00
2024-05-02 16:18:11 -04:00
2024-07-27 17:28:58 -04:00
2024-07-27 17:28:58 -04:00
2024-07-27 17:28:58 -04:00
2024-07-27 17:28:58 -04:00
2024-06-14 16:16:51 -04:00
2024-08-13 13:02:48 -04:00
2024-06-14 16:16:51 -04:00
2024-06-14 16:16:51 -04:00
2024-08-13 13:17:36 -04:00
2024-08-13 13:17:36 -04:00
2024-06-14 16:16:51 -04:00
2023-08-31 16:34:36 -04:00
2024-06-14 16:16:51 -04:00
2024-08-13 13:17:36 -04:00
2024-06-27 17:34:33 -04:00
2024-09-03 00:13:44 +03:00
2024-02-12 16:08:41 -05:00
2024-02-12 16:08:41 -05:00
2024-07-24 17:30:23 -04:00
2024-08-20 22:14:04 -04:00
2024-08-16 14:25:09 -04:00
2024-05-02 16:18:10 -04:00
2024-01-05 16:10:44 -05:00
2024-06-14 16:17:12 -04:00
2024-08-23 10:53:16 -04:00
2023-06-09 09:53:42 -04:00
2024-06-14 16:17:12 -04:00
2023-10-09 16:59:06 -04:00
2023-10-09 16:59:06 -04:00
2023-10-09 16:59:06 -04:00
2023-10-09 16:59:06 -04:00
2024-06-14 16:17:12 -04:00
2023-08-30 15:01:09 -04:00
2024-08-07 18:16:38 -04:00
2024-04-30 09:58:25 -04:00
2024-06-14 16:17:12 -04:00
2023-06-09 12:44:12 -04:00
2023-08-15 18:08:27 -04:00
2023-09-20 16:24:09 -04:00
2024-06-27 17:31:37 -04:00
2024-06-27 17:31:37 -04:00
2024-06-27 17:31:37 -04:00
2024-08-13 12:12:51 -04:00
2024-06-14 16:15:58 -04:00
2024-04-26 17:22:39 -04:00
2024-06-27 17:10:35 -04:00
2024-03-07 15:32:42 -05:00
2024-05-08 15:17:07 -04:00
2024-05-08 15:17:07 -04:00
2024-05-08 15:17:06 -04:00
2024-05-08 15:17:06 -04:00
2024-05-08 15:17:07 -04:00
2024-06-14 16:18:26 -04:00
2024-05-08 15:17:06 -04:00
2024-05-08 15:17:06 -04:00
2023-08-09 09:46:04 -04:00
2024-05-08 15:17:06 -04:00
2023-08-30 15:00:27 -04:00
2024-05-29 14:09:01 -04:00
2023-04-24 18:16:23 -04:00
2024-06-27 17:10:39 -04:00
2023-09-20 12:23:28 -04:00
2024-02-12 16:14:12 -05:00
2023-09-20 12:23:28 -04:00
2024-07-02 18:07:10 -04:00
2023-06-15 11:06:58 -04:00
2024-06-19 18:25:58 -04:00
2024-02-14 17:16:07 -05:00
2024-06-14 16:17:12 -04:00
2024-06-14 16:17:12 -04:00
2024-07-23 17:34:49 -04:00
2024-08-06 11:11:01 -04:00
2023-06-09 09:49:56 -04:00
2023-06-09 09:25:37 -04:00
2024-08-13 10:26:53 -04:00
2024-08-13 10:26:53 -04:00
2024-08-20 22:51:37 -04:00
2024-08-13 10:26:59 -04:00
2024-06-14 15:22:14 -04:00
2024-07-23 17:07:09 -04:00
2024-08-07 18:23:49 -04:00
2024-04-30 10:03:32 -04:00
2024-04-26 17:22:39 -04:00
2024-04-26 17:22:39 -04:00
2024-04-26 17:22:39 -04:00
2024-04-26 17:22:39 -04:00
2024-07-24 17:30:23 -04:00
2023-10-05 17:59:35 -04:00
2023-06-09 09:48:36 -04:00
2023-10-05 17:59:35 -04:00
2024-03-20 13:38:16 -04:00
2024-03-20 13:38:16 -04:00
2023-11-09 17:03:16 -05:00
2024-05-08 15:17:06 -04:00
2024-07-27 17:28:28 -04:00
2024-08-20 22:07:02 -04:00
2024-07-08 16:50:40 -04:00
2024-08-13 13:20:43 -04:00
2024-04-30 09:46:51 -04:00
2024-03-22 15:54:54 -04:00
2023-10-20 15:11:28 -04:00
2024-04-26 17:22:39 -04:00
2024-01-18 15:38:00 -05:00
2024-01-09 15:43:54 -05:00
2024-03-20 13:38:15 -04:00
2023-06-15 11:06:59 -04:00
2024-08-06 11:11:01 -04:00
2024-07-23 17:32:14 -04:00
2024-05-23 15:09:35 -04:00
2023-08-31 16:40:53 -04:00
2024-04-26 17:22:39 -04:00
2024-04-26 17:22:39 -04:00
2024-04-26 17:22:39 -04:00
2024-04-26 17:22:39 -04:00
2023-11-10 11:33:08 -05:00
2024-04-26 17:22:39 -04:00
2024-08-13 12:13:03 -04:00
2024-08-13 12:13:03 -04:00
2023-04-14 13:47:49 -04:00
2024-08-16 14:26:31 -04:00
2024-08-16 14:26:41 -04:00
2024-08-16 14:26:57 -04:00
2024-08-16 14:23:59 -04:00
2024-08-16 14:26:06 -04:00
2023-06-09 09:41:27 -04:00
2024-08-16 14:26:19 -04:00
2023-08-31 16:34:32 -04:00
2024-08-16 14:26:12 -04:00
2024-08-16 14:25:12 -04:00
2024-02-12 16:10:18 -05:00
2024-01-31 17:39:47 -05:00
2024-05-02 15:48:57 -04:00
2024-04-26 17:22:39 -04:00
2024-08-16 14:24:09 -04:00
2024-03-07 15:32:58 -05:00
2024-07-02 18:06:24 -04:00
2023-08-31 16:34:05 -04:00