[PATCH 2/2] drm/i915/gem: Fix Virtual Memory mapping boundaries calculation

Andi Shyti andi.shyti at linux.intel.com
Mon Aug 5 09:39:55 UTC 2024


Hi Jonathan,

...

> > +	set_address_limits(area, vma, obj_offset, &start, &end);
> > +
> > +	pfn = (ggtt->gmadr.start + i915_ggtt_offset(vma)) >> PAGE_SHIFT;
> > +	pfn += (start - area->vm_start) >> PAGE_SHIFT;
> > +	pfn += obj_offset - vma->gtt_view.partial.offset;
> 
> I don't know how viable it would be, but maybe we could
> calculate pfn as a part of set_address_limits?

I was a bit afraid of dumping a massive parameter list...

> Just a suggestion, not blocking

... but now that I'm looking at it more carefully, it would be
just two parameters more (&pfn and ggtt->gmadr.start) and would
be cleaner. Will send a v2.

> Reviewed-by: Jonathan Cavitt <Jonathan.cavitt at intel.com>
> -Jonathan Cavitt

Thanks!

Andi


More information about the dri-devel mailing list