Commit 8b69ac66 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Fix HAS_REGION() usage in intel_gt_probe_lmem()

HAS_REGION() takes a bitmask, not the region ID. This causes the
GEM_BUG_ON() to assert that the SMEM region is available rather
than the intended LMEM region. No real harm since SMEM is always
available, but also not checking what was intended.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240502121423.1002-1-ville.syrjala@linux.intel.comReviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 749670a5
...@@ -105,7 +105,7 @@ static int intel_gt_probe_lmem(struct intel_gt *gt) ...@@ -105,7 +105,7 @@ static int intel_gt_probe_lmem(struct intel_gt *gt)
intel_memory_region_set_name(mem, "local%u", mem->instance); intel_memory_region_set_name(mem, "local%u", mem->instance);
GEM_BUG_ON(!HAS_REGION(i915, id)); GEM_BUG_ON(!HAS_REGION(i915, BIT(id)));
GEM_BUG_ON(i915->mm.regions[id]); GEM_BUG_ON(i915->mm.regions[id]);
i915->mm.regions[id] = mem; i915->mm.regions[id] = mem;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment