venus: workaround a blob_mem mappable size check issue
authorYiwei Zhang <zzyiwei@chromium.org>
Wed, 1 Sep 2021 21:30:36 +0000 (21:30 +0000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 1 Sep 2021 22:38:48 +0000 (22:38 +0000)
commit97aa90dec2bdd5b8b1a0c274deb8c330aae7ae44
tree8fe485b50414b0f6c213e407cc6a073dd42774d0
parentcbdec34db3129552a6507d87d4bf0b4866774148
venus: workaround a blob_mem mappable size check issue

For blob_mem allocated from virtgpu_virgl backend, the guest mappable
size queried can be smaller than the size returned from image memory
requirement query from the host side. Here we temporarily workaround
until we switch to use cross-domain backend in minigbm.

Cc: 21.2.3 mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12687>
src/virtio/vulkan/vn_android.c
src/virtio/vulkan/vn_device_memory.c
src/virtio/vulkan/vn_device_memory.h