diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c index 6881317a747e..1424582e4a9b 100644 --- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c +++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c @@ -2015,6 +2015,10 @@ static int gen7_ctx_switch_bb_init(struct intel_engine_cs *engine) if (err) goto err_private; + err = i915_vma_sync(vma); + if (err) + goto err_unpin; + err = gen7_ctx_switch_bb_setup(engine, vma); if (err) goto err_unpin; diff --git a/drivers/gpu/drm/i915/gt/selftest_ring_submission.c b/drivers/gpu/drm/i915/gt/selftest_ring_submission.c index fcfddcd2a63d..9995faadd7e8 100644 --- a/drivers/gpu/drm/i915/gt/selftest_ring_submission.c +++ b/drivers/gpu/drm/i915/gt/selftest_ring_submission.c @@ -29,6 +29,12 @@ static struct i915_vma *create_wally(struct intel_engine_cs *engine) return ERR_PTR(err); } + err = i915_vma_sync(vma); + if (err) { + i915_gem_object_put(obj); + return ERR_PTR(err); + } + cs = i915_gem_object_pin_map(obj, I915_MAP_WC); if (IS_ERR(cs)) { i915_gem_object_put(obj);