Merge "Gralloc: AIDL HAL may replace HIDL HAL." into tm-dev am: 2eab518ff5

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/18360587

Change-Id: I6d10ce5db1d7b0b1201b384a097063e5bc352813
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/compatibility_matrices/compatibility_matrix.3.xml b/compatibility_matrices/compatibility_matrix.3.xml
index 468735d..0964c99 100644
--- a/compatibility_matrices/compatibility_matrix.3.xml
+++ b/compatibility_matrices/compatibility_matrix.3.xml
@@ -183,7 +183,10 @@
             <instance>default</instance>
         </interface>
     </hal>
-    <hal format="hidl" optional="false">
+    <!-- Either the AIDL or the HIDL allocator HAL must exist on the device.
+         If the HIDL composer HAL exists, it must be at least version 2.0.
+         See DeviceManifestTest.GrallocHal -->
+    <hal format="hidl" optional="true">
         <name>android.hardware.graphics.allocator</name>
         <version>2.0</version>
         <interface>
diff --git a/compatibility_matrices/compatibility_matrix.4.xml b/compatibility_matrices/compatibility_matrix.4.xml
index 96f291f..8ef0b3a 100644
--- a/compatibility_matrices/compatibility_matrix.4.xml
+++ b/compatibility_matrices/compatibility_matrix.4.xml
@@ -187,7 +187,10 @@
             <instance>default</instance>
         </interface>
     </hal>
-    <hal format="hidl" optional="false">
+    <!-- Either the AIDL or the HIDL allocator HAL must exist on the device.
+         If the HIDL composer HAL exists, it must be at least version 2.0.
+         See DeviceManifestTest.GrallocHal -->
+    <hal format="hidl" optional="true">
         <name>android.hardware.graphics.allocator</name>
         <version>2.0</version>
         <version>3.0</version>
diff --git a/compatibility_matrices/compatibility_matrix.5.xml b/compatibility_matrices/compatibility_matrix.5.xml
index 3642814..12b85c7 100644
--- a/compatibility_matrices/compatibility_matrix.5.xml
+++ b/compatibility_matrices/compatibility_matrix.5.xml
@@ -208,7 +208,10 @@
             <instance>default</instance>
         </interface>
     </hal>
-    <hal format="hidl" optional="false">
+    <!-- Either the AIDL or the HIDL allocator HAL must exist on the device.
+         If the HIDL composer HAL exists, it must be at least version 2.0.
+         See DeviceManifestTest.GrallocHal -->
+    <hal format="hidl" optional="true">
         <name>android.hardware.graphics.allocator</name>
         <!-- New, non-Go devices should use 4.0, tested in vts_treble_vintf_vendor_test -->
         <version>2.0</version>
diff --git a/compatibility_matrices/compatibility_matrix.6.xml b/compatibility_matrices/compatibility_matrix.6.xml
index 9c42cb0..e19d2dd 100644
--- a/compatibility_matrices/compatibility_matrix.6.xml
+++ b/compatibility_matrices/compatibility_matrix.6.xml
@@ -238,7 +238,10 @@
             <instance>default</instance>
         </interface>
     </hal>
-    <hal format="hidl" optional="false">
+    <!-- Either the AIDL or the HIDL allocator HAL must exist on the device.
+         If the HIDL composer HAL exists, it must be at least version 2.0.
+         See DeviceManifestTest.GrallocHal -->
+    <hal format="hidl" optional="true">
         <name>android.hardware.graphics.allocator</name>
         <!-- New, non-Go devices should use 4.0, tested in vts_treble_vintf_vendor_test -->
         <version>2.0</version>
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index 84263b6..886f7f5 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -278,9 +278,13 @@
             <instance>default</instance>
         </interface>
     </hal>
+    <!-- Either the AIDL or the HIDL allocator HAL must exist on the device.
+         If the HIDL composer HAL exists, it must be at least version 2.0.
+         See DeviceManifestTest.GrallocHal -->
     <hal format="hidl" optional="true">
         <name>android.hardware.graphics.allocator</name>
-        <!-- New, non-Go devices should use 4.0 or the AIDL hal. -->
+        <!-- New, non-Go devices should use 4.0 or the AIDL hal.
+             See DeviceManifestTest.GrallocVersionCompatibility. -->
         <version>2.0</version>
         <version>3.0</version>
         <version>4.0</version>