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

Dixit, Ashutosh ashutosh.dixit at intel.com
Fri Oct 2 19:34:30 UTC 2020


On Fri, 02 Oct 2020 02:36:41 -0700, Chris Wilson wrote:
>
> 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.

Dave Airlie NAK'd pread/pwrite for discrete here:

https://lists.freedesktop.org/archives/intel-gfx/2020-July/244677.html

Also UMD's are not using them anymore so the thinking is we would
discontinue pread/pwrite in i915 for future generations but retain them for
previous generations.


More information about the igt-dev mailing list