diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lrc.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lrc.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index d67b08bd1d57..b01571e827ae 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -1010,6 +1010,20 @@ int intel_execlists_submission_final(struct i915_execbuffer_params *params) /* The mutex must be acquired before calling this function */ WARN_ON(!mutex_is_locked(¶ms->dev->struct_mutex)); + /* Make sure the request's seqno is the latest and greatest: */ + if (req->reserved_seqno != dev_priv->last_seqno) { + ret = i915_gem_get_seqno(engine->dev, &req->reserved_seqno); + if (ret) + return ret; + } + /* + * And make it live because some of the execbuff submission code + * requires the seqno to be available up front. + */ + WARN_ON(req->seqno); + req->seqno = req->reserved_seqno; + WARN_ON(req->seqno != dev_priv->last_seqno); + ret = intel_logical_ring_reserve_space(req); if (ret) goto err; |