drm/xe/sched_job: prefer dma_fence_is_later

Doesn't look like we are accounting for seqno wrap. Just use
__dma_fence_is_later() like we already do for xe_hw_fence_signaled().

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
Matthew Auld 2023-04-06 17:26:24 +01:00 committed by Rodrigo Vivi
parent 79f2432e31
commit 1a9d163c42

View File

@ -229,7 +229,9 @@ bool xe_sched_job_started(struct xe_sched_job *job)
{
struct xe_lrc *lrc = job->engine->lrc;
return xe_lrc_start_seqno(lrc) >= xe_sched_job_seqno(job);
return !__dma_fence_is_later(xe_sched_job_seqno(job),
xe_lrc_start_seqno(lrc),
job->fence->ops);
}
bool xe_sched_job_completed(struct xe_sched_job *job)
@ -241,7 +243,8 @@ bool xe_sched_job_completed(struct xe_sched_job *job)
* parallel handshake is done.
*/
return xe_lrc_seqno(lrc) >= xe_sched_job_seqno(job);
return !__dma_fence_is_later(xe_sched_job_seqno(job), xe_lrc_seqno(lrc),
job->fence->ops);
}
void xe_sched_job_arm(struct xe_sched_job *job)