iris: Get VM id from iris_bufmgr's fd
authorJosé Roberto de Souza <jose.souza@intel.com>
Wed, 2 Nov 2022 13:33:43 +0000 (06:33 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 17 Nov 2022 14:32:37 +0000 (14:32 +0000)
commit23adf60f96fd81a4c90703fd083431339b190006
tree64209705b0cdd9a55223109d8e58144084b251bf
parentac51c0c93c1f2b9f73f5715ccae378354b962344
iris: Get VM id from iris_bufmgr's fd

iris_bufmgr_init_global_vm() was getting the VM id from the callers
fd not the iris_bufmgr's duplicated fd.

If i915 driver decides to always return unique vm ids, like a counter
that is initialized per device. So fd0 would have vm id = 0 by
default, fd1(dup of fd0) would have vm id = 1... in this scenario it
would cause a mismatch. But it is not the current i915 implementation.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19467>
src/gallium/drivers/iris/iris_bufmgr.c