[Intel-gfx] [PATCH] drm/i915: Kill the fake lmem support

Lucas De Marchi lucas.demarchi at intel.com
Thu Feb 17 06:43:56 UTC 2022


On Wed, Feb 16, 2022 at 03:18:49PM -0800, Lucas De Marchi wrote:
>This was useful for early development of lmem, but it's not used
>anymore, so remove it.
>
>Cc: Chris Wilson <chris at chris-wilson.co.uk>
>Cc: Matthew Auld <matthew.auld at intel.com>
>Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
>---
> 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(-)
>
>diff --git a/drivers/gpu/drm/i915/Kconfig.unstable b/drivers/gpu/drm/i915/Kconfig.unstable
>index 0c2276155c2b..cf151a297ed7 100644
>--- a/drivers/gpu/drm/i915/Kconfig.unstable
>+++ b/drivers/gpu/drm/i915/Kconfig.unstable
>@@ -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.
>diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
>index e8403fa53909..325ac15439eb 100644
>--- a/drivers/gpu/drm/i915/gt/intel_gt.c
>+++ b/drivers/gpu/drm/i915/gt/intel_gt.c
>@@ -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)
>diff --git a/drivers/gpu/drm/i915/gt/intel_region_lmem.c b/drivers/gpu/drm/i915/gt/intel_region_lmem.c
>index cb3f66707b21..df3856e09598 100644
>--- a/drivers/gpu/drm/i915/gt/intel_region_lmem.c
>+++ b/drivers/gpu/drm/i915/gt/intel_region_lmem.c
>@@ -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)
>-{
>-	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


More information about the Intel-gfx mailing list