[igt-dev] [PATCH i-g-t] i915: Handle the case where legacy mmap is not available

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Wed May 26 09:36:00 UTC 2021


Op 11-05-2021 om 18:19 schreef Dixit, Ashutosh:
> On Tue, 11 May 2021 02:00:00 -0700, Maarten Lankhorst wrote:
>> We will remove support for the legacy mmap ioctl, so handle that
>> case without rewriting all tests.
>>
>> When the gem_mmap ioctl is not available, transparently fallback to
>> mmap_offset.
> Unless we've done something in the kernel, with this we should expect to
> see failures when object size approaches available system memory since as
> we know the mmap_offset page fault handler tries to pin the entire object
> which would fail for large objects. The old gem_mmap doesn't have this
> limitation.
>
> With pread/pwrite gone, the only option for large objects was to gem_mmap
> and read/write but appears that will now go away too.
>
> See e.g.
> https://patchwork.freedesktop.org/patch/426749/?series=88561&rev=3

I think we should be able to do partial mmaps on new platforms too,

if we cannot, then that should be fixed inside the kernel, not igt.

We already have the mmap_offset ioctl, we should be able to do partial mmaps with that. If not, we should probably adapt ttm for shared memory objects too.

~Maarten



More information about the igt-dev mailing list