On Tue, 2026-11-17 at 09:43 +0000, Tvrtko Ursulin wrote:
[…]
> +static void
> +drm_sched_job_adjust_next_start(struct drm_sched_job *job,
> + struct drm_sched_job *next)
> +{
> + struct dma_fence *next_scheduled = &next->s_fence->scheduled;
> + ktime_t ts;
> +
> + if (!test_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, &next_scheduled->flags))
> + return;
> +
> + /*
> + * If the next job has been submitted while the previous one was still
> + * running adjust it's starting timestamp to avoid accounting overlap.
> + */
> + ts = dma_fence_timestamp(&job->s_fence->finished);
> + if (ktime_after(ts, next_scheduled->timestamp))
sry for the back and forth, just seeing this
Why is ts accessed through the accessor function and the scheduled
timestamp via a direct pointer access? That's inconsistent and
shouldn't be done.
P.