i965/bufmgr: Factor out GEM_MMAP ioctl from mmap_cpu and mmap_wc.
authorRafael Antognolli <rafael.antognolli@intel.com>
Fri, 14 Dec 2018 21:20:45 +0000 (13:20 -0800)
committerRafael Antognolli <rafael.antognolli@intel.com>
Mon, 20 Apr 2020 17:59:05 +0000 (10:59 -0700)
commita42d7157849832485e63850abaf341b10c952ea0
tree0111ca13d804a4f141855de76b1e16c8779c818b
parent16be8ff022758edf660baafb08c9084582a2ab5c
i965/bufmgr: Factor out GEM_MMAP ioctl from mmap_cpu and mmap_wc.

We want to add a new ioctl for mmap'ing buffers, so let's avoid
duplicating that code on both functions by extracting it from them
first.

v2: Update helper function names (Ken).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1675>
src/mesa/drivers/dri/i965/brw_bufmgr.c