iris/bufmgr: Factor out GEM_MMAP ioctl from mmap_cpu and mmap_wc.
authorRafael Antognolli <rafael.antognolli@intel.com>
Wed, 13 Feb 2019 19:32:17 +0000 (11:32 -0800)
committerRafael Antognolli <rafael.antognolli@intel.com>
Mon, 20 Apr 2020 17:59:06 +0000 (10:59 -0700)
commit5bc3f52dd8c2b5acaae959ccae2e1fb7c769bb22
treeb5eafb64c6ef0c7c55875b5b556e9591e5937ee6
parenta42d7157849832485e63850abaf341b10c952ea0
iris/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.

[jordan.l.justen@intel.com: iris port]
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
v2: Rename 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/gallium/drivers/iris/iris_bufmgr.c