dragonboards: Add support for upstream mesa/main vulkan am: 2a8c7c5a8e

Original change: https://android-review.googlesource.com/c/device/linaro/dragonboard/+/1910019

Change-Id: I1a8dc4e4d4f8efc8e05ac0776dfb40bc0050a1c9
diff --git a/device-common.mk b/device-common.mk
index e781d2a..87f2bb4 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -85,6 +85,20 @@
     ro.opengles.version=196608 \
     persist.demo.rotationlock=1
 
+# Vulkan
+PRODUCT_PACKAGES += \
+	vulkan.freedreno
+
+PRODUCT_COPY_FILES += \
+	frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
+	frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
+	frameworks/native/data/etc/android.software.vulkan.deqp.level-2021-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
+
+PRODUCT_VENDOR_PROPERTIES += \
+	ro.hardware.vulkan=freedreno
+
+# Will need to enable this after ANDROID_external_memory_android_hardware_buffer lands in mesa
+#TARGET_USES_VULKAN = true
 
 #
 # Hardware Composer HAL
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 1022689..e8738ac 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -65,6 +65,7 @@
 /vendor/lib(64)?/hw/android\.hardware\.health@2\.0-impl-2\.1-cuttlefish\.so		u:object_r:same_process_hal_file:s0
 /vendor/lib(64)?/hw/gralloc\.minigbm_msm\.so						u:object_r:same_process_hal_file:s0
 /vendor/lib(64)?/hw/android\.hardware\.graphics\.mapper@4\.0-impl\.minigbm_msm\.so	u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/hw/vulkan\.freedreno\.so						u:object_r:same_process_hal_file:s0
 /vendor/lib(64)?/libdrm\.so								u:object_r:same_process_hal_file:s0
 /vendor/lib(64)?/libdrm_freedreno\.so							u:object_r:same_process_hal_file:s0
 /vendor/lib(64)?/libgbm_mesa\.so							u:object_r:same_process_hal_file:s0