Skip to contentSkip to conversation

drm/i915: Kill the fake lmem support

PATCH Superseded Lucas De Marchi 2 participants 4 messages Feb 16, 2022 – Feb 17, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Kill the fake lmem support

This was useful for early development of lmem, but it's not used anymore, so remove it.

Cc Chris Wilson <[email protected]>
Cc Matthew Auld <[email protected]>
---
 drivers/gpu/drm/i915/Kconfig.unstable       |   8 --
 drivers/gpu/drm/i915/gt/intel_gt.c          |   2 -
 drivers/gpu/drm/i915/gt/intel_region_lmem.c | 112 +-------------------
 drivers/gpu/drm/i915/gt/intel_region_lmem.h |   3 -
 drivers/gpu/drm/i915/i915_driver.c          |  15 ---
 drivers/gpu/drm/i915/i915_params.c          |   5 -
 drivers/gpu/drm/i915/i915_params.h          |   1 -
 7 files changed, 2 insertions(+), 144 deletions(-)
drivers/gpu/drm/i915/Kconfig.unstable +0 -8
index 0c2276155c2b..cf151a297ed7 100644
@@ -19,11 +19,3 @@ config DRM_I915_UNSTABLE
 	  Recommended for driver developers _only_.
 
 	  If in the slightest bit of doubt, say "N".
-
-config DRM_I915_UNSTABLE_FAKE_LMEM
-	bool "Enable the experimental fake lmem"
-	depends on DRM_I915_UNSTABLE
-	default n
-	help
-	  Convert some system memory into a fake local memory region for
-	  testing.
drivers/gpu/drm/i915/gt/intel_gt.c +0 -2
index e8403fa53909..325ac15439eb 100644
@@ -65,8 +65,6 @@ int intel_gt_probe_lmem(struct intel_gt *gt)
 	int err;
 
 	mem = intel_gt_setup_lmem(gt);
-	if (mem == ERR_PTR(-ENODEV))
-		mem = intel_gt_setup_fake_lmem(gt);
 	if (IS_ERR(mem)) {
 		err = PTR_ERR(mem);
 		if (err == -ENODEV)
drivers/gpu/drm/i915/gt/intel_region_lmem.c +2 -110

144 lines not on this page · raw message

drivers/gpu/drm/i915/gt/intel_region_lmem.h +0 -3
index 062d0542ae34..1438576b527a 100644
@@ -10,7 +10,4 @@ struct intel_gt;
 
 struct intel_memory_region *intel_gt_setup_lmem(struct intel_gt *gt);
 
-struct intel_memory_region *
-intel_gt_setup_fake_lmem(struct intel_gt *gt);
-
 #endif /* !__INTEL_REGION_LMEM_H */
drivers/gpu/drm/i915/i915_driver.c +0 -15
index 1c67ff735f18..62b3f332bbf5 100644
@@ -835,21 +835,6 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (!i915->params.nuclear_pageflip && match_info->graphics.ver < 5)
 		i915->drm.driver_features &= ~DRIVER_ATOMIC;
 
-	/*
-	 * Check if we support fake LMEM -- for now we only unleash this for
-	 * the live selftests(test-and-exit).
-	 */
-#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
-	if (IS_ENABLED(CONFIG_DRM_I915_UNSTABLE_FAKE_LMEM)) {
-		if (GRAPHICS_VER(i915) >= 9 && i915_selftest.live < 0 &&
-		    i915->params.fake_lmem_start) {
-			mkwrite_device_info(i915)->memory_regions =
-				REGION_SMEM | REGION_LMEM | REGION_STOLEN_SMEM;
-			GEM_BUG_ON(!HAS_LMEM(i915));
-		}
-	}
-#endif
-
 	ret = pci_enable_device(pdev);
 	if (ret)
 		goto out_fini;
drivers/gpu/drm/i915/i915_params.c +0 -5
index 525ae832aa9a..eea355c2fc28 100644
@@ -195,11 +195,6 @@ i915_param_named(enable_gvt, bool, 0400,
 	"Enable support for Intel GVT-g graphics virtualization host support(default:false)");
 #endif
 
-#if IS_ENABLED(CONFIG_DRM_I915_UNSTABLE_FAKE_LMEM)
-i915_param_named_unsafe(fake_lmem_start, ulong, 0400,
-	"Fake LMEM start offset (default: 0)");
-#endif
-
 #if CONFIG_DRM_I915_REQUEST_TIMEOUT
 i915_param_named_unsafe(request_timeout_ms, uint, 0600,
 			"Default request/fence/batch buffer expiration timeout.");
drivers/gpu/drm/i915/i915_params.h +0 -1
index c9d53ff910a0..c779a6f85c7e 100644
@@ -72,7 +72,6 @@ struct drm_printer;
 	param(int, fastboot, -1, 0600) \
 	param(int, enable_dpcd_backlight, -1, 0600) \
 	param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE, 0400) \
-	param(unsigned long, fake_lmem_start, 0, IS_ENABLED(CONFIG_DRM_I915_UNSTABLE_FAKE_LMEM) ? 0400 : 0) \
 	param(unsigned int, request_timeout_ms, CONFIG_DRM_I915_REQUEST_TIMEOUT, CONFIG_DRM_I915_REQUEST_TIMEOUT ? 0600 : 0) \
 	/* leave bools at the end to not create holes */ \
 	param(bool, enable_hangcheck, true, 0600) \
Signature · 1 line
2.35.1
#1 lore raw
Quoted 55 lines · Lucas De Marchi

This was useful for early development of lmem, but it's not used anymore, so remove it.

Cc Chris Wilson <[email protected]>
Cc Matthew Auld <[email protected]>

---

drivers/gpu/drm/i915/Kconfig.unstable       |   8 --
drivers/gpu/drm/i915/gt/intel_gt.c          |   2 -
drivers/gpu/drm/i915/gt/intel_region_lmem.c | 112 +-------------------
drivers/gpu/drm/i915/gt/intel_region_lmem.h |   3 -
drivers/gpu/drm/i915/i915_driver.c          |  15 ---
drivers/gpu/drm/i915/i915_params.c          |   5 -
drivers/gpu/drm/i915/i915_params.h          |   1 -
7 files changed, 2 insertions(+), 144 deletions(-)
drivers/gpu/drm/i915/Kconfig.unstable +0 -8
index 0c2276155c2b..cf151a297ed7 100644
@@ -19,11 +19,3 @@ config DRM_I915_UNSTABLE
 	  Recommended for driver developers _only_.
 
 	  If in the slightest bit of doubt, say "N".
-
-config DRM_I915_UNSTABLE_FAKE_LMEM
-	bool "Enable the experimental fake lmem"
-	depends on DRM_I915_UNSTABLE
-	default n
-	help
-	  Convert some system memory into a fake local memory region for
-	  testing.
drivers/gpu/drm/i915/gt/intel_gt.c +0 -2
index e8403fa53909..325ac15439eb 100644
@@ -65,8 +65,6 @@ int intel_gt_probe_lmem(struct intel_gt *gt)
 	int err;
 
 	mem = intel_gt_setup_lmem(gt);
-	if (mem == ERR_PTR(-ENODEV))
-		mem = intel_gt_setup_fake_lmem(gt);
 	if (IS_ERR(mem)) {
 		err = PTR_ERR(mem);
 		if (err == -ENODEV)
drivers/gpu/drm/i915/gt/intel_region_lmem.c +0 -2
index cb3f66707b21..df3856e09598 100644
@@ -13,60 +13,6 @@
 #include "gem/i915_gem_ttm.h"
 #include "gt/intel_gt.h"
 
-static int init_fake_lmem_bar(struct intel_memory_region *mem)
-{

drivers/gpu/drm/i915/gt/intel_region_lmem.c line 27

Quoted 10 lines
drivers/gpu/drm/i915/gt/intel_region_lmem.c +0 -10
-	struct drm_i915_private *i915 = mem->i915;
-	struct i915_ggtt *ggtt = to_gt(i915)->ggtt;
-	unsigned long n;
-	int ret;
-
-	/* We want to 1:1 map the mappable aperture to our reserved region */
-
-	mem->fake_mappable.start = 0;
-	mem->fake_mappable.size = resource_size(&mem->region);
-	mem->fake_mappable.color = I915_COLOR_UNEVICTABLE;

I forgot to remove fake_mappable and remap_addr fields from the struct. I will send a v2 later if people agree to remove the fake lmem.

Lucas De Marchi

#3 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Kill the fake lmem support

In reply to Lucas De Marchi
== Series Details ==

== Series Details ==

Series: drm/i915: Kill the fake lmem support
URL : https://patchwork.freedesktop.org/series/100276/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_11239 -> Patchwork_22306
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22306/index.html

Participating hosts (44 -> 43)
------------------------------

Additional (2): bat-rpls-1 bat-jsl-2
Missing (3): fi-bsw-cyan shard-tglu fi-kbl-8809g

Known issues
------------

Here are the changes found in Patchwork_22306 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_cs_nop@fork-compute0:
- fi-blb-e6850: NOTRUN -> [SKIP][1] ([fdo#109271]) +17 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22306/fi-blb-e6850/igt@amdgpu/[email protected]

* igt@gem_flink_basic@bad-flink:
- fi-skl-6600u: [PASS][2] -> [FAIL][3] ([i915#4547])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11239/fi-skl-6600u/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22306/fi-skl-6600u/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- fi-cml-u2: [PASS][4] -> [DMESG-WARN][5] ([i915#4269])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11239/fi-cml-u2/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22306/fi-cml-u2/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s3@smem:
- {fi-rkl-11600}: [INCOMPLETE][6] ([i915#5127]) -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11239/fi-rkl-11600/igt@gem_exec_suspend@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22306/fi-rkl-11600/igt@gem_exec_suspend@[email protected]

* igt@i915_selftest@live@requests:
- fi-blb-e6850: [DMESG-FAIL][8] ([i915#4528] / [i915#5026]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11239/fi-blb-e6850/igt@i915_selftest@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22306/fi-blb-e6850/igt@i915_selftest@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3012]: https://gitlab.freedesktop.org/drm/intel/issues/3012
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4269]: https://gitlab.freedesktop.org/drm/intel/issues/4269
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
[i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4898]: https://gitlab.freedesktop.org/drm/intel/issues/4898
[i915#5026]: https://gitlab.freedesktop.org/drm/intel/issues/5026
[i915#5127]: https://gitlab.freedesktop.org/drm/intel/issues/5127
[i915#5137]: https://gitlab.freedesktop.org/drm/intel/issues/5137
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533

Build changes
-------------

* Linux: CI_DRM_11239 -> Patchwork_22306

CI-20190529: 20190529
CI_DRM_11239: 069b6b1205e457625ecffa88ec32e7ae1fcea76b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6347: 37ea4c86f97c0e05fcb6b04cff72ec927930536e @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_22306: bd0a69a699476553eaab0329cc4b5877a5231336 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

bd0a69a69947 drm/i915: Kill the fake lmem support

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22306/index.html