Quoting Chris Wilson (2021-01-26 15:22:15) > Quoting Matthew Auld (2021-01-26 15:12:52) > > Device local memory is very much a GT thing, therefore it should be the > > responsibility of the GT to setup the device local memory region. > > > > Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx> > > Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx> > > --- > > drivers/gpu/drm/i915/gt/intel_gt.c | 29 +++++++++++++++++++++ > > drivers/gpu/drm/i915/gt/intel_gt.h | 1 + > > drivers/gpu/drm/i915/gt/intel_region_lmem.c | 3 ++- > > drivers/gpu/drm/i915/gt/intel_region_lmem.h | 4 +-- > > drivers/gpu/drm/i915/i915_drv.c | 4 +++ > > drivers/gpu/drm/i915/intel_memory_region.c | 5 ++-- > > 6 files changed, 40 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c > > index d8e1ab412634..989cd2106b09 100644 > > --- a/drivers/gpu/drm/i915/gt/intel_gt.c > > +++ b/drivers/gpu/drm/i915/gt/intel_gt.c > > @@ -39,6 +39,35 @@ void intel_gt_init_early(struct intel_gt *gt, struct drm_i915_private *i915) > > intel_uc_init_early(>->uc); > > } > > > > +int intel_gt_probe_lmem(struct intel_gt *gt) > > +{ > > + struct drm_i915_private *i915 = gt->i915; > > + struct intel_memory_region *mem; > > + int id; > > + int err; > > + > > + id = INTEL_REGION_LMEM; > > + if (!HAS_REGION(i915, id)) > > GEM_WARN_ON() for CI checking? > > Feels like something that should only be duplicated by programming > error, so worth the feedback. Wait this is !HAS_REGION(). That's even odder. Surely that we have a region is defined first by HW then by mockery. So the platform mask check is not required at this point. What we don't want to do is overwrite an existing i915->mm.regions[id]. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx