[PATCH 20/21] fixup! drm/i915: Create a full object for mock_ring

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Tue Sep 28 06:10:15 UTC 2021


---
 drivers/gpu/drm/i915/gt/mock_engine.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/mock_engine.c b/drivers/gpu/drm/i915/gt/mock_engine.c
index 56ae35ab58ee..e82a51185018 100644
--- a/drivers/gpu/drm/i915/gt/mock_engine.c
+++ b/drivers/gpu/drm/i915/gt/mock_engine.c
@@ -142,6 +142,7 @@ static void mock_context_unpin(struct intel_context *ce)
 
 static void mock_context_post_unpin(struct intel_context *ce)
 {
+	i915_vma_unpin(ce->ring->vma);
 }
 
 static void mock_context_destroy(struct kref *ref)
@@ -186,7 +187,7 @@ static int mock_context_alloc(struct intel_context *ce)
 static int mock_context_pre_pin(struct intel_context *ce,
 				struct i915_gem_ww_ctx *ww, void **unused)
 {
-	return 0;
+	return i915_vma_pin_ww(ce->ring->vma, ww, 0, 0, PIN_GLOBAL);
 }
 
 static int mock_context_pin(struct intel_context *ce, void *unused)
-- 
2.33.0



More information about the Intel-gfx-trybot mailing list