Commit e2be4faf authored by John Harrison's avatar John Harrison Committed by Daniel Vetter

drm/i915: Update workarounds_emit() to take request structures

Updated the *_ring_workarounds_emit() functions to take requests instead of
ring/context pairs.

For: VIZ-5115
Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
Reviewed-by: default avatarTomas Elf <tomas.elf@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 2f20055d
......@@ -1058,11 +1058,11 @@ void intel_lr_context_unpin(struct intel_engine_cs *ring,
}
}
static int intel_logical_ring_workarounds_emit(struct intel_engine_cs *ring,
struct intel_context *ctx)
static int intel_logical_ring_workarounds_emit(struct drm_i915_gem_request *req)
{
int ret, i;
struct intel_ringbuffer *ringbuf = ctx->engine[ring->id].ringbuf;
struct intel_engine_cs *ring = req->ring;
struct intel_ringbuffer *ringbuf = req->ringbuf;
struct drm_device *dev = ring->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
struct i915_workarounds *w = &dev_priv->workarounds;
......@@ -1071,11 +1071,11 @@ static int intel_logical_ring_workarounds_emit(struct intel_engine_cs *ring,
return 0;
ring->gpu_caches_dirty = true;
ret = logical_ring_flush_all_caches(ringbuf, ctx);
ret = logical_ring_flush_all_caches(ringbuf, req->ctx);
if (ret)
return ret;
ret = intel_logical_ring_begin(ringbuf, ctx, w->count * 2 + 2);
ret = intel_logical_ring_begin(ringbuf, req->ctx, w->count * 2 + 2);
if (ret)
return ret;
......@@ -1089,7 +1089,7 @@ static int intel_logical_ring_workarounds_emit(struct intel_engine_cs *ring,
intel_logical_ring_advance(ringbuf);
ring->gpu_caches_dirty = true;
ret = logical_ring_flush_all_caches(ringbuf, ctx);
ret = logical_ring_flush_all_caches(ringbuf, req->ctx);
if (ret)
return ret;
......@@ -1603,7 +1603,7 @@ static int gen8_init_rcs_context(struct drm_i915_gem_request *req)
{
int ret;
ret = intel_logical_ring_workarounds_emit(req->ring, req->ctx);
ret = intel_logical_ring_workarounds_emit(req);
if (ret)
return ret;
......
......@@ -703,10 +703,10 @@ intel_init_pipe_control(struct intel_engine_cs *ring)
return ret;
}
static int intel_ring_workarounds_emit(struct intel_engine_cs *ring,
struct intel_context *ctx)
static int intel_ring_workarounds_emit(struct drm_i915_gem_request *req)
{
int ret, i;
struct intel_engine_cs *ring = req->ring;
struct drm_device *dev = ring->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
struct i915_workarounds *w = &dev_priv->workarounds;
......@@ -746,7 +746,7 @@ static int intel_rcs_ctx_init(struct drm_i915_gem_request *req)
{
int ret;
ret = intel_ring_workarounds_emit(req->ring, req->ctx);
ret = intel_ring_workarounds_emit(req);
if (ret != 0)
return ret;
......
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