Skip to content

Commit 5f8408a

Browse files
gtrzebiajlawryno
authored andcommitted
accel/ivpu: Add job status for jobs aborted by the driver
Add DRM_IVPU_JOB_STATUS_ABORTED to indicate that the job was aborted by the driver due to e.g. TDR or user context MMU faults. This will help UMD and tests distinguish if job was aborted by the FW or the driver. Signed-off-by: Grzegorz Trzebiatowski <[email protected]> Signed-off-by: Jacek Lawrynowicz <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 553099d commit 5f8408a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

drivers/accel/ivpu/ivpu_job.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ static int ivpu_job_signal_and_destroy(struct ivpu_device *vdev, u32 job_id, u32
294294
return -ENOENT;
295295

296296
if (job->file_priv->has_mmu_faults)
297-
job_status = VPU_JSM_STATUS_ABORTED;
297+
job_status = DRM_IVPU_JOB_STATUS_ABORTED;
298298

299299
job->bos[CMD_BUF_IDX]->job_status = job_status;
300300
dma_fence_signal(job->done_fence);
@@ -315,7 +315,7 @@ void ivpu_jobs_abort_all(struct ivpu_device *vdev)
315315
unsigned long id;
316316

317317
xa_for_each(&vdev->submitted_jobs_xa, id, job)
318-
ivpu_job_signal_and_destroy(vdev, id, VPU_JSM_STATUS_ABORTED);
318+
ivpu_job_signal_and_destroy(vdev, id, DRM_IVPU_JOB_STATUS_ABORTED);
319319
}
320320

321321
static int ivpu_job_submit(struct ivpu_job *job)

include/uapi/drm/ivpu_accel.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ struct drm_ivpu_submit {
305305

306306
/* drm_ivpu_bo_wait job status codes */
307307
#define DRM_IVPU_JOB_STATUS_SUCCESS 0
308+
#define DRM_IVPU_JOB_STATUS_ABORTED 256
308309

309310
/**
310311
* struct drm_ivpu_bo_wait - Wait for BO to become inactive

0 commit comments

Comments
 (0)