Skip to content

i965: export GEM handle with RDWR access rights

Maksim Sisov requested to merge msisov/mesa:iris_i965_fix_mmap into main

There is a regression that made it impossible to export gem handles with write access.

That is, a client may export gem handles of each buffer plane, then export dmabuf fds using these handles, and mmap these dmabuf in a different process (this is what Chromium does).

After !4861 (merged), it became impossible as mmap resulted in EACCESS error as slightly different approach was taken for exporting these gem handles.

This CL fixes exporting gem handles (which are exported from dmabuf fds) by adding the DRM_RDWR flag.

Cc: mesa-stable

Fixes #3119 (closed)

Reviewed-by: Lionel Landwerlin lionel.g.landwerlin@intel.com

Edited by Maksim Sisov

Merge request reports