Commit aa9eb0ca authored by Chris Wilson's avatar Chris Wilson

drm/i915/selftests: Set vm->gt backpointer for mock_ppgtt

Add the backpointer to ppgtt and i915->gt so that we can traverse across
the device hierarchy.
Reported-by: default avatarMatthew Auld <matthew.auld@intel.com>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191022095851.23442-1-chris@chris-wilson.co.uk
parent 18f3b272
...@@ -181,6 +181,7 @@ struct drm_i915_private *mock_gem_device(void) ...@@ -181,6 +181,7 @@ struct drm_i915_private *mock_gem_device(void)
intel_timelines_init(i915); intel_timelines_init(i915);
mock_init_ggtt(i915, &i915->ggtt); mock_init_ggtt(i915, &i915->ggtt);
i915->gt.ggtt = &i915->ggtt;
mkwrite_device_info(i915)->engine_mask = BIT(0); mkwrite_device_info(i915)->engine_mask = BIT(0);
......
...@@ -63,6 +63,7 @@ struct i915_ppgtt *mock_ppgtt(struct drm_i915_private *i915, const char *name) ...@@ -63,6 +63,7 @@ struct i915_ppgtt *mock_ppgtt(struct drm_i915_private *i915, const char *name)
if (!ppgtt) if (!ppgtt)
return NULL; return NULL;
ppgtt->vm.gt = &i915->gt;
ppgtt->vm.i915 = i915; ppgtt->vm.i915 = i915;
ppgtt->vm.total = round_down(U64_MAX, PAGE_SIZE); ppgtt->vm.total = round_down(U64_MAX, PAGE_SIZE);
ppgtt->vm.file = ERR_PTR(-ENODEV); ppgtt->vm.file = ERR_PTR(-ENODEV);
......
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