diff options
author | Andi Shyti <andi.shyti@linux.intel.com> | 2021-12-19 23:25:00 +0200 |
---|---|---|
committer | Matt Roper <matthew.d.roper@intel.com> | 2022-01-05 10:49:02 -0800 |
commit | cdeea858d8df9891ed75415f377b3564f899a659 (patch) | |
tree | cfc5744e07ded378158ca9162272b85c8392204e /drivers/gpu/drm/i915/selftests/mock_gem_device.c | |
parent | 17190a3492bb20ce1cc695fdadc7e4f7ad5b44ff (diff) |
drm/i915: Remove unused i915->ggtt
The reference to the GGTT from the private date is not used
anymore. Remove it.
The ggtt in the root gt will now be dynamically allocated and the
deallocation handled by the drmm_* managed allocation.
Suggested-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Cc: MichaĆ Winiarski <michal.winiarski@intel.com>
Reviewed-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211219212500.61432-7-andi.shyti@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/mock_gem_device.c')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/mock_gem_device.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c index 0b469ae0f474..28a0f054009a 100644 --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c @@ -194,8 +194,13 @@ struct drm_i915_private *mock_gem_device(void) mock_init_contexts(i915); - mock_init_ggtt(i915, &i915->ggtt); - to_gt(i915)->vm = i915_vm_get(&i915->ggtt.vm); + /* allocate the ggtt */ + ret = intel_gt_assign_ggtt(to_gt(i915)); + if (ret) + goto err_unlock; + + mock_init_ggtt(to_gt(i915)); + to_gt(i915)->vm = i915_vm_get(&to_gt(i915)->ggtt->vm); mkwrite_device_info(i915)->platform_engine_mask = BIT(0); to_gt(i915)->info.engine_mask = BIT(0); |