[igt-dev] [PATCH i-g-t] lib/ioctl_wrappers: Keep IGT working without pread/pwrite ioctls

Chris Wilson chris at chris-wilson.co.uk
Fri Oct 2 09:36:41 UTC 2020


Quoting Ashutosh Dixit (2020-09-30 04:40:29)
> The general direction at this time is to phase out pread/write ioctls
> and not support them in future products. This means IGT must handle
> the absence of these ioctls. This patch does this by modifying
> gem_read() and gem_write() to do the read/write using the pread/pwrite
> ioctls first but when these ioctls are unavailable fall back to doing
> the read/write using a combination of mmap and memcpy.

Note that not all pread/pwrite can be replaced by a mmap(bo) + mempcy.
Removing pread/pwrite support for arbitrary bo is a significant ABI
regression.
-Chris


More information about the igt-dev mailing list