venus: cache ahb backed buffer memory type bits requirement
authorYiwei Zhang <zzyiwei@chromium.org>
Mon, 2 Aug 2021 15:49:55 +0000 (15:49 +0000)
committerMarge Bot <eric+marge@anholt.net>
Mon, 2 Aug 2021 17:03:06 +0000 (17:03 +0000)
commite08960482a1330f93d6c6c7b0654b08bc29537f0
treecb39c8b87492ceec80a038b59376a10fcd430e58
parent5ed5d08141a49486344b3d79d85d1770631b3b6d
venus: cache ahb backed buffer memory type bits requirement

To properly init buffer memory requirement for AHB, memory type bits
from dma_buf fd properties need to be masked. However, creating a test
AHB at buffer creation is too costy. This patch caches the ahb backed
buffer memory type bits at device creation time if the app is requesting
AHB extension.

Cc: 21.2 mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12171>
src/virtio/vulkan/vn_android.c
src/virtio/vulkan/vn_android.h
src/virtio/vulkan/vn_device.c
src/virtio/vulkan/vn_device.h