diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2024-05-02 15:14:23 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2024-05-08 14:51:39 +0300 |
commit | 3797783b1c966885e8bae4a7e6b99ca2f0fae4f0 (patch) | |
tree | e7342353ccac00b762bc8d8d28b3ca98f6899517 | |
parent | d082c05a635e59764c5337a5da7f4287b8a80476 (diff) | |
download | lwn-3797783b1c966885e8bae4a7e6b99ca2f0fae4f0.tar.gz lwn-3797783b1c966885e8bae4a7e6b99ca2f0fae4f0.zip |
drm/i915: Remove counter productive REGION_* wrappers
This extra macro level between the region IDs and their bitmasks
just makes it harder to see what is used where. Get rid of the
wrappers.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240502121423.1002-3-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
-rw-r--r-- | drivers/gpu/drm/i915/i915_pci.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_memory_region.h | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 |
3 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index 8b4fdeabb12a..37a1d530a59c 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c @@ -81,7 +81,7 @@ .__runtime.page_sizes = I915_GTT_PAGE_SIZE_4K #define GEN_DEFAULT_REGIONS \ - .memory_regions = REGION_SMEM | REGION_STOLEN_SMEM + .memory_regions = BIT(INTEL_REGION_SMEM) | BIT(INTEL_REGION_STOLEN_SMEM) #define I830_FEATURES \ GEN(2), \ @@ -660,7 +660,7 @@ static const struct intel_device_info rkl_info = { }; #define DGFX_FEATURES \ - .memory_regions = REGION_SMEM | REGION_LMEM | REGION_STOLEN_LMEM, \ + .memory_regions = BIT(INTEL_REGION_SMEM) | BIT(INTEL_REGION_LMEM_0) | BIT(INTEL_REGION_STOLEN_LMEM), \ .has_llc = 0, \ .has_pxp = 0, \ .has_snoop = 1, \ @@ -835,7 +835,7 @@ static const struct intel_device_info mtl_info = { .has_snoop = 1, .max_pat_index = 4, .has_pxp = 1, - .memory_regions = REGION_SMEM | REGION_STOLEN_LMEM, + .memory_regions = BIT(INTEL_REGION_SMEM) | BIT(INTEL_REGION_STOLEN_LMEM), .platform_engine_mask = BIT(RCS0) | BIT(BCS0) | BIT(CCS0), MTL_CACHELEVEL, }; diff --git a/drivers/gpu/drm/i915/intel_memory_region.h b/drivers/gpu/drm/i915/intel_memory_region.h index 9ba36454e51b..72496e401016 100644 --- a/drivers/gpu/drm/i915/intel_memory_region.h +++ b/drivers/gpu/drm/i915/intel_memory_region.h @@ -38,11 +38,6 @@ enum intel_region_id { INTEL_REGION_UNKNOWN, /* Should be last */ }; -#define REGION_SMEM BIT(INTEL_REGION_SMEM) -#define REGION_LMEM BIT(INTEL_REGION_LMEM_0) -#define REGION_STOLEN_SMEM BIT(INTEL_REGION_STOLEN_SMEM) -#define REGION_STOLEN_LMEM BIT(INTEL_REGION_STOLEN_LMEM) - #define I915_ALLOC_CONTIGUOUS BIT(0) #define for_each_memory_region(mr, i915, id) \ diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c index af349fd9abc2..0bd29846873b 100644 --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c @@ -122,7 +122,7 @@ static const struct intel_device_info mock_info = { .__runtime.page_sizes = (I915_GTT_PAGE_SIZE_4K | I915_GTT_PAGE_SIZE_64K | I915_GTT_PAGE_SIZE_2M), - .memory_regions = REGION_SMEM, + .memory_regions = BIT(INTEL_REGION_SMEM), .platform_engine_mask = BIT(0), /* simply use legacy cache level for mock device */ |