Lines Matching refs:i915

46 void mock_device_flush(struct drm_i915_private *i915)  in mock_device_flush()  argument
48 struct intel_gt *gt = &i915->gt; in mock_device_flush()
61 struct drm_i915_private *i915 = to_i915(dev); in mock_device_release() local
63 if (!i915->do_release) in mock_device_release()
66 mock_device_flush(i915); in mock_device_release()
67 intel_gt_driver_remove(&i915->gt); in mock_device_release()
69 i915_gem_drain_workqueue(i915); in mock_device_release()
70 i915_gem_drain_freed_objects(i915); in mock_device_release()
72 mock_fini_ggtt(&i915->ggtt); in mock_device_release()
73 destroy_workqueue(i915->wq); in mock_device_release()
75 intel_region_ttm_device_fini(i915); in mock_device_release()
76 intel_gt_driver_late_release(&i915->gt); in mock_device_release()
77 intel_memory_regions_driver_release(i915); in mock_device_release()
79 drm_mode_config_cleanup(&i915->drm); in mock_device_release()
82 i915_params_free(&i915->params); in mock_device_release()
120 struct drm_i915_private *i915; in mock_gem_device() local
142 i915 = devm_drm_dev_alloc(&pdev->dev, &mock_driver, in mock_gem_device()
144 if (IS_ERR(i915)) { in mock_gem_device()
145 pr_err("Failed to allocate mock GEM device: err=%ld\n", PTR_ERR(i915)); in mock_gem_device()
152 pci_set_drvdata(pdev, i915); in mock_gem_device()
161 i915_params_copy(&i915->params, &i915_modparams); in mock_gem_device()
163 intel_runtime_pm_init_early(&i915->runtime_pm); in mock_gem_device()
166 drm_mode_config_init(&i915->drm); in mock_gem_device()
168 mkwrite_device_info(i915)->graphics_ver = -1; in mock_gem_device()
170 mkwrite_device_info(i915)->page_sizes = in mock_gem_device()
175 mkwrite_device_info(i915)->memory_regions = REGION_SMEM; in mock_gem_device()
176 intel_memory_regions_hw_probe(i915); in mock_gem_device()
178 mock_uncore_init(&i915->uncore, i915); in mock_gem_device()
180 i915_gem_init__mm(i915); in mock_gem_device()
181 intel_gt_init_early(&i915->gt, i915); in mock_gem_device()
182 atomic_inc(&i915->gt.wakeref.count); /* disable; no hw support */ in mock_gem_device()
183 i915->gt.awake = -ENODEV; in mock_gem_device()
185 ret = intel_region_ttm_device_init(i915); in mock_gem_device()
189 i915->wq = alloc_ordered_workqueue("mock", 0); in mock_gem_device()
190 if (!i915->wq) in mock_gem_device()
193 mock_init_contexts(i915); in mock_gem_device()
195 mock_init_ggtt(i915, &i915->ggtt); in mock_gem_device()
196 i915->gt.vm = i915_vm_get(&i915->ggtt.vm); in mock_gem_device()
198 mkwrite_device_info(i915)->platform_engine_mask = BIT(0); in mock_gem_device()
199 i915->gt.info.engine_mask = BIT(0); in mock_gem_device()
201 i915->gt.engine[RCS0] = mock_engine(i915, "mock", RCS0); in mock_gem_device()
202 if (!i915->gt.engine[RCS0]) in mock_gem_device()
205 if (mock_engine_init(i915->gt.engine[RCS0])) in mock_gem_device()
208 __clear_bit(I915_WEDGED, &i915->gt.reset.flags); in mock_gem_device()
209 intel_engines_driver_register(i915); in mock_gem_device()
211 i915->do_release = true; in mock_gem_device()
212 ida_init(&i915->selftest.mock_region_instances); in mock_gem_device()
214 return i915; in mock_gem_device()
217 intel_gt_driver_remove(&i915->gt); in mock_gem_device()
219 destroy_workqueue(i915->wq); in mock_gem_device()
221 intel_region_ttm_device_fini(i915); in mock_gem_device()
223 intel_gt_driver_late_release(&i915->gt); in mock_gem_device()
224 intel_memory_regions_driver_release(i915); in mock_gem_device()
225 drm_mode_config_cleanup(&i915->drm); in mock_gem_device()
226 mock_destroy_device(i915); in mock_gem_device()
231 void mock_destroy_device(struct drm_i915_private *i915) in mock_destroy_device() argument
233 struct device *dev = i915->drm.dev; in mock_destroy_device()