Commit 1a9d163c authored by Matthew Auld's avatar Matthew Auld Committed by Rodrigo Vivi

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: default avatarMatthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 79f2432e
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment