[PATCH] drm/xe/mmap: Add mmap support for PCI memory barrier

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Thu Oct 17 08:26:13 UTC 2024


Quoting Matthew Auld (2024-10-16 19:23:30)
> On 16/10/2024 17:06, Upadhyay, Tejas wrote:
> >> On 16/10/2024 16:13, Upadhyay, Tejas wrote:

<SNIP>

> >> IMO we should at least consider not hard coding the offset in the uapi, but
> >> maybe just return it from mmap_offset when passing a special flag, with no
> >> hard guarentee that the offset can't change if kmd so chooses?
> >> What do you think?
> >>
> >> Also if we want to keep the magic 0x50 instead of allocating an actual offset it
> >> might be good to add a build check against DRM_FILE_PAGE_OFFSET_START
> >> somewhere?
> > 
> > Build check looks good to me still let me go through both option tomorrow and get
> > back with V2 on this. I will get this in separate patch.

We seem to be looking at the quick'n dirty downstream i915 uAPI being ported
directly.

What was originally planned for proper upstreaming of the uAPI was to have a
query interface that would return both the mmap offset and per-client page offset
within that page (cacheline per DRM client). This interface would be most future-proof
for HW changes.

And if that query returns a failure, userspace would have to revert back to alternative
mechanism (either kernel doesn't support this feature, or it got disabled). That
fallback code should exist and be validated and reviewed in the userspace code
before merging.

Regards, Joonas


More information about the Intel-xe mailing list