Add composer3 AIDL

This is the initial AIDL interface based on the HIDL interface
[email protected].

Test: Build
Bug: 198690211
Change-Id: I385ea8084f9a33c2b6dd79bb9a376692fec4a399
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index f03008a..331eb5f 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -271,6 +271,14 @@
             <instance>default</instance>
         </interface>
     </hal>
+    <hal format="aidl" optional="true">
+        <name>android.hardware.graphics.composer3</name>
+        <version>1</version>
+        <interface>
+            <name>IComposer</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
     <hal format="hidl" optional="false">
         <name>android.hardware.graphics.mapper</name>
         <!-- New, non-Go devices should use 4.0, tested in vts_treble_vintf_vendor_test -->
diff --git a/graphics/common/aidl/Android.bp b/graphics/common/aidl/Android.bp
index b23d4a7..69ee498 100644
--- a/graphics/common/aidl/Android.bp
+++ b/graphics/common/aidl/Android.bp
@@ -15,7 +15,7 @@
         enabled: true,
         support_system_process: true,
     },
-    vndk_use_version: "2",
+    vndk_use_version: "3",
     srcs: [
         "android/hardware/graphics/common/*.aidl",
     ],
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BlendMode.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BlendMode.aidl
index deafdfa..1c19381 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BlendMode.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BlendMode.aidl
@@ -1,14 +1,30 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BufferUsage.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BufferUsage.aidl
index 58eefc4..b4ef451 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BufferUsage.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/BufferUsage.aidl
@@ -1,14 +1,30 @@
+/*
+ * Copyright 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ChromaSiting.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ChromaSiting.aidl
index 7ca4dfa..7f0d734 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ChromaSiting.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ChromaSiting.aidl
@@ -1,14 +1,30 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ColorTransform.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ColorTransform.aidl
new file mode 100644
index 0000000..255a42f
--- /dev/null
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ColorTransform.aidl
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.common;
+@Backing(type="int") @VintfStability
+enum ColorTransform {
+  IDENTITY = 0,
+  ARBITRARY_MATRIX = 1,
+  VALUE_INVERSE = 2,
+  GRAYSCALE = 3,
+  CORRECT_PROTANOPIA = 4,
+  CORRECT_DEUTERANOPIA = 5,
+  CORRECT_TRITANOPIA = 6,
+}
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Compression.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Compression.aidl
index 06e40a0..5b76376 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Compression.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Compression.aidl
@@ -1,14 +1,30 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Cta861_3.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Cta861_3.aidl
index d4af501..fbe4b2a 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Cta861_3.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Cta861_3.aidl
@@ -1,14 +1,30 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Dataspace.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Dataspace.aidl
index 43d7f84..3d97cff 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Dataspace.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Dataspace.aidl
@@ -1,14 +1,30 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ExtendableType.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ExtendableType.aidl
index 6fcb794..3ada312 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ExtendableType.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/ExtendableType.aidl
@@ -1,14 +1,30 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/FRect.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/FRect.aidl
new file mode 100644
index 0000000..cb8190b
--- /dev/null
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/FRect.aidl
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.common;
+@VintfStability
+parcelable FRect {
+  float left;
+  float top;
+  float right;
+  float bottom;
+}
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HardwareBuffer.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HardwareBuffer.aidl
index 72222e1..4d8f78d 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HardwareBuffer.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HardwareBuffer.aidl
@@ -1,14 +1,30 @@
+/*
+ * Copyright 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HardwareBufferDescription.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HardwareBufferDescription.aidl
index 232e023..4955049 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HardwareBufferDescription.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/HardwareBufferDescription.aidl
@@ -1,14 +1,30 @@
+/*
+ * Copyright 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Hdr.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Hdr.aidl
new file mode 100644
index 0000000..0320a66
--- /dev/null
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Hdr.aidl
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.common;
+@Backing(type="int") @VintfStability
+enum Hdr {
+  DOLBY_VISION = 1,
+  HDR10 = 2,
+  HLG = 3,
+  HDR10_PLUS = 4,
+}
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Interlaced.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Interlaced.aidl
index 26674c9..30b4e03 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Interlaced.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Interlaced.aidl
@@ -1,14 +1,30 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PixelFormat.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PixelFormat.aidl
index e5f0470..04a863b 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PixelFormat.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PixelFormat.aidl
@@ -1,14 +1,30 @@
+/*
+ * Copyright 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayout.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayout.aidl
index 8bca42f..75fac9f 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayout.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayout.aidl
@@ -1,14 +1,30 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayoutComponent.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayoutComponent.aidl
index f5a649c..20c0a0b 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayoutComponent.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayoutComponent.aidl
@@ -1,14 +1,30 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayoutComponentType.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayoutComponentType.aidl
index 7ff8d76..2f7d414 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayoutComponentType.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/PlaneLayoutComponentType.aidl
@@ -1,14 +1,30 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Rect.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Rect.aidl
index e0ba69b..eb42027 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Rect.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Rect.aidl
@@ -1,14 +1,30 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Smpte2086.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Smpte2086.aidl
index 5da36f6..2be31d8 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Smpte2086.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Smpte2086.aidl
@@ -1,14 +1,30 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/StandardMetadataType.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/StandardMetadataType.aidl
index 34b53a2..2027350 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/StandardMetadataType.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/StandardMetadataType.aidl
@@ -1,14 +1,30 @@
+/**
+ * Copyright (c) 2019,libgralloctypes_helper The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Transform.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Transform.aidl
new file mode 100644
index 0000000..5c3d4cb
--- /dev/null
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/Transform.aidl
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.common;
+@Backing(type="int") @VintfStability
+enum Transform {
+  FLIP_H = 1,
+  FLIP_V = 2,
+  ROT_90 = 4,
+  ROT_180 = 3,
+  ROT_270 = 7,
+}
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/XyColor.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/XyColor.aidl
index d96d0ac..b42de18 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/XyColor.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/XyColor.aidl
@@ -1,14 +1,30 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
diff --git a/graphics/common/aidl/android/hardware/graphics/common/ColorTransform.aidl b/graphics/common/aidl/android/hardware/graphics/common/ColorTransform.aidl
new file mode 100644
index 0000000..a8784f5
--- /dev/null
+++ b/graphics/common/aidl/android/hardware/graphics/common/ColorTransform.aidl
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.common;
+
+/**
+ * Color transforms that may be applied by hardware composer to the whole
+ * display.
+ */
+@VintfStability
+@Backing(type="int")
+enum ColorTransform {
+    /** Applies no transform to the output color */
+    IDENTITY = 0,
+
+    /** Applies an arbitrary transform defined by a 4x4 affine matrix */
+    ARBITRARY_MATRIX = 1,
+
+    /**
+     * Applies a transform that inverts the value or luminance of the color, but
+     * does not modify hue or saturation
+     */
+    VALUE_INVERSE = 2,
+
+    /** Applies a transform that maps all colors to shades of gray */
+    GRAYSCALE = 3,
+
+    /** Applies a transform which corrects for protanopic color blindness */
+    CORRECT_PROTANOPIA = 4,
+
+    /** Applies a transform which corrects for deuteranopic color blindness */
+    CORRECT_DEUTERANOPIA = 5,
+
+    /** Applies a transform which corrects for tritanopic color blindness */
+    CORRECT_TRITANOPIA = 6
+}
diff --git a/graphics/common/aidl/android/hardware/graphics/common/FRect.aidl b/graphics/common/aidl/android/hardware/graphics/common/FRect.aidl
new file mode 100644
index 0000000..f9f2b60
--- /dev/null
+++ b/graphics/common/aidl/android/hardware/graphics/common/FRect.aidl
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.common;
+/**
+ * General purpose definition of a rectangle with floating point corners.
+ */
+
+@VintfStability
+parcelable FRect {
+    float left;
+    float top;
+    float right;
+    float bottom;
+}
diff --git a/graphics/common/aidl/android/hardware/graphics/common/Hdr.aidl b/graphics/common/aidl/android/hardware/graphics/common/Hdr.aidl
new file mode 100644
index 0000000..f6d02dd
--- /dev/null
+++ b/graphics/common/aidl/android/hardware/graphics/common/Hdr.aidl
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.common;
+
+/**
+ * Supported HDR formats. Must be kept in sync with equivalents in Display.java.
+ */
+@VintfStability
+@Backing(type="int")
+enum Hdr {
+    /**
+     * Device supports Dolby Vision HDR
+     */
+    DOLBY_VISION = 1,
+    /**
+     * Device supports HDR10
+     */
+    HDR10 = 2,
+    /**
+     * Device supports hybrid log-gamma HDR
+     */
+    HLG = 3,
+    /**
+     * Device supports HDR10+
+     */
+    HDR10_PLUS = 4,
+}
diff --git a/graphics/common/aidl/android/hardware/graphics/common/Transform.aidl b/graphics/common/aidl/android/hardware/graphics/common/Transform.aidl
new file mode 100644
index 0000000..325816c
--- /dev/null
+++ b/graphics/common/aidl/android/hardware/graphics/common/Transform.aidl
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.common;
+
+/**
+ * Transformation definitions
+ */
+@VintfStability
+@Backing(type="int")
+enum Transform {
+    /**
+     * Horizontal flip. FLIP_H/FLIP_V is applied before ROT_90.
+     */
+    FLIP_H = 1 << 0,
+
+    /**
+     * Vertical flip. FLIP_H/FLIP_V is applied before ROT_90.
+     */
+    FLIP_V = 1 << 1,
+
+    /**
+     * 90 degree clockwise rotation. FLIP_H/FLIP_V is applied before ROT_90.
+     */
+    ROT_90 = 1 << 2,
+
+    /**
+     * Commonly used combinations.
+     */
+    ROT_180 = FLIP_H | FLIP_V,
+    ROT_270 = FLIP_H | FLIP_V | ROT_90,
+}
diff --git a/graphics/composer/aidl/Android.bp b/graphics/composer/aidl/Android.bp
new file mode 100644
index 0000000..0065692
--- /dev/null
+++ b/graphics/composer/aidl/Android.bp
@@ -0,0 +1,60 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+aidl_interface {
+    name: "android.hardware.graphics.composer3",
+    host_supported: true,
+    vendor_available: true,
+    vndk: {
+        enabled: true,
+        support_system_process: true,
+    },
+    srcs: ["android/hardware/graphics/composer3/*.aidl"],
+    stability: "vintf",
+    imports: [
+        "android.hardware.graphics.common-V3",
+        "android.hardware.common-V2",
+        "android.hardware.common.fmq-V1",
+    ],
+    backend: {
+        cpp: {
+            enabled: false,
+        },
+        java: {
+            sdk_version: "module_current",
+            enabled: false,
+        },
+        ndk: {
+            vndk: {
+                enabled: true,
+            },
+        },
+    },
+}
+
+cc_library {
+    name: "android.hardware.graphics.composer3-translate-ndk",
+    vendor_available: true,
+    srcs: ["android/hardware/graphics/composer3/translate-ndk.cpp"],
+    shared_libs: [
+        "libbinder_ndk",
+        "libhidlbase",
+        "android.hardware.graphics.composer3-V1-ndk",
+        "[email protected]",
+        "[email protected]",
+    ],
+    export_include_dirs: ["include"],
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/BlendMode.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/BlendMode.aidl
new file mode 100644
index 0000000..a522d53
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/BlendMode.aidl
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum BlendMode {
+  INVALID = 0,
+  NONE = 1,
+  PREMULTIPLIED = 2,
+  COVERAGE = 3,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Capability.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Capability.aidl
new file mode 100644
index 0000000..557b3f8
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Capability.aidl
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum Capability {
+  INVALID = 0,
+  SIDEBAND_STREAM = 1,
+  SKIP_CLIENT_COLOR_TRANSFORM = 2,
+  PRESENT_FENCE_IS_NOT_RELIABLE = 3,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ClientTargetProperty.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ClientTargetProperty.aidl
new file mode 100644
index 0000000..d34d1b0
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ClientTargetProperty.aidl
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable ClientTargetProperty {
+  android.hardware.graphics.common.PixelFormat pixelFormat;
+  android.hardware.graphics.common.Dataspace dataspace;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Color.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Color.aidl
new file mode 100644
index 0000000..7733deb
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Color.aidl
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable Color {
+  byte r;
+  byte g;
+  byte b;
+  byte a;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ColorMode.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ColorMode.aidl
new file mode 100644
index 0000000..53852b6
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ColorMode.aidl
@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum ColorMode {
+  NATIVE = 0,
+  STANDARD_BT601_625 = 1,
+  STANDARD_BT601_625_UNADJUSTED = 2,
+  STANDARD_BT601_525 = 3,
+  STANDARD_BT601_525_UNADJUSTED = 4,
+  STANDARD_BT709 = 5,
+  DCI_P3 = 6,
+  SRGB = 7,
+  ADOBE_RGB = 8,
+  DISPLAY_P3 = 9,
+  BT2020 = 10,
+  BT2100_PQ = 11,
+  BT2100_HLG = 12,
+  DISPLAY_BT2020 = 13,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Command.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Command.aidl
new file mode 100644
index 0000000..3b31149
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Command.aidl
@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum Command {
+  LENGTH_MASK = 65535,
+  OPCODE_SHIFT = 16,
+  OPCODE_MASK = -65536,
+  SELECT_DISPLAY = 0,
+  SELECT_LAYER = 65536,
+  SET_ERROR = 16777216,
+  SET_CHANGED_COMPOSITION_TYPES = 16842752,
+  SET_DISPLAY_REQUESTS = 16908288,
+  SET_PRESENT_FENCE = 16973824,
+  SET_RELEASE_FENCES = 17039360,
+  SET_COLOR_TRANSFORM = 33554432,
+  SET_CLIENT_TARGET = 33619968,
+  SET_OUTPUT_BUFFER = 33685504,
+  VALIDATE_DISPLAY = 33751040,
+  ACCEPT_DISPLAY_CHANGES = 33816576,
+  PRESENT_DISPLAY = 33882112,
+  PRESENT_OR_VALIDATE_DISPLAY = 33947648,
+  SET_LAYER_CURSOR_POSITION = 50331648,
+  SET_LAYER_BUFFER = 50397184,
+  SET_LAYER_SURFACE_DAMAGE = 50462720,
+  SET_LAYER_BLEND_MODE = 67108864,
+  SET_LAYER_COLOR = 67174400,
+  SET_LAYER_COMPOSITION_TYPE = 67239936,
+  SET_LAYER_DATASPACE = 67305472,
+  SET_LAYER_DISPLAY_FRAME = 67371008,
+  SET_LAYER_PLANE_ALPHA = 67436544,
+  SET_LAYER_SIDEBAND_STREAM = 67502080,
+  SET_LAYER_SOURCE_CROP = 67567616,
+  SET_LAYER_TRANSFORM = 67633152,
+  SET_LAYER_VISIBLE_REGION = 67698688,
+  SET_LAYER_Z_ORDER = 67764224,
+  SET_PRESENT_OR_VALIDATE_DISPLAY_RESULT = 67829760,
+  SET_LAYER_PER_FRAME_METADATA = 50528256,
+  SET_LAYER_FLOAT_COLOR = 67895296,
+  SET_LAYER_COLOR_TRANSFORM = 67960832,
+  SET_LAYER_PER_FRAME_METADATA_BLOBS = 50593792,
+  SET_CLIENT_TARGET_PROPERTY = 17104896,
+  SET_LAYER_GENERIC_METADATA = 68026368,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Composition.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Composition.aidl
new file mode 100644
index 0000000..e327e87
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/Composition.aidl
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum Composition {
+  INVALID = 0,
+  CLIENT = 1,
+  DEVICE = 2,
+  SOLID_COLOR = 3,
+  CURSOR = 4,
+  SIDEBAND = 5,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ContentType.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ContentType.aidl
new file mode 100644
index 0000000..d87b767
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ContentType.aidl
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum ContentType {
+  NONE = 0,
+  GRAPHICS = 1,
+  PHOTO = 2,
+  CINEMA = 3,
+  GAME = 4,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayAttribute.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayAttribute.aidl
new file mode 100644
index 0000000..8454c40
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayAttribute.aidl
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum DisplayAttribute {
+  INVALID = 0,
+  WIDTH = 1,
+  HEIGHT = 2,
+  VSYNC_PERIOD = 3,
+  DPI_X = 4,
+  DPI_Y = 5,
+  CONFIG_GROUP = 7,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl
new file mode 100644
index 0000000..0bcd870
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum DisplayCapability {
+  INVALID = 0,
+  SKIP_CLIENT_COLOR_TRANSFORM = 1,
+  DOZE = 2,
+  BRIGHTNESS = 3,
+  PROTECTED_CONTENTS = 4,
+  AUTO_LOW_LATENCY_MODE = 5,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayConnectionType.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayConnectionType.aidl
new file mode 100644
index 0000000..640f82a
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayConnectionType.aidl
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum DisplayConnectionType {
+  INTERNAL = 0,
+  EXTERNAL = 1,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayContentSample.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayContentSample.aidl
new file mode 100644
index 0000000..c624536
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayContentSample.aidl
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable DisplayContentSample {
+  long frameCount;
+  long[] sampleComponent0;
+  long[] sampleComponent1;
+  long[] sampleComponent2;
+  long[] sampleComponent3;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayContentSamplingAttributes.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayContentSamplingAttributes.aidl
new file mode 100644
index 0000000..7c6542f
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayContentSamplingAttributes.aidl
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable DisplayContentSamplingAttributes {
+  android.hardware.graphics.common.PixelFormat format;
+  android.hardware.graphics.common.Dataspace dataspace;
+  android.hardware.graphics.composer3.FormatColorComponent componentMask;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayIdentification.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayIdentification.aidl
new file mode 100644
index 0000000..a0cc9b0
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayIdentification.aidl
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable DisplayIdentification {
+  byte port;
+  byte[] data;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayRequest.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayRequest.aidl
new file mode 100644
index 0000000..26e7d97
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayRequest.aidl
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum DisplayRequest {
+  FLIP_CLIENT_TARGET = 1,
+  WRITE_CLIENT_TARGET_TO_OUTPUT = 2,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ExecuteCommandsStatus.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ExecuteCommandsStatus.aidl
new file mode 100644
index 0000000..41a1afe
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ExecuteCommandsStatus.aidl
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable ExecuteCommandsStatus {
+  boolean queueChanged;
+  int length;
+  android.hardware.common.NativeHandle[] handles;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/FloatColor.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/FloatColor.aidl
new file mode 100644
index 0000000..faadf57
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/FloatColor.aidl
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable FloatColor {
+  float r;
+  float g;
+  float b;
+  float a;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/FormatColorComponent.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/FormatColorComponent.aidl
new file mode 100644
index 0000000..4b737de
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/FormatColorComponent.aidl
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="byte") @VintfStability
+enum FormatColorComponent {
+  FORMAT_COMPONENT_0 = 1,
+  FORMAT_COMPONENT_1 = 2,
+  FORMAT_COMPONENT_2 = 4,
+  FORMAT_COMPONENT_3 = 8,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/HandleIndex.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/HandleIndex.aidl
new file mode 100644
index 0000000..b87870d
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/HandleIndex.aidl
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum HandleIndex {
+  EMPTY = -1,
+  CACHED = -2,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/HdrCapabilities.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/HdrCapabilities.aidl
new file mode 100644
index 0000000..80141d3
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/HdrCapabilities.aidl
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable HdrCapabilities {
+  android.hardware.graphics.common.Hdr[] types;
+  float maxLuminance;
+  float maxAverageLuminance;
+  float minLuminance;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposer.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposer.aidl
new file mode 100644
index 0000000..9abc608
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposer.aidl
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+interface IComposer {
+  android.hardware.graphics.composer3.IComposerClient createClient();
+  String dumpDebugInfo();
+  android.hardware.graphics.composer3.Capability[] getCapabilities();
+  const int EX_NO_RESOURCES = 6;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerCallback.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerCallback.aidl
new file mode 100644
index 0000000..f82d02e
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerCallback.aidl
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+interface IComposerCallback {
+  void onHotplug(long display, boolean connected);
+  oneway void onRefresh(long display);
+  oneway void onSeamlessPossible(long display);
+  oneway void onVsync(long display, long timestamp, int vsyncPeriodNanos);
+  oneway void onVsyncPeriodTimingChanged(long display, in android.hardware.graphics.composer3.VsyncPeriodChangeTimeline updatedTimeline);
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
new file mode 100644
index 0000000..531fd14
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -0,0 +1,89 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+interface IComposerClient {
+  long createLayer(long display, int bufferSlotCount);
+  android.hardware.graphics.composer3.VirtualDisplay createVirtualDisplay(int width, int height, android.hardware.graphics.common.PixelFormat formatHint, int outputBufferSlotCount);
+  void destroyLayer(long display, long layer);
+  void destroyVirtualDisplay(long display);
+  android.hardware.graphics.composer3.ExecuteCommandsStatus executeCommands(int inLength, in android.hardware.common.NativeHandle[] inHandles);
+  int getActiveConfig(long display);
+  void getClientTargetSupport(long display, int width, int height, android.hardware.graphics.common.PixelFormat format, android.hardware.graphics.common.Dataspace dataspace);
+  android.hardware.graphics.composer3.ColorMode[] getColorModes(long display);
+  float[] getDataspaceSaturationMatrix(android.hardware.graphics.common.Dataspace dataspace);
+  int getDisplayAttribute(long display, int config, android.hardware.graphics.composer3.DisplayAttribute attribute);
+  boolean getDisplayBrightnessSupport(long display);
+  android.hardware.graphics.composer3.DisplayCapability[] getDisplayCapabilities(long display);
+  int[] getDisplayConfigs(long display);
+  android.hardware.graphics.composer3.DisplayConnectionType getDisplayConnectionType(long display);
+  android.hardware.graphics.composer3.DisplayIdentification getDisplayIdentificationData(long display);
+  String getDisplayName(long display);
+  int getDisplayVsyncPeriod(long display);
+  android.hardware.graphics.composer3.DisplayContentSample getDisplayedContentSample(long display, long maxFrames, long timestamp);
+  android.hardware.graphics.composer3.DisplayContentSamplingAttributes getDisplayedContentSamplingAttributes(long display);
+  boolean getDozeSupport(long display);
+  android.hardware.graphics.composer3.HdrCapabilities getHdrCapabilities(long display);
+  android.hardware.graphics.composer3.LayerGenericMetadataKey[] getLayerGenericMetadataKeys();
+  int getMaxVirtualDisplayCount();
+  android.hardware.common.fmq.MQDescriptor<int,android.hardware.common.fmq.SynchronizedReadWrite> getOutputCommandQueue();
+  android.hardware.graphics.composer3.PerFrameMetadataKey[] getPerFrameMetadataKeys(long display);
+  android.hardware.graphics.composer3.ReadbackBufferAttributes getReadbackBufferAttributes(long display);
+  ParcelFileDescriptor getReadbackBufferFence(long display);
+  android.hardware.graphics.composer3.RenderIntent[] getRenderIntents(long display, android.hardware.graphics.composer3.ColorMode mode);
+  android.hardware.graphics.composer3.ContentType[] getSupportedContentTypes(long display);
+  void registerCallback(in android.hardware.graphics.composer3.IComposerCallback callback);
+  void setActiveConfig(long display, int config);
+  android.hardware.graphics.composer3.VsyncPeriodChangeTimeline setActiveConfigWithConstraints(long display, int config, in android.hardware.graphics.composer3.VsyncPeriodChangeConstraints vsyncPeriodChangeConstraints);
+  void setAutoLowLatencyMode(long display, boolean on);
+  void setClientTargetSlotCount(long display, int clientTargetSlotCount);
+  void setColorMode(long display, android.hardware.graphics.composer3.ColorMode mode, android.hardware.graphics.composer3.RenderIntent intent);
+  void setContentType(long display, android.hardware.graphics.composer3.ContentType type);
+  void setDisplayBrightness(long display, float brightness);
+  void setDisplayedContentSamplingEnabled(long display, boolean enable, android.hardware.graphics.composer3.FormatColorComponent componentMask, long maxFrames);
+  void setInputCommandQueue(in android.hardware.common.fmq.MQDescriptor<int,android.hardware.common.fmq.SynchronizedReadWrite> descriptor);
+  void setPowerMode(long display, android.hardware.graphics.composer3.PowerMode mode);
+  void setReadbackBuffer(long display, in android.hardware.common.NativeHandle buffer, in ParcelFileDescriptor releaseFence);
+  void setVsyncEnabled(long display, boolean enabled);
+  const int EX_BAD_CONFIG = 1;
+  const int EX_BAD_DISPLAY = 2;
+  const int EX_BAD_LAYER = 3;
+  const int EX_BAD_PARAMETER = 4;
+  const int EX_RESERVED = 5;
+  const int EX_NO_RESOURCES = 6;
+  const int EX_NOT_VALIDATED = 7;
+  const int EX_UNSUPPORTED = 8;
+  const int EX_SEAMLESS_NOT_ALLOWED = 9;
+  const int EX_SEAMLESS_NOT_POSSIBLE = 10;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LayerGenericMetadataKey.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LayerGenericMetadataKey.aidl
new file mode 100644
index 0000000..73385d4
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LayerGenericMetadataKey.aidl
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable LayerGenericMetadataKey {
+  String name;
+  boolean mandatory;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LayerRequest.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LayerRequest.aidl
new file mode 100644
index 0000000..cfafc50
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LayerRequest.aidl
@@ -0,0 +1,38 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum LayerRequest {
+  CLEAR_CLIENT_TARGET = 1,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PerFrameMetadata.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PerFrameMetadata.aidl
new file mode 100644
index 0000000..cd1f351
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PerFrameMetadata.aidl
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable PerFrameMetadata {
+  android.hardware.graphics.composer3.PerFrameMetadataKey key;
+  float value;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PerFrameMetadataBlob.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PerFrameMetadataBlob.aidl
new file mode 100644
index 0000000..c1e74d9
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PerFrameMetadataBlob.aidl
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable PerFrameMetadataBlob {
+  android.hardware.graphics.composer3.PerFrameMetadataKey key;
+  byte[] blob;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PerFrameMetadataKey.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PerFrameMetadataKey.aidl
new file mode 100644
index 0000000..8722f87
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PerFrameMetadataKey.aidl
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum PerFrameMetadataKey {
+  DISPLAY_RED_PRIMARY_X = 0,
+  DISPLAY_RED_PRIMARY_Y = 1,
+  DISPLAY_GREEN_PRIMARY_X = 2,
+  DISPLAY_GREEN_PRIMARY_Y = 3,
+  DISPLAY_BLUE_PRIMARY_X = 4,
+  DISPLAY_BLUE_PRIMARY_Y = 5,
+  WHITE_POINT_X = 6,
+  WHITE_POINT_Y = 7,
+  MAX_LUMINANCE = 8,
+  MIN_LUMINANCE = 9,
+  MAX_CONTENT_LIGHT_LEVEL = 10,
+  MAX_FRAME_AVERAGE_LIGHT_LEVEL = 11,
+  HDR10_PLUS_SEI = 12,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PowerMode.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PowerMode.aidl
new file mode 100644
index 0000000..f587d4d
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/PowerMode.aidl
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum PowerMode {
+  OFF = 0,
+  DOZE = 1,
+  DOZE_SUSPEND = 3,
+  ON = 2,
+  ON_SUSPEND = 4,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ReadbackBufferAttributes.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ReadbackBufferAttributes.aidl
new file mode 100644
index 0000000..bb51bdc
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/ReadbackBufferAttributes.aidl
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable ReadbackBufferAttributes {
+  android.hardware.graphics.common.PixelFormat format;
+  android.hardware.graphics.common.Dataspace dataspace;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/RenderIntent.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/RenderIntent.aidl
new file mode 100644
index 0000000..5670c10
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/RenderIntent.aidl
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@Backing(type="int") @VintfStability
+enum RenderIntent {
+  COLORIMETRIC = 0,
+  ENHANCE = 1,
+  TONE_MAP_COLORIMETRIC = 2,
+  TONE_MAP_ENHANCE = 3,
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/VirtualDisplay.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/VirtualDisplay.aidl
new file mode 100644
index 0000000..886be2e
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/VirtualDisplay.aidl
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable VirtualDisplay {
+  long display;
+  android.hardware.graphics.common.PixelFormat format;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/VsyncPeriodChangeConstraints.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/VsyncPeriodChangeConstraints.aidl
new file mode 100644
index 0000000..df38c11
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/VsyncPeriodChangeConstraints.aidl
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable VsyncPeriodChangeConstraints {
+  long desiredTimeNanos;
+  boolean seamlessRequired;
+}
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/VsyncPeriodChangeTimeline.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/VsyncPeriodChangeTimeline.aidl
new file mode 100644
index 0000000..9fb3999
--- /dev/null
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/VsyncPeriodChangeTimeline.aidl
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.graphics.composer3;
+@VintfStability
+parcelable VsyncPeriodChangeTimeline {
+  long newVsyncAppliedTimeNanos;
+  boolean refreshRequired;
+  long refreshTimeNanos;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/BlendMode.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/BlendMode.aidl
new file mode 100644
index 0000000..c6fd063
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/BlendMode.aidl
@@ -0,0 +1,38 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * Blend modes, settable per layer.
+ */
+@VintfStability
+@Backing(type="int")
+enum BlendMode {
+    INVALID = 0,
+    /**
+     * colorOut = colorSrc
+     */
+    NONE = 1,
+    /**
+     * colorOut = colorSrc + colorDst * (1 - alphaSrc)
+     */
+    PREMULTIPLIED = 2,
+    /**
+     * colorOut = colorSrc * alphaSrc + colorDst * (1 - alphaSrc)
+     */
+    COVERAGE = 3,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/Capability.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/Capability.aidl
new file mode 100644
index 0000000..028b6f5
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/Capability.aidl
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * Optional capabilities which may be supported by some devices. The
+ * particular set of supported capabilities for a given device may be
+ * retrieved using getCapabilities.
+ */
+@VintfStability
+@Backing(type="int")
+enum Capability {
+    INVALID = 0,
+    /**
+     * Specifies that the device supports sideband stream layers, for
+     * which buffer content updates and other synchronization will not be
+     * provided through the usual validate/present cycle and must be
+     * handled by an external implementation-defined mechanism. Only
+     * changes to layer state (such as position, size, etc.) need to be
+     * performed through the validate/present cycle.
+     */
+    SIDEBAND_STREAM = 1,
+    /**
+     * Specifies that the device will apply a color transform even when
+     * either the client or the device has chosen that all layers should
+     * be composed by the client. This will prevent the client from
+     * applying the color transform during its composition step.
+     */
+    SKIP_CLIENT_COLOR_TRANSFORM = 2,
+    /**
+     * Specifies that the present fence must not be used as an accurate
+     * representation of the actual present time of a frame.
+     */
+    PRESENT_FENCE_IS_NOT_RELIABLE = 3,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/ClientTargetProperty.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ClientTargetProperty.aidl
new file mode 100644
index 0000000..b4d5887
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ClientTargetProperty.aidl
@@ -0,0 +1,23 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+@VintfStability
+parcelable ClientTargetProperty {
+    android.hardware.graphics.common.PixelFormat pixelFormat;
+    android.hardware.graphics.common.Dataspace dataspace;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/Color.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/Color.aidl
new file mode 100644
index 0000000..979f677
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/Color.aidl
@@ -0,0 +1,25 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+@VintfStability
+parcelable Color {
+    byte r;
+    byte g;
+    byte b;
+    byte a;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/ColorMode.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ColorMode.aidl
new file mode 100644
index 0000000..c13d207
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ColorMode.aidl
@@ -0,0 +1,283 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+@VintfStability
+@Backing(type="int")
+enum ColorMode {
+    /**
+     * DEFAULT is the "native" gamut of the display.
+     * White Point: Vendor/OEM defined
+     * Panel Gamma: Vendor/OEM defined (typically 2.2)
+     * Rendering Intent: Vendor/OEM defined (typically 'enhanced')
+     */
+    NATIVE = 0,
+    /**
+     * STANDARD_BT601_625 corresponds with display
+     * settings that implement the ITU-R Recommendation BT.601
+     * or Rec 601. Using 625 line version
+     * Rendering Intent: Colorimetric
+     * Primaries:
+     *                  x       y
+     *  green           0.290   0.600
+     *  blue            0.150   0.060
+     *  red             0.640   0.330
+     *  white (D65)     0.3127  0.3290
+     *
+     *  KR = 0.299, KB = 0.114. This adjusts the luminance interpretation
+     *  for RGB conversion from the one purely determined by the primaries
+     *  to minimize the color shift into RGB space that uses BT.709
+     *  primaries.
+     *
+     * Gamma Correction (GC):
+     *
+     *  if Vlinear < 0.018
+     *    Vnonlinear = 4.500 * Vlinear
+     *  else
+     *    Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099
+     */
+    STANDARD_BT601_625 = 1,
+    /**
+     * Primaries:
+     *                  x       y
+     *  green           0.290   0.600
+     *  blue            0.150   0.060
+     *  red             0.640   0.330
+     *  white (D65)     0.3127  0.3290
+     *
+     *  Use the unadjusted KR = 0.222, KB = 0.071 luminance interpretation
+     *  for RGB conversion.
+     *
+     * Gamma Correction (GC):
+     *
+     *  if Vlinear < 0.018
+     *    Vnonlinear = 4.500 * Vlinear
+     *  else
+     *    Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099
+     */
+    STANDARD_BT601_625_UNADJUSTED = 2,
+    /**
+     * Primaries:
+     *                  x       y
+     *  green           0.310   0.595
+     *  blue            0.155   0.070
+     *  red             0.630   0.340
+     *  white (D65)     0.3127  0.3290
+     *
+     *  KR = 0.299, KB = 0.114. This adjusts the luminance interpretation
+     *  for RGB conversion from the one purely determined by the primaries
+     *  to minimize the color shift into RGB space that uses BT.709
+     *  primaries.
+     *
+     * Gamma Correction (GC):
+     *
+     *  if Vlinear < 0.018
+     *    Vnonlinear = 4.500 * Vlinear
+     *  else
+     *    Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099
+     */
+    STANDARD_BT601_525 = 3,
+    /**
+     * Primaries:
+     *                  x       y
+     *  green           0.310   0.595
+     *  blue            0.155   0.070
+     *  red             0.630   0.340
+     *  white (D65)     0.3127  0.3290
+     *
+     *  Use the unadjusted KR = 0.212, KB = 0.087 luminance interpretation
+     *  for RGB conversion (as in SMPTE 240M).
+     *
+     * Gamma Correction (GC):
+     *
+     *  if Vlinear < 0.018
+     *    Vnonlinear = 4.500 * Vlinear
+     *  else
+     *    Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099
+     */
+    STANDARD_BT601_525_UNADJUSTED = 4,
+    /**
+     * REC709 corresponds with display settings that implement
+     * the ITU-R Recommendation BT.709 / Rec. 709 for high-definition television.
+     * Rendering Intent: Colorimetric
+     * Primaries:
+     *                  x       y
+     *  green           0.300   0.600
+     *  blue            0.150   0.060
+     *  red             0.640   0.330
+     *  white (D65)     0.3127  0.3290
+     *
+     * HDTV REC709 Inverse Gamma Correction (IGC): V represents normalized
+     * (with [0 to 1] range) value of R, G, or B.
+     *
+     *  if Vnonlinear < 0.081
+     *    Vlinear = Vnonlinear / 4.5
+     *  else
+     *    Vlinear = ((Vnonlinear + 0.099) / 1.099) ^ (1/0.45)
+     *
+     * HDTV REC709 Gamma Correction (GC):
+     *
+     *  if Vlinear < 0.018
+     *    Vnonlinear = 4.5 * Vlinear
+     *  else
+     *    Vnonlinear = 1.099 * (Vlinear) ^ 0.45 – 0.099
+     */
+    STANDARD_BT709 = 5,
+    /**
+     * DCI_P3 corresponds with display settings that implement
+     * SMPTE EG 432-1 and SMPTE RP 431-2
+     * Rendering Intent: Colorimetric
+     * Primaries:
+     *                  x       y
+     *  green           0.265   0.690
+     *  blue            0.150   0.060
+     *  red             0.680   0.320
+     *  white (D65)     0.3127  0.3290
+     *
+     * Gamma: 2.6
+     */
+    DCI_P3 = 6,
+    /**
+     * SRGB corresponds with display settings that implement
+     * the sRGB color space. Uses the same primaries as ITU-R Recommendation
+     * BT.709
+     * Rendering Intent: Colorimetric
+     * Primaries:
+     *                  x       y
+     *  green           0.300   0.600
+     *  blue            0.150   0.060
+     *  red             0.640   0.330
+     *  white (D65)     0.3127  0.3290
+     *
+     * PC/Internet (sRGB) Inverse Gamma Correction (IGC):
+     *
+     *  if Vnonlinear ≤ 0.03928
+     *    Vlinear = Vnonlinear / 12.92
+     *  else
+     *    Vlinear = ((Vnonlinear + 0.055)/1.055) ^ 2.4
+     *
+     * PC/Internet (sRGB) Gamma Correction (GC):
+     *
+     *  if Vlinear ≤ 0.0031308
+     *    Vnonlinear = 12.92 * Vlinear
+     *  else
+     *    Vnonlinear = 1.055 * (Vlinear)^(1/2.4) – 0.055
+     */
+    SRGB = 7,
+    /**
+     * ADOBE_RGB corresponds with the RGB color space developed
+     * by Adobe Systems, Inc. in 1998.
+     * Rendering Intent: Colorimetric
+     * Primaries:
+     *                  x       y
+     *  green           0.210   0.710
+     *  blue            0.150   0.060
+     *  red             0.640   0.330
+     *  white (D65)     0.3127  0.3290
+     *
+     * Gamma: 2.2
+     */
+    ADOBE_RGB = 8,
+    /**
+     * DISPLAY_P3 is a color space that uses the DCI_P3 primaries,
+     * the D65 white point and the SRGB transfer functions.
+     * Rendering Intent: Colorimetric
+     * Primaries:
+     *                  x       y
+     *  green           0.265   0.690
+     *  blue            0.150   0.060
+     *  red             0.680   0.320
+     *  white (D65)     0.3127  0.3290
+     *
+     * PC/Internet (sRGB) Gamma Correction (GC):
+     *
+     *  if Vlinear ≤ 0.0030186
+     *    Vnonlinear = 12.92 * Vlinear
+     *  else
+     *    Vnonlinear = 1.055 * (Vlinear)^(1/2.4) – 0.055
+     *
+     * Note: In most cases sRGB transfer function will be fine.
+     */
+    DISPLAY_P3 = 9,
+    /**
+     * BT2020 corresponds with display settings that implement the ITU-R
+     * Recommendation BT.2020 / Rec. 2020 for UHDTV.
+     *
+     * Primaries:
+     *                  x       y
+     *  green           0.170   0.797
+     *  blue            0.131   0.046
+     *  red             0.708   0.292
+     *  white (D65)     0.3127  0.3290
+     *
+     * Inverse Gamma Correction (IGC): V represents normalized (with [0 to 1]
+     * range) value of R, G, or B.
+     *
+     *  if Vnonlinear < b * 4.5
+     *    Vlinear = Vnonlinear / 4.5
+     *  else
+     *    Vlinear = ((Vnonlinear + (a - 1)) / a) ^ (1/0.45)
+     *
+     * Gamma Correction (GC):
+     *
+     *  if Vlinear < b
+     *    Vnonlinear = 4.5 * Vlinear
+     *  else
+     *    Vnonlinear = a * Vlinear ^ 0.45 - (a - 1)
+     *
+     * where
+     *
+     *   a = 1.09929682680944, b = 0.018053968510807
+     *
+     * For practical purposes, these a/b values can be used instead
+     *
+     *   a = 1.099, b = 0.018 for 10-bit display systems
+     *   a = 1.0993, b = 0.0181 for 12-bit display systems
+     */
+    BT2020 = 10,
+    /**
+     * BT2100_PQ and BT2100_HLG correspond with display settings that
+     * implement the ITU-R Recommendation BT.2100 / Rec. 2100 for HDR TV.
+     *
+     * Primaries:
+     *                  x       y
+     *  green           0.170   0.797
+     *  blue            0.131   0.046
+     *  red             0.708   0.292
+     *  white (D65)     0.3127  0.3290
+     *
+     * For BT2100_PQ, the transfer function is Perceptual Quantizer (PQ). For
+     * BT2100_HLG, the transfer function is Hybrid Log-Gamma (HLG).
+     */
+    BT2100_PQ = 11,
+    BT2100_HLG = 12,
+    /**
+     * DISPLAY_BT2020 corresponds with display settings that implement the ITU-R
+     * Recommendation BT.2020 / Rec. 2020 for UHDTV, but specifies an SRGB
+     * transfer function.
+     *
+     * Primaries:
+     *                  x       y
+     *  green           0.170   0.797
+     *  blue            0.131   0.046
+     *  red             0.708   0.292
+     *  white (D65)     0.3127  0.3290
+     *
+     * Transfer Function is sRGB
+     */
+    DISPLAY_BT2020 = 13,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/Command.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/Command.aidl
new file mode 100644
index 0000000..5f987d0
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/Command.aidl
@@ -0,0 +1,741 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+import android.hardware.graphics.composer3.Command;
+
+/**
+ * The command interface allows composer3 to reduce binder overhead by sending
+ * atomic command stream in a command message queue. These commands are usually
+ * sent on a per frame basic and contains the information that describes how the
+ * display is composited. @see IComposerClient.executeCommands.
+ */
+@VintfStability
+@Backing(type="int")
+enum Command {
+    LENGTH_MASK = 0xffff,
+    OPCODE_SHIFT = 16,
+    OPCODE_MASK = 0xffff << OPCODE_SHIFT,
+
+    // special commands
+
+    /**
+     * SELECT_DISPLAY has this pseudo prototype
+     *
+     *   selectDisplay(long display);
+     *
+     * Selects the current display implied by all other commands.
+     *
+     * @param display is the newly selected display.
+     */
+    SELECT_DISPLAY = 0x000 << OPCODE_SHIFT,
+
+    /**
+     * SELECT_LAYER has this pseudo prototype
+     *
+     *   selectLayer(long layer);
+     *
+     * Selects the current layer implied by all implicit layer commands.
+     *
+     * @param layer is the newly selected layer.
+     */
+    SELECT_LAYER = 0x001 << OPCODE_SHIFT,
+
+    // value commands (for return values)
+
+    /**
+     * SET_ERROR has this pseudo prototype
+     *
+     *   setError(uint32_t location, int error);
+     *
+     * Indicates an error generated by a command.
+     *
+     * @param location is the offset of the command in the input command
+     *        message queue.
+     * @param error is the error generated by the command.
+     */
+    SET_ERROR = 0x100 << OPCODE_SHIFT,
+
+    /**
+     * SET_CHANGED_COMPOSITION_TYPES has this pseudo prototype
+     *
+     *   setChangedCompositionTypes(long[] layers,
+     *                              Composition[] types);
+     *
+     * Sets the layers for which the device requires a different composition
+     * type than had been set prior to the last call to VALIDATE_DISPLAY. The
+     * client must either update its state with these types and call
+     * ACCEPT_DISPLAY_CHANGES, or must set new types and attempt to validate
+     * the display again.
+     *
+     * @param layers is an array of layer handles.
+     * @param types is an array of composition types, each corresponding to
+     *         an element of layers.
+     */
+    SET_CHANGED_COMPOSITION_TYPES = 0x101 << OPCODE_SHIFT,
+
+    /**
+     * SET_DISPLAY_REQUESTS has this pseudo prototype
+     *
+     *   setDisplayRequests(int displayRequestMask,
+     *                      long[] layers,
+     *                      int[] layerRequestMasks);
+     *
+     * Sets the display requests and the layer requests required for the last
+     * validated configuration.
+     *
+     * Display requests provide information about how the client must handle
+     * the client target. Layer requests provide information about how the
+     * client must handle an individual layer.
+     *
+     * @param displayRequestMask is the display requests for the current
+     *        validated state.
+     * @param layers is an array of layers which all have at least one
+     *        request.
+     * @param layerRequestMasks is the requests corresponding to each element
+     *        of layers.
+     */
+    SET_DISPLAY_REQUESTS = 0x102 << OPCODE_SHIFT,
+
+    /**
+     * SET_PRESENT_FENCE has this pseudo prototype
+     *
+     *   setPresentFence(int presentFenceIndex);
+     *
+     * Sets the present fence as a result of PRESENT_DISPLAY. For physical
+     * displays, this fence must be signaled at the vsync when the result
+     * of composition of this frame starts to appear (for video-mode panels)
+     * or starts to transfer to panel memory (for command-mode panels). For
+     * virtual displays, this fence must be signaled when writes to the output
+     * buffer have completed and it is safe to read from it.
+     *
+     * @param presentFenceIndex is an index into outHandles array.
+     */
+    SET_PRESENT_FENCE = 0x103 << OPCODE_SHIFT,
+
+    /**
+     * SET_RELEASE_FENCES has this pseudo prototype
+     *
+     *   setReleaseFences(long[] layers,
+     *                    int[] releaseFenceIndices);
+     *
+     * Sets the release fences for device layers on this display which will
+     * receive new buffer contents this frame.
+     *
+     * A release fence is a file descriptor referring to a sync fence object
+     * which must be signaled after the device has finished reading from the
+     * buffer presented in the prior frame. This indicates that it is safe to
+     * start writing to the buffer again. If a given layer's fence is not
+     * returned from this function, it must be assumed that the buffer
+     * presented on the previous frame is ready to be written.
+     *
+     * The fences returned by this function must be unique for each layer
+     * (even if they point to the same underlying sync object).
+     *
+     * @param layers is an array of layer handles.
+     * @param releaseFenceIndices are indices into outHandles array, each
+     *        corresponding to an element of layers.
+     */
+    SET_RELEASE_FENCES = 0x104 << OPCODE_SHIFT,
+
+    // display commands
+
+    /**
+     * SET_COLOR_TRANSFORM has this pseudo prototype
+     *
+     *   setColorTransform(float[16] matrix,
+     *                     ColorTransform hint);
+     *
+     * Sets a color transform which will be applied after composition.
+     *
+     * If hint is not ColorTransform::ARBITRARY, then the device may use the
+     * hint to apply the desired color transform instead of using the color
+     * matrix directly.
+     *
+     * If the device is not capable of either using the hint or the matrix to
+     * apply the desired color transform, it must force all layers to client
+     * composition during VALIDATE_DISPLAY.
+     *
+     * If IComposer::Capability::SKIP_CLIENT_COLOR_TRANSFORM is present, then
+     * the client must never apply the color transform during client
+     * composition, even if all layers are being composed by the client.
+     *
+     * The matrix provided is an affine color transformation of the following
+     * form:
+     *
+     * |r.r r.g r.b 0|
+     * |g.r g.g g.b 0|
+     * |b.r b.g b.b 0|
+     * |Tr  Tg  Tb  1|
+     *
+     * This matrix must be provided in row-major form:
+     *
+     * {r.r, r.g, r.b, 0, g.r, ...}.
+     *
+     * Given a matrix of this form and an input color [R_in, G_in, B_in], the
+     * output color [R_out, G_out, B_out] will be:
+     *
+     * R_out = R_in * r.r + G_in * g.r + B_in * b.r + Tr
+     * G_out = R_in * r.g + G_in * g.g + B_in * b.g + Tg
+     * B_out = R_in * r.b + G_in * g.b + B_in * b.b + Tb
+     *
+     * @param matrix is a 4x4 transform matrix (16 floats) as described above.
+     * @param hint is a hint value which may be used instead of the given
+     *        matrix unless it is ColorTransform::ARBITRARY.
+     */
+    SET_COLOR_TRANSFORM = 0x200 << OPCODE_SHIFT,
+
+    /**
+     * SET_CLIENT_TARGET has this pseudo prototype
+     *
+     *   setClientTarget(int targetSlot,
+     *                   int targetIndex,
+     *                   int acquireFenceIndex,
+     *                   android.hardware.graphics.common.Dataspace dataspace,
+     *                   Rect[] damage);
+     *
+     * Sets the buffer handle which will receive the output of client
+     * composition.  Layers marked as Composition::CLIENT must be composited
+     * into this buffer prior to the call to PRESENT_DISPLAY, and layers not
+     * marked as Composition::CLIENT must be composited with this buffer by
+     * the device.
+     *
+     * The buffer handle provided may be empty if no layers are being
+     * composited by the client. This must not result in an error (unless an
+     * invalid display handle is also provided).
+     *
+     * Also provides a file descriptor referring to an acquire sync fence
+     * object, which must be signaled when it is safe to read from the client
+     * target buffer.  If it is already safe to read from this buffer, an
+     * empty handle may be passed instead.
+     *
+     * For more about dataspaces, see SET_LAYER_DATASPACE.
+     *
+     * The damage parameter describes a surface damage region as defined in
+     * the description of SET_LAYER_SURFACE_DAMAGE.
+     *
+     * Will be called before PRESENT_DISPLAY if any of the layers are marked
+     * as Composition::CLIENT. If no layers are so marked, then it is not
+     * necessary to call this function. It is not necessary to call
+     * validateDisplay after changing the target through this function.
+     *
+     * @param targetSlot is the client target buffer slot to use.
+     * @param targetIndex is an index into inHandles for the new target
+     *        buffer.
+     * @param acquireFenceIndex is an index into inHandles for a sync fence
+     *        file descriptor as described above.
+     * @param dataspace is the dataspace of the buffer, as described in
+     *        setLayerDataspace.
+     * @param damage is the surface damage region.
+     *
+     */
+    SET_CLIENT_TARGET = 0x201 << OPCODE_SHIFT,
+
+    /**
+     * SET_OUTPUT_BUFFER has this pseudo prototype
+     *
+     *   setOutputBuffer(int bufferSlot,
+     *                   int bufferIndex,
+     *                   int releaseFenceIndex);
+     *
+     * Sets the output buffer for a virtual display. That is, the buffer to
+     * which the composition result will be written.
+     *
+     * Also provides a file descriptor referring to a release sync fence
+     * object, which must be signaled when it is safe to write to the output
+     * buffer. If it is already safe to write to the output buffer, an empty
+     * handle may be passed instead.
+     *
+     * Must be called at least once before PRESENT_DISPLAY, but does not have
+     * any interaction with layer state or display validation.
+     *
+     * @param bufferSlot is the new output buffer.
+     * @param bufferIndex is the new output buffer.
+     * @param releaseFenceIndex is a sync fence file descriptor as described
+     *        above.
+     */
+    SET_OUTPUT_BUFFER = 0x202 << OPCODE_SHIFT,
+
+    /**
+     * VALIDATE_DISPLAY has this pseudo prototype
+     *
+     *   validateDisplay();
+     *
+     * Instructs the device to inspect all of the layer state and determine if
+     * there are any composition type changes necessary before presenting the
+     * display. Permitted changes are described in the definition of
+     * Composition above.
+     */
+    VALIDATE_DISPLAY = 0x203 << OPCODE_SHIFT,
+
+    /**
+     * ACCEPT_DISPLAY_CHANGES has this pseudo prototype
+     *
+     *   acceptDisplayChanges();
+     *
+     * Accepts the changes required by the device from the previous
+     * validateDisplay call (which may be queried using
+     * getChangedCompositionTypes) and revalidates the display. This function
+     * is equivalent to requesting the changed types from
+     * getChangedCompositionTypes, setting those types on the corresponding
+     * layers, and then calling validateDisplay again.
+     *
+     * After this call it must be valid to present this display. Calling this
+     * after validateDisplay returns 0 changes must succeed with NONE, but
+     * must have no other effect.
+     */
+    ACCEPT_DISPLAY_CHANGES = 0x204 << OPCODE_SHIFT,
+
+    /**
+     * PRESENT_DISPLAY has this pseudo prototype
+     *
+     *   presentDisplay();
+     *
+     * Presents the current display contents on the screen (or in the case of
+     * virtual displays, into the output buffer).
+     *
+     * Prior to calling this function, the display must be successfully
+     * validated with validateDisplay. Note that setLayerBuffer and
+     * setLayerSurfaceDamage specifically do not count as layer state, so if
+     * there are no other changes to the layer state (or to the buffer's
+     * properties as described in setLayerBuffer), then it is safe to call
+     * this function without first validating the display.
+     */
+    PRESENT_DISPLAY = 0x205 << OPCODE_SHIFT,
+
+    /**
+     * PRESENT_OR_VALIDATE_DISPLAY has this pseudo prototype
+     *
+     *   presentOrValidateDisplay();
+     *
+     * Presents the current display contents on the screen (or in the case of
+     * virtual displays, into the output buffer) if validate can be skipped,
+     * or perform a VALIDATE_DISPLAY action instead.
+     */
+    PRESENT_OR_VALIDATE_DISPLAY = 0x206 << OPCODE_SHIFT,
+
+    // layer commands (VALIDATE_DISPLAY not required)
+
+    /**
+     * SET_LAYER_CURSOR_POSITION has this pseudo prototype
+     *
+     *   setLayerCursorPosition(int x, int y);
+     *
+     * Asynchronously sets the position of a cursor layer.
+     *
+     * Prior to validateDisplay, a layer may be marked as Composition::CURSOR.
+     * If validation succeeds (i.e., the device does not request a composition
+     * change for that layer), then once a buffer has been set for the layer
+     * and it has been presented, its position may be set by this function at
+     * any time between presentDisplay and any subsequent validateDisplay
+     * calls for this display.
+     *
+     * Once validateDisplay is called, this function must not be called again
+     * until the validate/present sequence is completed.
+     *
+     * May be called from any thread so long as it is not interleaved with the
+     * validate/present sequence as described above.
+     *
+     * @param layer is the layer to which the position is set.
+     * @param x is the new x coordinate (in pixels from the left of the
+     *        screen).
+     * @param y is the new y coordinate (in pixels from the top of the
+     *        screen).
+     */
+    SET_LAYER_CURSOR_POSITION = 0x300 << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_BUFFER has this pseudo prototype
+     *
+     *   setLayerBuffer(int bufferSlot,
+     *                  int bufferIndex,
+     *                  int acquireFenceIndex);
+     *
+     * Sets the buffer handle to be displayed for this layer. If the buffer
+     * properties set at allocation time (width, height, format, and usage)
+     * have not changed since the previous frame, it is not necessary to call
+     * validateDisplay before calling presentDisplay unless new state needs to
+     * be validated in the interim.
+     *
+     * Also provides a file descriptor referring to an acquire sync fence
+     * object, which must be signaled when it is safe to read from the given
+     * buffer. If it is already safe to read from the buffer, an empty handle
+     * may be passed instead.
+     *
+     * This function must return NONE and have no other effect if called for a
+     * layer with a composition type of Composition::SOLID_COLOR (because it
+     * has no buffer) or Composition::SIDEBAND or Composition::CLIENT (because
+     * synchronization and buffer updates for these layers are handled
+     * elsewhere).
+     *
+     * @param layer is the layer to which the buffer is set.
+     * @param bufferSlot is the buffer slot to use.
+     * @param bufferIndex is the buffer handle to set.
+     * @param acquireFenceIndex is a sync fence file descriptor as described above.
+     */
+    SET_LAYER_BUFFER = 0x301 << OPCODE_SHIFT,
+
+    /*
+     * SET_LAYER_SURFACE_DAMAGE has this pseudo prototype
+     *
+     *   setLayerSurfaceDamage(Rect[] damage);
+     *
+     * Provides the region of the source buffer which has been modified since
+     * the last frame. This region does not need to be validated before
+     * calling presentDisplay.
+     *
+     * Once set through this function, the damage region remains the same
+     * until a subsequent call to this function.
+     *
+     * If damage is non-empty, then it may be assumed that any portion of the
+     * source buffer not covered by one of the rects has not been modified
+     * this frame. If damage is empty, then the whole source buffer must be
+     * treated as if it has been modified.
+     *
+     * If the layer's contents are not modified relative to the prior frame,
+     * damage must contain exactly one empty rect([0, 0, 0, 0]).
+     *
+     * The damage rects are relative to the pre-transformed buffer, and their
+     * origin is the top-left corner. They must not exceed the dimensions of
+     * the latched buffer.
+     *
+     * @param layer is the layer to which the damage region is set.
+     * @param damage is the new surface damage region.
+     */
+    SET_LAYER_SURFACE_DAMAGE = 0x302 << OPCODE_SHIFT,
+
+    // layer state commands (VALIDATE_DISPLAY required)
+
+    /**
+     * SET_LAYER_BLEND_MODE has this pseudo prototype
+     *
+     *   setLayerBlendMode(android.hardware.graphics.common.BlendMode mode)
+     *
+     * Sets the blend mode of the given layer.
+     *
+     * @param mode is the new blend mode.
+     */
+    SET_LAYER_BLEND_MODE = 0x400 << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_COLOR has this pseudo prototype
+     *
+     *   setLayerColor(Color color);
+     *
+     * Sets the color of the given layer. If the composition type of the layer
+     * is not Composition::SOLID_COLOR, this call must succeed and have no
+     * other effect.
+     *
+     * @param color is the new color.
+     */
+    SET_LAYER_COLOR = 0x401 << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_COMPOSITION_TYPE has this pseudo prototype
+     *
+     *   setLayerCompositionType(Composition type);
+     *
+     * Sets the desired composition type of the given layer. During
+     * validateDisplay, the device may request changes to the composition
+     * types of any of the layers as described in the definition of
+     * Composition above.
+     *
+     * @param type is the new composition type.
+     */
+    SET_LAYER_COMPOSITION_TYPE = 0x402 << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_DATASPACE has this pseudo prototype
+     *
+     *   setLayerDataspace(android.hardware.graphics.common.Dataspace dataspace);
+     *
+     * Sets the dataspace of the layer.
+     *
+     * The dataspace provides more information about how to interpret the buffer
+     * or solid color, such as the encoding standard and color transform.
+     *
+     * See the values of Dataspace for more information.
+     *
+     * @param dataspace is the new dataspace.
+     */
+    SET_LAYER_DATASPACE = 0x403 << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_DISPLAY_FRAME has this pseudo prototype
+     *
+     *   setLayerDisplayFrame(Rect frame);
+     *
+     * Sets the display frame (the portion of the display covered by a layer)
+     * of the given layer. This frame must not exceed the display dimensions.
+     *
+     * @param frame is the new display frame.
+     */
+    SET_LAYER_DISPLAY_FRAME = 0x404 << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_PLANE_ALPHA has this pseudo prototype
+     *
+     *   setLayerPlaneAlpha(float alpha);
+     *
+     * Sets an alpha value (a floating point value in the range [0.0, 1.0])
+     * which will be applied to the whole layer. It can be conceptualized as a
+     * preprocessing step which applies the following function:
+     *   if (blendMode == BlendMode::PREMULTIPLIED)
+     *       out.rgb = in.rgb * planeAlpha
+     *   out.a = in.a * planeAlpha
+     *
+     * If the device does not support this operation on a layer which is
+     * marked Composition::DEVICE, it must request a composition type change
+     * to Composition::CLIENT upon the next validateDisplay call.
+     *
+     * @param alpha is the plane alpha value to apply.
+     */
+    SET_LAYER_PLANE_ALPHA = 0x405 << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_SIDEBAND_STREAM has this pseudo prototype
+     *
+     *   setLayerSidebandStream(int streamIndex)
+     *
+     * Sets the sideband stream for this layer. If the composition type of the
+     * given layer is not Composition::SIDEBAND, this call must succeed and
+     * have no other effect.
+     *
+     * @param streamIndex is the new sideband stream.
+     */
+    SET_LAYER_SIDEBAND_STREAM = 0x406 << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_SOURCE_CROP has this pseudo prototype
+     *
+     *   setLayerSourceCrop(FRect crop);
+     *
+     * Sets the source crop (the portion of the source buffer which will fill
+     * the display frame) of the given layer. This crop rectangle must not
+     * exceed the dimensions of the latched buffer.
+     *
+     * If the device is not capable of supporting a true float source crop
+     * (i.e., it will truncate or round the floats to integers), it must set
+     * this layer to Composition::CLIENT when crop is non-integral for the
+     * most accurate rendering.
+     *
+     * If the device cannot support float source crops, but still wants to
+     * handle the layer, it must use the following code (or similar) to
+     * convert to an integer crop:
+     *   intCrop.left = (int) ceilf(crop.left);
+     *   intCrop.top = (int) ceilf(crop.top);
+     *   intCrop.right = (int) floorf(crop.right);
+     *   intCrop.bottom = (int) floorf(crop.bottom);
+     *
+     * @param crop is the new source crop.
+     */
+    SET_LAYER_SOURCE_CROP = 0x407 << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_TRANSFORM has this pseudo prototype
+     *
+     * Sets the transform (rotation/flip) of the given layer.
+     *
+     *   setLayerTransform(Transform transform);
+     *
+     * @param transform is the new transform.
+     */
+    SET_LAYER_TRANSFORM = 0x408 << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_VISIBLE_REGION has this pseudo prototype
+     *
+     *   setLayerVisibleRegion(Rect[] visible);
+     *
+     * Specifies the portion of the layer that is visible, including portions
+     * under translucent areas of other layers. The region is in screen space,
+     * and must not exceed the dimensions of the screen.
+     *
+     * @param visible is the new visible region, in screen space.
+     */
+    SET_LAYER_VISIBLE_REGION = 0x409 << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_Z_ORDER has this pseudo prototype
+     *
+     *   setLayerZOrder(int z);
+     *
+     * Sets the desired Z order (height) of the given layer. A layer with a
+     * greater Z value occludes a layer with a lesser Z value.
+     *
+     * @param z is the new Z order.
+     */
+    SET_LAYER_Z_ORDER = 0x40a << OPCODE_SHIFT,
+
+    /**
+     * SET_PRESENT_OR_VALIDATE_DISPLAY_RESULT has this pseudo prototype
+     *
+     * setPresentOrValidateDisplayResult(int state);
+     *
+     * Sets the state of PRESENT_OR_VALIDATE_DISPLAY command.
+     * @param state is the state of present or validate
+     *    1 - Present Succeeded
+     *    0 - Validate succeeded
+     */
+    SET_PRESENT_OR_VALIDATE_DISPLAY_RESULT = 0x40b << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_PER_FRAME_METADATA has this pseudo prototype
+     *
+     *   setLayerPerFrameMetadata(long display, long layer,
+     *                            PerFrameMetadata[] data);
+     *
+     * Sets the PerFrameMetadata for the display. This metadata must be used
+     * by the implementation to better tone map content to that display.
+     *
+     * This is a method that may be called every frame. Thus it's
+     * implemented using buffered transport.
+     * SET_LAYER_PER_FRAME_METADATA is the command used by the buffered transport
+     * mechanism.
+     */
+    SET_LAYER_PER_FRAME_METADATA = 0x303 << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_FLOAT_COLOR has this pseudo prototype
+     *
+     *   setLayerColor(FloatColor color);
+     *
+     * Sets the color of the given layer. If the composition type of the layer
+     * is not Composition::SOLID_COLOR, this call must succeed and have no
+     * other effect.
+     *
+     * @param color is the new color using float type.
+     */
+    SET_LAYER_FLOAT_COLOR = 0x40c << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_COLOR_TRANSFORM has this pseudo prototype
+     *
+     *   setLayerColorTransform(float[16] matrix);
+     *
+     * This command has the following binary layout in bytes:
+     *
+     *     0 - 16 * 4: matrix
+     *
+     * Sets a matrix for color transform which will be applied on this layer
+     * before composition.
+     *
+     * If the device is not capable of apply the matrix on this layer, it must force
+     * this layer to client composition during VALIDATE_DISPLAY.
+     *
+     * The matrix provided is an affine color transformation of the following
+     * form:
+     *
+     * |r.r r.g r.b 0|
+     * |g.r g.g g.b 0|
+     * |b.r b.g b.b 0|
+     * |Tr  Tg  Tb  1|
+     *
+     * This matrix must be provided in row-major form:
+     *
+     * {r.r, r.g, r.b, 0, g.r, ...}.
+     *
+     * Given a matrix of this form and an input color [R_in, G_in, B_in],
+     * the input color must first be converted to linear space
+     * [R_linear, G_linear, B_linear], then the output linear color
+     * [R_out_linear, G_out_linear, B_out_linear] will be:
+     *
+     * R_out_linear = R_linear * r.r + G_linear * g.r + B_linear * b.r + Tr
+     * G_out_linear = R_linear * r.g + G_linear * g.g + B_linear * b.g + Tg
+     * B_out_linear = R_linear * r.b + G_linear * g.b + B_linear * b.b + Tb
+     *
+     * [R_out_linear, G_out_linear, B_out_linear] must then be converted to
+     * gamma space: [R_out, G_out, B_out] before blending.
+     *
+     * @param matrix is a 4x4 transform matrix (16 floats) as described above.
+     */
+
+    SET_LAYER_COLOR_TRANSFORM = 0x40d << OPCODE_SHIFT,
+    /*
+     * SET_LAYER_PER_FRAME_METADATA_BLOBS has this pseudo prototype
+     *
+     *   setLayerPerFrameMetadataBlobs(long display, long layer,
+     *                                   PerFrameMetadataBlob[] metadata);
+     *
+     *   This command sends metadata that may be used for tone-mapping the
+     *   associated layer.  The metadata structure follows a {key, blob}
+     *   format (see the PerFrameMetadataBlob struct).  All keys must be
+     *   returned by a prior call to getPerFrameMetadataKeys and must
+     *   be part of the list of keys associated with blob-type metadata
+     *   (see PerFrameMetadataKey).
+     *
+     *   This method may be called every frame.
+     */
+    SET_LAYER_PER_FRAME_METADATA_BLOBS = 0x304 << OPCODE_SHIFT,
+
+    /**
+     * SET_CLIENT_TARGET_PROPERTY has this pseudo prototype
+     *
+     * This command has the following binary layout in bytes:
+     *
+     *     0 - 3: clientTargetProperty.pixelFormat
+     *     4 - 7: clientTargetProperty.dataspace
+     *
+     *   setClientTargetProperty(ClientTargetProperty clientTargetProperty);
+     */
+    SET_CLIENT_TARGET_PROPERTY = 0x105 << OPCODE_SHIFT,
+
+    /**
+     * SET_LAYER_GENERIC_METADATA has this pseudo prototype
+     *
+     *   setLayerGenericMetadata(string key, bool mandatory, byte[] value);
+     *
+     * Sets a piece of generic metadata for the given layer. If this
+     * function is called twice with the same key but different values, the
+     * newer value must override the older one. Calling this function with a
+     * 0-length value must reset that key's metadata as if it had not been
+     * set.
+     *
+     * A given piece of metadata may either be mandatory or a hint
+     * (non-mandatory) as indicated by the second parameter. Mandatory
+     * metadata may affect the composition result, which is to say that it
+     * may cause a visible change in the final image. By contrast, hints may
+     * only affect the composition strategy, such as which layers are
+     * composited by the client, but must not cause a visible change in the
+     * final image. The value of the mandatory flag shall match the value
+     * returned from getLayerGenericMetadataKeys for the given key.
+     *
+     * Only keys which have been returned from getLayerGenericMetadataKeys()
+     * shall be accepted. Any other keys must result in an UNSUPPORTED error.
+     *
+     * The value passed into this function shall be the binary
+     * representation of a HIDL type corresponding to the given key. For
+     * example, a key of 'com.example.V1_3.Foo' shall be paired with a
+     * value of type [email protected]::Foo, which would be defined in a
+     * vendor HAL extension.
+     *
+     * This function will be encoded in the command buffer in this order:
+     *   1) The key length, stored as a uint32_t
+     *   2) The key itself, padded to a uint32_t boundary if necessary
+     *   3) The mandatory flag, stored as a uint32_t
+     *   4) The value length in bytes, stored as a uint32_t
+     *   5) The value itself, padded to a uint32_t boundary if necessary
+     *
+     * @param key indicates which metadata value should be set on this layer
+     * @param mandatory indicates whether this particular key represents
+     *        mandatory metadata or a hint (non-mandatory metadata), as
+     *        described above
+     * @param value is a binary representation of a HIDL struct
+     *        corresponding to the key as described above
+     */
+    SET_LAYER_GENERIC_METADATA = 0x40e << OPCODE_SHIFT,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/Composition.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/Composition.aidl
new file mode 100644
index 0000000..ea22af2
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/Composition.aidl
@@ -0,0 +1,76 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * Possible composition types for a given layer.
+ */
+@VintfStability
+@Backing(type="int")
+enum Composition {
+    INVALID = 0,
+    /**
+     * The client must composite this layer into the client target buffer
+     * (provided to the device through setClientTarget).
+     *
+     * The device must not request any composition type changes for layers
+     * of this type.
+     */
+    CLIENT = 1,
+    /**
+     * The device must handle the composition of this layer through a
+     * hardware overlay or other similar means.
+     *
+     * Upon validateDisplay, the device may request a change from this
+     * type to CLIENT.
+     */
+    DEVICE = 2,
+    /**
+     * The device must render this layer using the color set through
+     * setLayerColor. If this functionality is not supported on a layer
+     * that the client sets to SOLID_COLOR, the device must request that
+     * the composition type of that layer is changed to CLIENT upon the
+     * next call to validateDisplay.
+     *
+     * Upon validateDisplay, the device may request a change from this
+     * type to CLIENT.
+     */
+    SOLID_COLOR = 3,
+    /**
+     * Similar to DEVICE, but the position of this layer may also be set
+     * asynchronously through setCursorPosition. If this functionality is
+     * not supported on a layer that the client sets to CURSOR, the device
+     * must request that the composition type of that layer is changed to
+     * CLIENT upon the next call to validateDisplay.
+     *
+     * Upon validateDisplay, the device may request a change from this
+     * type to either DEVICE or CLIENT.  Changing to DEVICE will prevent
+     * the use of setCursorPosition but still permit the device to
+     * composite the layer.
+     */
+    CURSOR = 4,
+    /**
+     * The device must handle the composition of this layer, as well as
+     * its buffer updates and content synchronization. Only supported on
+     * devices which provide Capability::SIDEBAND_STREAM.
+     *
+     * Upon validateDisplay, the device may request a change from this
+     * type to either DEVICE or CLIENT, but it is unlikely that content
+     * will display correctly in these cases.
+     */
+    SIDEBAND = 5,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/ContentType.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ContentType.aidl
new file mode 100644
index 0000000..470064a
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ContentType.aidl
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+@VintfStability
+@Backing(type="int")
+enum ContentType {
+    NONE = 0,
+    /**
+     * These modes correspond to those found in the HDMI 1.4 specification.
+     */
+    GRAPHICS = 1,
+    PHOTO = 2,
+    CINEMA = 3,
+    GAME = 4,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayAttribute.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayAttribute.aidl
new file mode 100644
index 0000000..bf66785
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayAttribute.aidl
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+import android.hardware.graphics.composer3.DisplayAttribute;
+
+/**
+ * Display attributes queryable through getDisplayAttribute.
+ */
+@VintfStability
+@Backing(type="int")
+enum DisplayAttribute {
+    INVALID = 0,
+    /**
+     * Dimensions in pixels
+     */
+    WIDTH = 1,
+    HEIGHT = 2,
+    /**
+     * Vsync period in nanoseconds
+     */
+    VSYNC_PERIOD = 3,
+    /**
+     * Dots per thousand inches (DPI * 1000). Scaling by 1000 allows these
+     * numbers to be stored in an int32_t without losing too much
+     * precision. If the DPI for a configuration is unavailable or is
+     * considered unreliable, the device may return UNSUPPORTED instead.
+     */
+    DPI_X = 4,
+    DPI_Y = 5,
+
+    // 6 is reserved for legacy interfaces
+
+    /**
+     * The configuration group ID (as int32_t) this config is associated to.
+     * Switching between configurations within the same group may be done seamlessly
+     * in some conditions via setActiveConfigWithConstraints. Configurations which
+     * share the same config group are similar in all attributes except for the
+     * vsync period.
+     */
+    CONFIG_GROUP = 7,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
new file mode 100644
index 0000000..54f09c1
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+import android.hardware.graphics.composer3.DisplayCapability;
+
+/**
+ * Required capabilities which are supported by the display. The
+ * particular set of supported capabilities for a given display may be
+ * retrieved using getDisplayCapabilities.
+ */
+@VintfStability
+@Backing(type="int")
+enum DisplayCapability {
+    INVALID = 0,
+    /**
+     * Indicates that the display must apply a color transform even when
+     * either the client or the device has chosen that all layers should
+     * be composed by the client. This prevents the client from applying
+     * the color transform during its composition step.
+     * If getDisplayCapabilities is supported, the global capability
+     * SKIP_CLIENT_COLOR_TRANSFORM is ignored.
+     * If getDisplayCapabilities is not supported, and the global capability
+     * SKIP_CLIENT_COLOR_TRANSFORM is returned by getCapabilities,
+     * then all displays must be treated as having
+     * SKIP_CLIENT_COLOR_TRANSFORM.
+     */
+    SKIP_CLIENT_COLOR_TRANSFORM = 1,
+    /**
+     * Indicates that the display supports PowerMode::DOZE and
+     * PowerMode::DOZE_SUSPEND. DOZE_SUSPEND may not provide any benefit
+     * over DOZE (see the definition of PowerMode for more information),
+     * but if both DOZE and DOZE_SUSPEND are no different from
+     * PowerMode::ON, the device must not claim support.
+     * Must be returned by getDisplayCapabilities when getDozeSupport
+     * indicates the display supports PowerMode::DOZE and
+     * PowerMode::DOZE_SUSPEND.
+     */
+    DOZE = 2,
+    /**
+     * Indicates that the display supports brightness operations.
+     */
+    BRIGHTNESS = 3,
+    /**
+     * Indicates that the display supports protected contents.
+     * When returned, hardware composer must be able to accept client target
+     * with protected buffers.
+     */
+    PROTECTED_CONTENTS = 4,
+    /**
+     * Indicates that both the composer HAL implementation and the given display
+     * support a low latency mode, such as HDMI 2.1 Auto Low Latency Mode.
+     */
+    AUTO_LOW_LATENCY_MODE = 5,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayConnectionType.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayConnectionType.aidl
new file mode 100644
index 0000000..80333cb
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayConnectionType.aidl
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+@VintfStability
+@Backing(type="int")
+enum DisplayConnectionType {
+    /**
+     * Display is connected through internal port, e.g. DSI, eDP.
+     */
+    INTERNAL = 0,
+    /**
+     * Display is connected through external port, e.g. HDMI, DisplayPort.
+     */
+    EXTERNAL = 1,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayContentSample.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayContentSample.aidl
new file mode 100644
index 0000000..9457d99
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayContentSample.aidl
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * Output parameters for IComposerClient.getDisplayedContentSample
+ */
+@VintfStability
+parcelable DisplayContentSample {
+    /**
+     * The number of frames represented by this sample.
+     */
+    long frameCount;
+    /**
+     * A histogram counting how many times a pixel of a given value was displayed
+     * onscreen for FORMAT_COMPONENT_0. The buckets of the histogram are evenly
+     * weighted, the number of buckets is device specific. eg, for RGBA_8888,
+     * if sampleComponent0 is {10, 6, 4, 1} this means that 10 red pixels were
+     * displayed onscreen in range 0x00->0x3F, 6 red pixels were displayed
+     * onscreen in range 0x40->0x7F, etc.
+     */
+    long[] sampleComponent0;
+    /**
+     * The same sample definition as sampleComponent0, but for FORMAT_COMPONENT_1.
+     */
+    long[] sampleComponent1;
+    /**
+     * The same sample definition as sampleComponent0, but for FORMAT_COMPONENT_2.
+     */
+    long[] sampleComponent2;
+    /**
+     * The same sample definition as sampleComponent0, but for FORMAT_COMPONENT_3.
+     */
+    long[] sampleComponent3;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayContentSamplingAttributes.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayContentSamplingAttributes.aidl
new file mode 100644
index 0000000..82f6b72
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayContentSamplingAttributes.aidl
@@ -0,0 +1,38 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+import android.hardware.graphics.composer3.FormatColorComponent;
+
+/**
+ * Output parameters for IComposerClient.getDisplayedContentSamplingAttributes
+ */
+@VintfStability
+parcelable DisplayContentSamplingAttributes {
+    /**
+     * The format of the sampled pixels.
+     */
+    android.hardware.graphics.common.PixelFormat format;
+    /**
+     * The dataspace of the sampled pixels.
+     */
+    android.hardware.graphics.common.Dataspace dataspace;
+    /**
+     * The mask of which components can be sampled.
+     */
+    FormatColorComponent componentMask;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayIdentification.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayIdentification.aidl
new file mode 100644
index 0000000..03ef8e6
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayIdentification.aidl
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * Output parameters for IComposerClient.getDisplayIdentificationData
+ */
+@VintfStability
+parcelable DisplayIdentification {
+    /**
+     * The connector to which the display is connected.
+     */
+    byte port;
+    /**
+     * The EDID 1.3 blob identifying the display.
+     */
+    byte[] data;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayRequest.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayRequest.aidl
new file mode 100644
index 0000000..4b3d31a
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayRequest.aidl
@@ -0,0 +1,37 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * Display requests returned by getDisplayRequests.
+ */
+@VintfStability
+@Backing(type="int")
+enum DisplayRequest {
+    /**
+     * Instructs the client to provide a new client target buffer, even if
+     * no layers are marked for client composition.
+     */
+    FLIP_CLIENT_TARGET = 1 << 0,
+    /**
+     * Instructs the client to write the result of client composition
+     * directly into the virtual display output buffer. If any of the
+     * layers are not marked as Composition::CLIENT or the given display
+     * is not a virtual display, this request has no effect.
+     */
+    WRITE_CLIENT_TARGET_TO_OUTPUT = 1 << 1,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/ExecuteCommandsStatus.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ExecuteCommandsStatus.aidl
new file mode 100644
index 0000000..f67c3ce
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ExecuteCommandsStatus.aidl
@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * Output parameters for IComposerClient.executeCommands
+ */
+@VintfStability
+parcelable ExecuteCommandsStatus {
+    /**
+     * Indicates whether the output command message queue has changed.
+     */
+    boolean queueChanged;
+    /**
+     * Indicates whether the output command message queue has changed.
+     */
+    int length;
+    /**
+     * An array of handles referenced by the output commands.
+     */
+    android.hardware.common.NativeHandle[] handles;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/FloatColor.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/FloatColor.aidl
new file mode 100644
index 0000000..a0a1d4b
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/FloatColor.aidl
@@ -0,0 +1,29 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * Color representation as a floating point number in the range [0.0 - 1.0]
+ */
+
+@VintfStability
+parcelable FloatColor {
+    float r;
+    float g;
+    float b;
+    float a;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/FormatColorComponent.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/FormatColorComponent.aidl
new file mode 100644
index 0000000..cc8f424
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/FormatColorComponent.aidl
@@ -0,0 +1,38 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+@VintfStability
+@Backing(type="byte")
+enum FormatColorComponent {
+    /*
+     * The first component  (eg, for RGBA_8888, this is R)
+     */
+    FORMAT_COMPONENT_0 = 1 << 0,
+    /*
+     * The second component (eg, for RGBA_8888, this is G)
+     */
+    FORMAT_COMPONENT_1 = 1 << 1,
+    /*
+     * The third component  (eg, for RGBA_8888, this is B)
+     */
+    FORMAT_COMPONENT_2 = 1 << 2,
+    /*
+     * The fourth component (eg, for RGBA_8888, this is A)
+     */
+    FORMAT_COMPONENT_3 = 1 << 3,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/HandleIndex.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/HandleIndex.aidl
new file mode 100644
index 0000000..0a93c9e
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/HandleIndex.aidl
@@ -0,0 +1,33 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * Special index values (always negative) for command queue commands.
+ */
+@VintfStability
+@Backing(type="int")
+enum HandleIndex {
+    /**
+     * No handle
+     */
+    EMPTY = -1,
+    /**
+     * Use cached handle
+     */
+    CACHED = -2,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/HdrCapabilities.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/HdrCapabilities.aidl
new file mode 100644
index 0000000..3fb55ba
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/HdrCapabilities.aidl
@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+/**
+ * Output parameters for IComposerClient.getHdrCapabilities
+ *
+ * @param types is an array of HDR types, may have 0 elements if the
+ *         display is not HDR-capable.
+ * @param maxLuminance is the desired content maximum luminance for this
+ *         display in cd/m^2.
+ * @param maxAverageLuminance - the desired content maximum frame-average
+ *         luminance for this display in cd/m^2.
+ * @param minLuminance is the desired content minimum luminance for this
+ *         display in cd/m^2.
+ */
+@VintfStability
+parcelable HdrCapabilities {
+    android.hardware.graphics.common.Hdr[] types;
+    float maxLuminance;
+    float maxAverageLuminance;
+    float minLuminance;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposer.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposer.aidl
new file mode 100644
index 0000000..a6a9f73
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposer.aidl
@@ -0,0 +1,54 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+import android.hardware.graphics.composer3.Capability;
+import android.hardware.graphics.composer3.IComposerClient;
+
+@VintfStability
+interface IComposer {
+    /**
+     * Temporary failure due to resource contention Exception
+     */
+    const int EX_NO_RESOURCES = 6;
+
+    /**
+     * Creates a v2.4 client of the composer. Supersedes @2.3::createClient.
+     *
+     * @return is the newly created client.
+     *
+     * @exception EX_NO_RESOURCES when the client could not be created.
+     */
+    IComposerClient createClient();
+
+    /**
+     * Retrieves implementation-defined debug information, which will be
+     * displayed during, for example, `dumpsys SurfaceFlinger`.
+     *
+     * @return is a string of debug information.
+     */
+    String dumpDebugInfo();
+
+    /**
+     * Provides a list of supported capabilities (as described in the
+     * definition of Capability above). This list must not change after
+     * initialization.
+     *
+     * @return is a list of supported capabilities.
+     */
+    Capability[] getCapabilities();
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerCallback.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerCallback.aidl
new file mode 100644
index 0000000..1709e6d
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerCallback.aidl
@@ -0,0 +1,89 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+import android.hardware.graphics.composer3.VsyncPeriodChangeTimeline;
+
+@VintfStability
+interface IComposerCallback {
+    /**
+     * Notifies the client that the given display has either been connected or
+     * disconnected. Every active display (even a built-in physical display)
+     * must trigger at least one hotplug notification, even if it only occurs
+     * immediately after callback registration.
+     *
+     * Displays which have been connected are assumed to be in PowerMode::OFF,
+     * and the onVsync callback should not be called for a display until vsync
+     * has been enabled with setVsyncEnabled.
+     *
+     * The client may call back into the device while the callback is in
+     * progress. The device must serialize calls to this callback such that
+     * only one thread is calling it at a time.
+     *
+     * @param display is the display that triggers the hotplug event.
+     * @param connected indicates whether the display is connected or
+     *        disconnected.
+     */
+    void onHotplug(long display, boolean connected);
+
+    /**
+     * Notifies the client to trigger a screen refresh. This forces all layer
+     * state for this display to be resent, and the display to be validated
+     * and presented, even if there have been no changes.
+     *
+     * This refresh will occur some time after the callback is initiated, but
+     * not necessarily before it returns.  It is safe to trigger this callback
+     * from other functions which call into the device.
+     *
+     * @param display is the display to refresh.
+     */
+    oneway void onRefresh(long display);
+
+    /**
+     * Notifies the client that the conditions which previously led to returning
+     * SEAMLESS_NOT_POSSIBLE from setActiveConfigWithConstraints have changed and now seamless may
+     * be possible. Client should retry calling setActiveConfigWithConstraints.
+     *
+     * @param display is a display setActiveConfigWithConstraints previously failed with
+     * EX_SEAMLESS_NOT_POSSIBLE.
+     */
+    oneway void onSeamlessPossible(long display);
+
+    /**
+     * Notifies the client that a vsync event has occurred. This callback must
+     * only be triggered when vsync is enabled for this display (through
+     * setVsyncEnabled).
+     *
+     * @param display is the display which has received a vsync event
+     * @param timestamp is the CLOCK_MONOTONIC time at which the vsync event
+     *        occurred, in nanoseconds.
+     * @param vsyncPeriodNanos is the display vsync period in nanoseconds i.e. the next onVsync
+     *        is expected to be called vsyncPeriodNanos nanoseconds after this call.
+     */
+    oneway void onVsync(long display, long timestamp, int vsyncPeriodNanos);
+
+    /**
+     * Notifies the client that the previously reported timing for vsync period change has been
+     * updated. This may occur if the composer missed the deadline for changing the vsync period
+     * or the client submitted a refresh frame too late.
+     *
+     * @param display is the display which vsync period change is in progress
+     * @param updatedTimeline is the new timeline for the vsync period change.
+     */
+    oneway void onVsyncPeriodTimingChanged(
+            long display, in VsyncPeriodChangeTimeline updatedTimeline);
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
new file mode 100644
index 0000000..9bde220
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -0,0 +1,821 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+import android.hardware.common.fmq.MQDescriptor;
+import android.hardware.common.fmq.SynchronizedReadWrite;
+import android.hardware.graphics.composer3.ClientTargetProperty;
+import android.hardware.graphics.composer3.ColorMode;
+import android.hardware.graphics.composer3.Command;
+import android.hardware.graphics.composer3.ContentType;
+import android.hardware.graphics.composer3.DisplayAttribute;
+import android.hardware.graphics.composer3.DisplayCapability;
+import android.hardware.graphics.composer3.DisplayConnectionType;
+import android.hardware.graphics.composer3.DisplayContentSample;
+import android.hardware.graphics.composer3.DisplayContentSamplingAttributes;
+import android.hardware.graphics.composer3.DisplayIdentification;
+import android.hardware.graphics.composer3.ExecuteCommandsStatus;
+import android.hardware.graphics.composer3.FormatColorComponent;
+import android.hardware.graphics.composer3.HdrCapabilities;
+import android.hardware.graphics.composer3.IComposerCallback;
+import android.hardware.graphics.composer3.LayerGenericMetadataKey;
+import android.hardware.graphics.composer3.PerFrameMetadataKey;
+import android.hardware.graphics.composer3.PowerMode;
+import android.hardware.graphics.composer3.ReadbackBufferAttributes;
+import android.hardware.graphics.composer3.RenderIntent;
+import android.hardware.graphics.composer3.VirtualDisplay;
+import android.hardware.graphics.composer3.VsyncPeriodChangeConstraints;
+import android.hardware.graphics.composer3.VsyncPeriodChangeTimeline;
+
+@VintfStability
+interface IComposerClient {
+    /**
+     * Invalid Config Exception
+     */
+    const int EX_BAD_CONFIG = 1;
+
+    /**
+     * Invalid Display Exception
+     */
+    const int EX_BAD_DISPLAY = 2;
+
+    /**
+     * Invalid Layer Exception
+     */
+    const int EX_BAD_LAYER = 3;
+
+    /**
+     * Invalid width, height, etc.
+     */
+    const int EX_BAD_PARAMETER = 4;
+
+    /**
+     * Reserved for historical reasons
+     */
+    const int EX_RESERVED = 5;
+    /**
+     * Temporary failure due to resource contention Exception
+     */
+    const int EX_NO_RESOURCES = 6;
+
+    /**
+     * validateDisplay has not been called Exception
+     */
+    const int EX_NOT_VALIDATED = 7;
+
+    /**
+     * Seamless cannot be required for configurations that don't share a
+     * config group Exception
+     */
+    const int EX_UNSUPPORTED = 8;
+
+    const int EX_SEAMLESS_NOT_ALLOWED = 9;
+    /**
+     * Seamless requirements cannot be met Exception
+     */
+    const int EX_SEAMLESS_NOT_POSSIBLE = 10;
+
+    /**
+     * Creates a new layer on the given display.
+     *
+     * @param display is the display on which to create the layer.
+     * @param bufferSlotCount is the number of buffer slot to be reserved.
+     *
+     * @return is the handle of the new layer.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_NO_RESOURCES when the device was unable to create a layer this
+     *                      time.
+     */
+    long createLayer(long display, int bufferSlotCount);
+
+    /**
+     * Creates a new virtual display with the given width and height. The
+     * format passed into this function is the default format requested by the
+     * consumer of the virtual display output buffers.
+     *
+     * The display must be assumed to be on from the time the first frame is
+     * presented until the display is destroyed.
+     *
+     * @param width is the width in pixels.
+     * @param height is the height in pixels.
+     * @param formatHint is the default output buffer format selected by
+     *        the consumer.
+     * @param outputBufferSlotCount is the number of output buffer slots to be
+     *        reserved.
+     *
+     * @return is the newly-created virtual display.
+     *
+     * @exception EX_UNSUPPORTED when the width or height is too large for the
+     *                     device to be able to create a virtual display.
+     * @exception EX_NO_RESOURCES when the device is unable to create a new virtual
+     *                      display at this time.
+     */
+    VirtualDisplay createVirtualDisplay(int width, int height,
+            android.hardware.graphics.common.PixelFormat formatHint, int outputBufferSlotCount);
+
+    /**
+     * Destroys the given layer.
+     *
+     * @param display is the display on which the layer was created.
+     * @param layer is the layer to destroy.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_BAD_LAYER when an invalid layer handle was passed in.
+     */
+    void destroyLayer(long display, long layer);
+
+    /**
+     * Destroys a virtual display. After this call all resources consumed by
+     * this display may be freed by the device and any operations performed on
+     * this display must fail.
+     *
+     * @param display is the virtual display to destroy.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_BAD_PARAMETER when the display handle which was passed in does
+     *                       not refer to a virtual display.
+     */
+    void destroyVirtualDisplay(long display);
+
+    /**
+     * Executes commands from the input command message queue. Return values
+     * generated by the input commands are written to the output command
+     * message queue in the form of value commands.
+     *
+     * @param inLength is the length of input commands.
+     * @param inHandles is an array of handles referenced by the input
+     *        commands.
+     *
+     * @return is the status of the command.
+
+     * @exception EX_BAD_PARAMETER when inLength is not equal to the length of
+     *                       commands in the input command message queue.
+     * @exception NO_RESOURCES when the output command message queue was not
+     *                      properly drained.
+     */
+    ExecuteCommandsStatus executeCommands(
+            int inLength, in android.hardware.common.NativeHandle[] inHandles);
+
+    /**
+     * Retrieves which display configuration is currently active.
+     *
+     * If no display configuration is currently active, this function raise
+     * the exception EX_BAD_CONFIG. It is the responsibility of the client to call
+     * setActiveConfig with a valid configuration before attempting to present
+     * anything on the display.
+     *
+     * @param display is the display to which the active config is queried.
+     *
+     * @return is the currently active display configuration.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_BAD_CONFIG when no configuration is currently active.
+     */
+    int getActiveConfig(long display);
+
+    /**
+     * Returns whether a client target with the given properties can be
+     * handled by the device.
+     *
+     * This function must return true for a client target with width and
+     * height equal to the active display configuration dimensions,
+     * PixelFormat::RGBA_8888, and Dataspace::UNKNOWN. It is not required to
+     * return true for any other configuration.
+     *
+     * @param display is the display to query.
+     * @param width is the client target width in pixels.
+     * @param height is the client target height in pixels.
+     * @param format is the client target format.
+     * @param dataspace is the client target dataspace, as described in
+     *     setLayerDataspace.
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_UNSUPPORTED when the given configuration is not supported.
+     */
+    void getClientTargetSupport(long display, int width, int height,
+            android.hardware.graphics.common.PixelFormat format,
+            android.hardware.graphics.common.Dataspace dataspace);
+
+    /**
+     * Returns the color modes supported on this display.
+     *
+     * All devices must support at least ColorMode::NATIVE.
+     *
+     * @param display is the display to query.
+     *
+     * @return is an array of color modes.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     */
+    ColorMode[] getColorModes(long display);
+
+    /**
+     * By default, layer dataspaces are mapped to the current color mode
+     * colorimetrically with a few exceptions.
+     *
+     * When the layer dataspace is a legacy dataspace (see
+     * [email protected]::Dataspace) and the display render intent is
+     * RenderIntent::ENHANCE, the pixel values can go through an
+     * implementation-defined saturation transform before being mapped to the
+     * current color mode colorimetrically.
+     *
+     * Colors that are out of the gamut of the current color mode are
+     * hard-clipped.
+     *
+     *
+     * Returns the saturation matrix of the specified legacy dataspace.
+     *
+     * The saturation matrix can be used to approximate the legacy dataspace
+     * saturation transform. It is to be applied on linear pixel values like
+     * this:
+     *
+     *   (in GLSL)
+     *   linearSrgb = saturationMatrix * linearSrgb;
+     *
+     * @param dataspace must be Dataspace::SRGB_LINEAR.
+     *
+     * @return is the 4x4 column-major matrix used to approximate the
+     *         legacy dataspace saturation operation. The last row must be
+     *         [0.0, 0.0, 0.0, 1.0].
+     *
+     * @exception EX_BAD_PARAMETER when an invalid dataspace was passed in.
+     */
+    float[] getDataspaceSaturationMatrix(android.hardware.graphics.common.Dataspace dataspace);
+
+    /**
+     * Returns a display attribute value for a particular display
+     * configuration.
+     *
+     * @param display is the display to query.
+     * @param config is the display configuration for which to return
+     *        attribute values.
+     *
+     * @return is the value of the attribute.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_BAD_CONFIG when config does not name a valid configuration for
+     *                    this display.
+     * @exception EX_BAD_PARAMETER when attribute is unrecognized.
+     * @exception EX_UNSUPPORTED when attribute cannot be queried for the config.
+     */
+    int getDisplayAttribute(long display, int config, DisplayAttribute attribute);
+
+    /**
+     * Use getDisplayCapabilities instead. If brightness is supported, must return
+     * DisplayCapability::BRIGHTNESS as one of the display capabilities via getDisplayCapabilities.
+     * Only use getDisplayCapabilities as the source of truth to query brightness support.
+     *
+     * Gets whether brightness operations are supported on a display.
+     *
+     * @param display The display.
+     *
+     * @return Whether brightness operations are supported on the display.
+     *
+     * @exception EX_BAD_DISPLAY   when the display is invalid, or
+     * @exception EX_BAD_PARAMETER when the output parameter is invalid.
+     */
+    boolean getDisplayBrightnessSupport(long display);
+
+    /**
+     * Provides a list of supported capabilities (as described in the
+     * definition of DisplayCapability above). This list must not change after
+     * initialization.
+     *
+     * @return is a list of supported capabilities.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     */
+    DisplayCapability[] getDisplayCapabilities(long display);
+
+    /**
+     * Returns handles for all of the valid display configurations on this
+     * display.
+     *
+     * @param display is the display to query.
+     *
+     * @return is an array of configuration handles.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     */
+    int[] getDisplayConfigs(long display);
+
+    /**
+     * Returns whether the given physical display is internal or external.
+     *
+     * @return is the connection type of the display.
+     *
+     * @exception EX_BAD_DISPLAY when the given display is invalid or virtual.
+     */
+    DisplayConnectionType getDisplayConnectionType(long display);
+
+    /**
+     * Returns the port and data that describe a physical display. The port is
+     * a unique number that identifies a physical connector (e.g. eDP, HDMI)
+     * for display output. The data blob is parsed to determine its format,
+     * typically EDID 1.3 as specified in VESA E-EDID Standard Release A
+     * Revision 1.
+     *
+     * @param display is the display to query.
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_UNSUPPORTED when identification data is unavailable.
+     * @return the connector to which the display is connected and the EDID 1.3
+     *         blob identifying the display.
+     */
+    DisplayIdentification getDisplayIdentificationData(long display);
+
+    /**
+     * Returns a human-readable version of the display's name.
+     *
+     * @return is the name of the display.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     */
+    String getDisplayName(long display);
+
+    /**
+     * Retrieves which vsync period the display is currently using.
+     *
+     * If no display configuration is currently active, this function must
+     * return BAD_CONFIG. If the vsync period is about to change due to a
+     * setActiveConfigWithConstraints call, this function must return the current vsync period
+     * until the change takes place.
+     *
+     * @param display is the display for which the vsync period is queried.
+     *
+     * @return is the current vsync period of the display.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_BAD_CONFIG when no configuration is currently active.
+     */
+    int getDisplayVsyncPeriod(long display);
+
+    /**
+     * Collects the results of display content color sampling for display.
+     *
+     * Collection of data can occur whether the sampling is in ENABLE or
+     * DISABLE state.
+     *
+     * @param  display     is the display to which the sampling is collected.
+     * @param  maxFrames   is the maximum number of frames that should be represented in the sample.
+     *                     The sample represents the most-recently posted frames.
+     *                     If maxFrames is 0, all frames are to be represented by the sample.
+     * @param  timestamp   is the timestamp after which any frames were posted that should be
+     *                     included in the sample. Timestamp is CLOCK_MONOTONIC.
+     *                     If timestamp is 0, do not filter from the sample by time.
+     *
+     * @return is the sample.
+     *
+     * @exception EX_BAD_DISPLAY   when an invalid display was passed in, or
+     * @exception EX_UNSUPPORTED   when there is no efficient way to sample, or
+     * @exception EX_BAD_PARAMETER when the component is not supported by the hardware.
+     */
+    DisplayContentSample getDisplayedContentSample(long display, long maxFrames, long timestamp);
+
+    /**
+     * Query for what types of color sampling the hardware supports.
+     *
+     * @param  display        is the display where the samples are collected.
+     *
+     * @return are the sampling attributes
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display was passed in, or
+     * @exception EX_UNSUPPORTED when there is no efficient way to sample.
+     */
+    DisplayContentSamplingAttributes getDisplayedContentSamplingAttributes(long display);
+
+    /**
+     * Returns whether the given display supports PowerMode::DOZE and
+     * PowerMode::DOZE_SUSPEND. DOZE_SUSPEND may not provide any benefit over
+     * DOZE (see the definition of PowerMode for more information), but if
+     * both DOZE and DOZE_SUSPEND are no different from PowerMode::ON, the
+     * device must not claim support.
+     *
+     * @param display is the display to query.
+     *
+     * @return is true only when the display supports doze modes.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     */
+    boolean getDozeSupport(long display);
+
+    /**
+     * Returns the high dynamic range (HDR) capabilities of the given display,
+     * which are invariant with regard to the active configuration.
+     *
+     * Displays which are not HDR-capable must return no types.
+     *
+     * @param display is the display to query.
+     *
+     * @return are the HDR capabilities
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     */
+    HdrCapabilities getHdrCapabilities(long display);
+
+    /**
+     * Retrieves the set of keys that may be passed into setLayerGenericMetadata
+     *
+     * Key names must meet the following requirements:
+     * - Must be specified in reverse domain name notation
+     * - Must not start with 'com.android' or 'android'
+     * - Must be unique within the returned vector
+     * - Must correspond to a matching HIDL struct type, which defines the
+     *   structure of its values. For example, the key 'com.example.V1-3.Foo'
+     *   should correspond to a value of type [email protected]::Foo, which is
+     *   defined in a vendor HAL extension
+     */
+    LayerGenericMetadataKey[] getLayerGenericMetadataKeys();
+
+    /**
+     * Returns the maximum number of virtual displays supported by this device
+     * (which may be 0). The client must not attempt to create more than this
+     * many virtual displays on this device. This number must not change for
+     * the lifetime of the device.
+     *
+     * @return is the maximum number of virtual displays supported.
+     */
+    int getMaxVirtualDisplayCount();
+
+    /**
+     * Gets the output command message queue.
+     *
+     * This function must only be called inside executeCommands closure.
+     *
+     * @return is the descriptor of the output command queue.
+     *
+     * @exception EX_NO_RESOURCES when failed to get the queue temporarily.
+     */
+    MQDescriptor<int, SynchronizedReadWrite> getOutputCommandQueue();
+
+    /**
+     * Returns the PerFrameMetadataKeys that are supported by this device.
+     *
+     * @param display is the display on which to create the layer.
+     * @return is the vector of PerFrameMetadataKey keys that are
+     *        supported by this device.
+     * @exception EX_UNSUPPORTED if not supported on underlying HAL
+     */
+    PerFrameMetadataKey[] getPerFrameMetadataKeys(long display);
+
+    /**
+     * Returns the format which should be used when allocating a buffer for use by
+     * device readback as well as the dataspace in which its contents must be
+     * interpreted.
+     *
+     * The width and height of this buffer must be those of the currently-active
+     * display configuration, and the usage flags must consist of the following:
+     *   BufferUsage::CPU_READ | BufferUsage::GPU_TEXTURE |
+     *   BufferUsage::COMPOSER_OUTPUT
+     *
+     * The format and dataspace provided must be sufficient such that if a
+     * correctly-configured buffer is passed into setReadbackBuffer, filled by
+     * the device, and then displayed by the client as a full-screen buffer, the
+     * output of the display remains the same (subject to the note about protected
+     * content in the description of setReadbackBuffer).
+     *
+     * If the active configuration or color mode of this display has changed
+     * since a previous call to this function, it must be called again prior to
+     * setting a readback buffer such that the returned format and dataspace will
+     * be updated accordingly.
+     *
+     * Parameters:
+     * @param display - the display on which to create the layer.
+     *
+     * @return is the readback buffer attributes.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_UNSUPPORTED if not supported on underlying HAL
+     *
+     * See also:
+     *   setReadbackBuffer
+     *   getReadbackBufferFence
+     */
+    ReadbackBufferAttributes getReadbackBufferAttributes(long display);
+
+    /**
+     * Returns an acquire sync fence file descriptor which must signal when the
+     * buffer provided to setReadbackBuffer has been filled by the device and is
+     * safe for the client to read.
+     *
+     * If it is already safe to read from this buffer, -1 may be returned instead.
+     * The client takes ownership of this file descriptor and is responsible for
+     * closing it when it is no longer needed.
+     *
+     * This function must be called immediately after the composition cycle being
+     * captured into the readback buffer. The complete ordering of a readback buffer
+     * capture is as follows:
+     *
+     *   getReadbackBufferAttributes
+     *   // Readback buffer is allocated
+     *   // Many frames may pass
+     *
+     *   setReadbackBuffer
+     *   validateDisplay
+     *   presentDisplay
+     *   getReadbackBufferFence
+     *   // Implicitly wait on the acquire fence before accessing the buffer
+     *
+     * Parameters:
+     * @param display - the display on which to create the layer.
+     *
+     * @return is a sync fence file descriptor as described above; pointer
+     *       must be non-NULL
+     *
+     * @exception EX_BAD_DISPLAY - an invalid display handle was passed in
+     * @exception EX_NO_RESOURCES - the readback operation was successful, but
+     *                        resulted in a different validate result than would
+     *                        have occurred without readback
+     * @exception EX_UNSUPPORTED - the readback operation was unsuccessful because of
+     *                       resource constraints, the presence of protected
+     *                       content, or other reasons; -1 must be returned for
+     *                       acquireFence
+     *
+     * See also:
+     *   getReadbackBufferAttributes
+     *   setReadbackBuffer
+     */
+    ParcelFileDescriptor getReadbackBufferFence(long display);
+
+    /**
+     * Returns the render intents supported by the specified display and color
+     * mode.
+     *
+     * For SDR color modes, RenderIntent::COLORIMETRIC must be supported. For
+     * HDR color modes, RenderIntent::TONE_MAP_COLORIMETRIC must be supported.
+     *
+     * @param display is the display to query.
+     * @param mode is the color mode to query.
+     *
+     * @return is an array of render intents.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_BAD_PARAMETER when an invalid color mode was passed in.
+     */
+    RenderIntent[] getRenderIntents(long display, ColorMode mode);
+
+    /**
+     * Provides a list of all the content types supported by this display (any of
+     * ContentType::{GRAPHICS, PHOTO, CINEMA, GAME}). This list must not change after
+     * initialization.
+     *
+     * Content types are introduced in HDMI 1.4 and supporting them is optional. The
+     * ContentType::NONE is always supported and will not be returned by this method..
+     *
+     * @return out is a list of supported content types.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     */
+    ContentType[] getSupportedContentTypes(long display);
+
+    /**
+     * Provides a IComposerCallback object for the device to call.
+     *
+     * This function must be called only once.
+     *
+     * @param callback is the IComposerCallback object.
+     */
+    void registerCallback(in IComposerCallback callback);
+
+    /**
+     * Sets the active configuration for this display. Upon returning, the
+     * given display configuration must be active and remain so until either
+     * this function is called again or the display is disconnected.
+     *
+     * @param display is the display to which the active config is set.
+     * @param config is the new display configuration.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_BAD_CONFIG when the configuration handle passed in is not valid
+     *                    for this display.
+     */
+    void setActiveConfig(long display, int config);
+
+    /**
+     * Sets the active configuration and the refresh rate for this display.
+     * If the new config shares the same config group as the current config,
+     * only the vsync period shall change.
+     * Upon returning, the given display configuration, except vsync period, must be active and
+     * remain so until either this function is called again or the display is disconnected.
+     * When the display starts to refresh at the new vsync period, onVsync_2_4 callback must be
+     * called with the new vsync period.
+     *
+     * @param display is the display for which the active config is set.
+     * @param config is the new display configuration.
+     * @param vsyncPeriodChangeConstraints are the constraints required for changing vsync period.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_BAD_CONFIG when the configuration handle passed in is not valid
+     *                    for this display.
+     * @exception EX_SEAMLESS_NOT_ALLOWED when seamlessRequired was true but config provided doesn't
+     *                              share the same config group as the current config.
+     * @exception EX_SEAMLESS_NOT_POSSIBLE when seamlessRequired was true but the display cannot
+     * achieve the vsync period change without a noticeable visual artifact. When the conditions
+     * change and it may be possible to change the vsync period seamlessly, onSeamlessPossible
+     * callback must be called to indicate that caller should retry.
+     *
+     * @return is the timeline for the vsync period change.
+     */
+    VsyncPeriodChangeTimeline setActiveConfigWithConstraints(
+            long display, int config, in VsyncPeriodChangeConstraints vsyncPeriodChangeConstraints);
+
+    /**
+     * Requests the display to enable/disable its low latency mode.
+     *
+     * If the display is connected via HDMI 2.1, then Auto Low Latency Mode should be triggered. If
+     * the display is internally connected and a custom low latency mode is available, that should
+     * be triggered.
+     *
+     * This function should only be called if the display reports support for
+     * DisplayCapability::AUTO_LOW_LATENCY_MODE from getDisplayCapabilities_2_4.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_UNSUPPORTED when AUTO_LOW_LATENCY_MODE is not supported by the composer
+     *                           implementation or the given display
+     */
+    void setAutoLowLatencyMode(long display, boolean on);
+
+    /**
+     * Set the number of client target slots to be reserved.
+     *
+     * @param display is the display to which the slots are reserved.
+     * @param clientTargetSlotCount is the slot count for client targets.
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_NO_RESOURCES when unable to reserve the slots.
+     */
+    void setClientTargetSlotCount(long display, int clientTargetSlotCount);
+
+    /**
+     * Sets the color mode and render intent of the given display.
+     *
+     * The color mode and render intent change must take effect on next
+     * presentDisplay.
+     *
+     * All devices must support at least ColorMode::NATIVE and
+     * RenderIntent::COLORIMETRIC, and displays are assumed to be in this mode
+     * upon hotplug.
+     *
+     * @param display is the display to which the color mode is set.
+     * @param mode is the color mode to set to.
+     * @param intent is the render intent to set to.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_BAD_PARAMETER when mode or intent is invalid
+     * @exception EX_UNSUPPORTED when mode or intent is not supported on this
+     *         display.
+     */
+    void setColorMode(long display, ColorMode mode, RenderIntent intent);
+
+    /**
+     * Instructs the connected display that the content being shown is of the given type - one of
+     * GRAPHICS, PHOTO, CINEMA, GAME.
+     *
+     * Content types are introduced in HDMI 1.4 and supporting them is optional. If they are
+     * supported, this signal should switch the display to a mode that is optimal for the given
+     * type of content. See HDMI 1.4 specification for more information.
+     *
+     * If the display is internally connected (not through HDMI), and such modes are available,
+     * this method should trigger them.
+     *
+     * This function should only be called if the display reports support for the corresponding
+     * content type (ContentType::{GRAPHICS, PHOTO, CINEMA, GAME}) from getSupportedContentTypes.
+     * ContentType::NONE is supported by default and can always be set.
+     *
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_UNSUPPORTED when the given content type is not supported by the composer
+     *         implementation or the given display
+     */
+    void setContentType(long display, ContentType type);
+
+    /**
+     * Sets the brightness of a display.
+     *
+     * Ideally, the brightness change should take effect in the next frame post (so that it can be
+     * aligned with color transforms).
+     *
+     * @param display
+     *      The display whose brightness is set.
+     * @param brightness
+     *      A number between 0.0f (minimum brightness) and 1.0f (maximum brightness), or -1.0 to
+     *      turn the backlight off.
+     *
+     * @exception EX_BAD_DISPLAY   when the display is invalid, or
+     * @exception EX_UNSUPPORTED   when brightness operations are not supported, or
+     * @exception EX_BAD_PARAMETER when the brightness is invalid, or
+     * @exception EX_NO_RESOURCES  when the brightness cannot be applied.
+     */
+    void setDisplayBrightness(long display, float brightness);
+
+    /**
+     * Enables or disables the collection of color content statistics
+     * on this display.
+     *
+     * Sampling occurs on the contents of the final composition on this display
+     * (i.e., the contents presented on screen). Samples should be collected after all
+     * color transforms have been applied.
+     *
+     * Sampling support is optional, and is set to DISABLE by default.
+     * On each call to ENABLE, all collected statistics must be reset.
+     *
+     * Sample data can be queried via getDisplayedContentSample().
+     *
+     * @param display        is the display to which the sampling mode is set.
+     * @param enabled        indicates whether to enable or disable sampling.
+     * @param componentMask  The mask of which components should be sampled. If zero, all supported
+     *                       components are to be enabled.
+     * @param maxFrames      is the maximum number of frames that should be stored before discard.
+     *                       The sample represents the most-recently posted frames.
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in,
+     * @exception EX_BAD_PARAMETER when enabled was an invalid value, or
+     * @exception EX_NO_RESOURCES when the requested ringbuffer size via maxFrames was
+     *                                 not available.
+     * @exception EX_UNSUPPORTED when there is no efficient way to sample.
+     */
+    void setDisplayedContentSamplingEnabled(
+            long display, boolean enable, FormatColorComponent componentMask, long maxFrames);
+
+    /**
+     * Sets the input command message queue.
+     *
+     * @param descriptor is the descriptor of the input command message queue.
+     * @exception EX_NO_RESOURCES when failed to set the queue temporarily.
+     */
+    void setInputCommandQueue(in MQDescriptor<int, SynchronizedReadWrite> descriptor);
+
+    /**
+     * Sets the power mode of the given display. The transition must be
+     * complete when this function returns. It is valid to call this function
+     * multiple times with the same power mode.
+     *
+     * All displays must support PowerMode::ON and PowerMode::OFF.  Whether a
+     * display supports PowerMode::DOZE or PowerMode::DOZE_SUSPEND may be
+     * queried using getDozeSupport.
+     *
+     * @param display is the display to which the power mode is set.
+     * @param mode is the new power mode.
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_BAD_PARAMETER when mode was not a valid power mode.
+     * @exception EX_UNSUPPORTED when mode is not supported on this display.
+     */
+    void setPowerMode(long display, PowerMode mode);
+
+    /**
+     * Sets the readback buffer to be filled with the contents of the next
+     * composition performed for this display (i.e., the contents present at the
+     * time of the next validateDisplay/presentDisplay cycle).
+     *
+     * This buffer must have been allocated as described in
+     * getReadbackBufferAttributes and is in the dataspace provided by the same.
+     *
+     * If there is hardware protected content on the display at the time of the next
+     * composition, the area of the readback buffer covered by such content must be
+     * completely black. Any areas of the buffer not covered by such content may
+     * optionally be black as well.
+     *
+     * The release fence file descriptor provided works identically to the one
+     * described for setOutputBuffer.
+     *
+     * This function must not be called between any call to validateDisplay and a
+     * subsequent call to presentDisplay.
+     *
+     * Parameters:
+     * @param display - the display on which to create the layer.
+     * @param buffer - the new readback buffer
+     * @param releaseFence - a sync fence file descriptor as described in setOutputBuffer
+     *
+     * @exception EX_BAD_DISPLAY - an invalid display handle was passed in
+     * @exception EX_BAD_PARAMETER - the new readback buffer handle was invalid
+     *
+     * See also:
+     *   getReadbackBufferAttributes
+     *   getReadbackBufferFence
+     */
+    void setReadbackBuffer(long display, in android.hardware.common.NativeHandle buffer,
+            in ParcelFileDescriptor releaseFence);
+
+    /**
+     * Enables or disables the vsync signal for the given display. Virtual
+     * displays never generate vsync callbacks, and any attempt to enable
+     * vsync for a virtual display though this function must succeed and have
+     * no other effect.
+     *
+     * @param display is the display to which the vsync mode is set.
+     * @param enabled indicates whether to enable or disable vsync
+     * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
+     * @exception EX_BAD_PARAMETER when enabled was an invalid value.
+     */
+    void setVsyncEnabled(long display, boolean enabled);
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/LayerGenericMetadataKey.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/LayerGenericMetadataKey.aidl
new file mode 100644
index 0000000..17704b8
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/LayerGenericMetadataKey.aidl
@@ -0,0 +1,31 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+@VintfStability
+parcelable LayerGenericMetadataKey {
+    /**
+     * Key names must comply with the requirements specified for
+     * getLayerGenericMetadataKeys below
+     */
+    String name;
+    /**
+     * The mandatory flag is defined in the description of
+     * setLayerGenericMetadata above
+     */
+    boolean mandatory;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/LayerRequest.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/LayerRequest.aidl
new file mode 100644
index 0000000..10de558
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/LayerRequest.aidl
@@ -0,0 +1,31 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * Layer requests returned from getDisplayRequests.
+ */
+@VintfStability
+@Backing(type="int")
+enum LayerRequest {
+    /**
+     * The client must clear its target with transparent pixels where
+     * this layer would be. The client may ignore this request if the
+     * layer must be blended.
+     */
+    CLEAR_CLIENT_TARGET = 1 << 0,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/PerFrameMetadata.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/PerFrameMetadata.aidl
new file mode 100644
index 0000000..a6588a4
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/PerFrameMetadata.aidl
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+import android.hardware.graphics.composer3.PerFrameMetadataKey;
+
+/**
+ * PerFrameMetadata
+ * This struct encapsulates float-valued
+ * metadata - key must not be in the list
+ * of keys representing blob-formatted metadata
+ * (see PerFrameMetadataKey)
+ */
+@VintfStability
+parcelable PerFrameMetadata {
+    PerFrameMetadataKey key;
+    float value;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/PerFrameMetadataBlob.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/PerFrameMetadataBlob.aidl
new file mode 100644
index 0000000..a82773c
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/PerFrameMetadataBlob.aidl
@@ -0,0 +1,33 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+import android.hardware.graphics.composer3.PerFrameMetadataKey;
+
+/**
+ * PerFrameMetadataBlob
+ * This struct encapsulates blob
+ * metadata - key must be one of the list of keys
+ * associated with blob-type metadata key
+ * and the blob must adhere to the format specified by
+ * that key (See PerFrameMetadataKey).
+ */
+@VintfStability
+parcelable PerFrameMetadataBlob {
+    PerFrameMetadataKey key;
+    byte[] blob;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/PerFrameMetadataKey.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/PerFrameMetadataKey.aidl
new file mode 100644
index 0000000..b666e6a
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/PerFrameMetadataKey.aidl
@@ -0,0 +1,92 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+import android.hardware.graphics.composer3.PerFrameMetadataKey;
+
+/**
+ * PerFrameMetadataKey
+ *
+ * A set of PerFrameMetadataKey pertains specifically to blob-formatted
+ * metadata (as opposed to float-valued metadata).
+ * The list of keys that represent blobs are:
+ * 1. HDR10_PLUS_SEI
+ */
+@VintfStability
+@Backing(type="int")
+enum PerFrameMetadataKey {
+    /**
+     * SMPTE ST 2084:2014.
+     * Coordinates defined in CIE 1931 xy chromaticity space
+     *
+     *
+     * SMPTE ST 2084:2014
+     */
+    DISPLAY_RED_PRIMARY_X,
+    /**
+     * SMPTE ST 2084:2014
+     */
+    DISPLAY_RED_PRIMARY_Y,
+    /**
+     * SMPTE ST 2084:2014
+     */
+    DISPLAY_GREEN_PRIMARY_X,
+    /**
+     * SMPTE ST 2084:2014
+     */
+    DISPLAY_GREEN_PRIMARY_Y,
+    /**
+     * SMPTE ST 2084:2014
+     */
+    DISPLAY_BLUE_PRIMARY_X,
+    /**
+     * SMPTE ST 2084:2014
+     */
+    DISPLAY_BLUE_PRIMARY_Y,
+    /**
+     * SMPTE ST 2084:2014
+     */
+    WHITE_POINT_X,
+    /**
+     * SMPTE ST 2084:2014
+     */
+    WHITE_POINT_Y,
+    /**
+     * SMPTE ST 2084:2014.
+     * Units: nits
+     * max as defined by ST 2048: 10,000 nits
+     */
+    MAX_LUMINANCE,
+    /**
+     * SMPTE ST 2084:2014
+     */
+    MIN_LUMINANCE,
+    /**
+     * CTA 861.3
+     */
+    MAX_CONTENT_LIGHT_LEVEL,
+    /**
+     * CTA 861.3
+     */
+    MAX_FRAME_AVERAGE_LIGHT_LEVEL,
+    /**
+     * HDR10+ metadata
+     * Specifies a metadata blob adhering to
+     * the ST2094-40 SEI message spec, Version 1.0
+     */
+    HDR10_PLUS_SEI,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/PowerMode.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/PowerMode.aidl
new file mode 100644
index 0000000..2c56933
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/PowerMode.aidl
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+import android.hardware.graphics.composer3.PowerMode;
+
+@VintfStability
+@Backing(type="int")
+enum PowerMode {
+    /**
+     * The display is fully off (blanked).
+     */
+    OFF = 0,
+    /**
+     * These are optional low power modes. getDozeSupport may be called to
+     * determine whether a given display supports these modes.
+     *
+     *
+     * The display is turned on and configured in a low power state that
+     * is suitable for presenting ambient information to the user,
+     * possibly with lower fidelity than ON, but with greater efficiency.
+     */
+    DOZE = 1,
+    /**
+     * The display is configured as in DOZE but may stop applying display
+     * updates from the client. This is effectively a hint to the device
+     * that drawing to the display has been suspended and that the
+     * device must remain on in a low power state and continue
+     * displaying its current contents indefinitely until the power mode
+     * changes.
+     *
+     * This mode may also be used as a signal to enable hardware-based
+     * doze functionality. In this case, the device is free to take over
+     * the display and manage it autonomously to implement a low power
+     * always-on display.
+     */
+    DOZE_SUSPEND = 3,
+    /**
+     * The display is fully on.
+     */
+    ON = 2,
+    /**
+     * The display is configured as in ON but may stop applying display
+     * updates from the client. This is effectively a hint to the device
+     * that drawing to the display has been suspended and that the
+     * device must remain on and continue displaying its current contents
+     * indefinitely until the power mode changes.
+     *
+     * This mode may also be used as a signal to enable hardware-based
+     * functionality to take over the display and manage it autonomously
+     * to implement a low power always-on display.
+     */
+    ON_SUSPEND = 4,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/ReadbackBufferAttributes.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/ReadbackBufferAttributes.aidl
new file mode 100644
index 0000000..8241ddd
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/ReadbackBufferAttributes.aidl
@@ -0,0 +1,23 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+@VintfStability
+parcelable ReadbackBufferAttributes {
+    android.hardware.graphics.common.PixelFormat format;
+    android.hardware.graphics.common.Dataspace dataspace;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/RenderIntent.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/RenderIntent.aidl
new file mode 100644
index 0000000..043b24d
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/RenderIntent.aidl
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * RenderIntent defines the mapping from color mode colors to display colors.
+ *
+ * A render intent must not change how it maps colors when the color mode
+ * changes. That is to say that when a render intent maps color C to color C',
+ * the fact that color C can have different pixel values in different color
+ * modes should not affect the mapping.
+ *
+ * RenderIntent overrides the render intents defined for individual color
+ * modes. It is ignored when the color mode is ColorMode::NATIVE, because
+ * ColorMode::NATIVE colors are already display colors.
+ */
+@VintfStability
+@Backing(type="int")
+enum RenderIntent {
+    /**
+     * Colors in the display gamut are unchanged. Colors out of the display
+     * gamut are hard-clipped.
+     *
+     * This implies that the display must have been calibrated unless
+     * ColorMode::NATIVE is the only supported color mode.
+     */
+    COLORIMETRIC = 0,
+    /**
+     * Enhance colors that are in the display gamut. Colors out of the display
+     * gamut are hard-clipped.
+     *
+     * The enhancement typically picks the biggest standard color space (e.g.
+     * DCI-P3) that is narrower than the display gamut and stretches it to the
+     * display gamut. The stretching is recommended to preserve skin tones.
+     */
+    ENHANCE = 1,
+    /**
+     * Tone map high-dynamic-range colors to the display's dynamic range. The
+     * dynamic range of the colors are communicated separately. After tone
+     * mapping, the mapping to the display gamut is as defined in
+     * COLORIMETRIC.
+     */
+    TONE_MAP_COLORIMETRIC = 2,
+    /**
+     * Tone map high-dynamic-range colors to the display's dynamic range. The
+     * dynamic range of the colors are communicated separately. After tone
+     * mapping, the mapping to the display gamut is as defined in ENHANCE.
+     *
+     * The tone mapping step and the enhancing step must match
+     * TONE_MAP_COLORIMETRIC and ENHANCE respectively when they are also
+     * supported.
+     */
+    TONE_MAP_ENHANCE = 3,
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/VirtualDisplay.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/VirtualDisplay.aidl
new file mode 100644
index 0000000..8bbdfe3
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/VirtualDisplay.aidl
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * The return value from IComposerClient.createVirtualDisplay
+ */
+@VintfStability
+parcelable VirtualDisplay {
+    /**
+     * The newly-created virtual display.
+     */
+    long display;
+    /**
+     * The format of the buffer the device will produce.
+     */
+    android.hardware.graphics.common.PixelFormat format;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/VsyncPeriodChangeConstraints.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/VsyncPeriodChangeConstraints.aidl
new file mode 100644
index 0000000..5ae6f3d
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/VsyncPeriodChangeConstraints.aidl
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * Constraints for changing vsync period.
+ */
+@VintfStability
+parcelable VsyncPeriodChangeConstraints {
+    /**
+     * Time in CLOCK_MONOTONIC after which the vsync period may change
+     * (i.e., the vsync period must not change before this time).
+     */
+    long desiredTimeNanos;
+    /**
+     * If true, requires that the vsync period change must happen seamlessly without
+     * a noticeable visual artifact.
+     */
+    boolean seamlessRequired;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/VsyncPeriodChangeTimeline.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/VsyncPeriodChangeTimeline.aidl
new file mode 100644
index 0000000..13fd051
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/VsyncPeriodChangeTimeline.aidl
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.graphics.composer3;
+
+/**
+ * Timing for a vsync period change.
+ */
+@VintfStability
+parcelable VsyncPeriodChangeTimeline {
+    /**
+     * The time in CLOCK_MONOTONIC when the new display will start to refresh at
+     * the new vsync period.
+     */
+    long newVsyncAppliedTimeNanos;
+    /**
+     * Set to true if the client is required to send a frame to be displayed before
+     * the change can take place.
+     */
+    boolean refreshRequired;
+    /**
+     * The time in CLOCK_MONOTONIC when the client is expected to send the new frame.
+     * Should be ignored if refreshRequired is false.
+     */
+    long refreshTimeNanos;
+}
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/translate-ndk.cpp b/graphics/composer/aidl/android/hardware/graphics/composer3/translate-ndk.cpp
new file mode 100644
index 0000000..a593e90
--- /dev/null
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/translate-ndk.cpp
@@ -0,0 +1,612 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "android/hardware/graphics/composer3/translate-ndk.h"
+
+namespace android::h2a {
+
+static_assert(
+        aidl::android::hardware::graphics::composer3::IComposer::EX_NO_RESOURCES ==
+        static_cast<int32_t>(::android::hardware::graphics::composer::V2_4::Error::NO_RESOURCES));
+
+static_assert(
+        aidl::android::hardware::graphics::composer3::IComposerClient::EX_BAD_CONFIG ==
+        static_cast<int32_t>(::android::hardware::graphics::composer::V2_4::Error::BAD_CONFIG));
+static_assert(
+        aidl::android::hardware::graphics::composer3::IComposerClient::EX_BAD_DISPLAY ==
+        static_cast<int32_t>(::android::hardware::graphics::composer::V2_4::Error::BAD_DISPLAY));
+static_assert(
+        aidl::android::hardware::graphics::composer3::IComposerClient::EX_BAD_LAYER ==
+        static_cast<int32_t>(::android::hardware::graphics::composer::V2_4::Error::BAD_LAYER));
+static_assert(
+        aidl::android::hardware::graphics::composer3::IComposerClient::EX_BAD_PARAMETER ==
+        static_cast<int32_t>(::android::hardware::graphics::composer::V2_4::Error::BAD_PARAMETER));
+static_assert(
+        aidl::android::hardware::graphics::composer3::IComposerClient::EX_NO_RESOURCES ==
+        static_cast<int32_t>(::android::hardware::graphics::composer::V2_4::Error::NO_RESOURCES));
+static_assert(
+        aidl::android::hardware::graphics::composer3::IComposerClient::EX_NOT_VALIDATED ==
+        static_cast<int32_t>(::android::hardware::graphics::composer::V2_4::Error::NOT_VALIDATED));
+static_assert(
+        aidl::android::hardware::graphics::composer3::IComposerClient::EX_UNSUPPORTED ==
+        static_cast<int32_t>(::android::hardware::graphics::composer::V2_4::Error::UNSUPPORTED));
+static_assert(
+        aidl::android::hardware::graphics::composer3::IComposerClient::EX_SEAMLESS_NOT_ALLOWED ==
+        static_cast<int32_t>(
+                ::android::hardware::graphics::composer::V2_4::Error::SEAMLESS_NOT_ALLOWED));
+static_assert(
+        aidl::android::hardware::graphics::composer3::IComposerClient::EX_SEAMLESS_NOT_POSSIBLE ==
+        static_cast<int32_t>(
+                ::android::hardware::graphics::composer::V2_4::Error::SEAMLESS_NOT_POSSIBLE));
+
+static_assert(
+        aidl::android::hardware::graphics::composer3::Capability::INVALID ==
+        static_cast<aidl::android::hardware::graphics::composer3::Capability>(
+                ::android::hardware::graphics::composer::V2_1::IComposer::Capability::INVALID));
+static_assert(aidl::android::hardware::graphics::composer3::Capability::SIDEBAND_STREAM ==
+              static_cast<aidl::android::hardware::graphics::composer3::Capability>(
+                      ::android::hardware::graphics::composer::V2_1::IComposer::Capability::
+                              SIDEBAND_STREAM));
+static_assert(
+        aidl::android::hardware::graphics::composer3::Capability::SKIP_CLIENT_COLOR_TRANSFORM ==
+        static_cast<aidl::android::hardware::graphics::composer3::Capability>(
+                ::android::hardware::graphics::composer::V2_1::IComposer::Capability::
+                        SKIP_CLIENT_COLOR_TRANSFORM));
+static_assert(
+        aidl::android::hardware::graphics::composer3::Capability::PRESENT_FENCE_IS_NOT_RELIABLE ==
+        static_cast<aidl::android::hardware::graphics::composer3::Capability>(
+                ::android::hardware::graphics::composer::V2_1::IComposer::Capability::
+                        PRESENT_FENCE_IS_NOT_RELIABLE));
+
+static_assert(aidl::android::hardware::graphics::composer3::LayerRequest::CLEAR_CLIENT_TARGET ==
+              static_cast<aidl::android::hardware::graphics::composer3::LayerRequest>(
+                      ::android::hardware::graphics::composer::V2_1::IComposerClient::LayerRequest::
+                              CLEAR_CLIENT_TARGET));
+
+static_assert(aidl::android::hardware::graphics::composer3::BlendMode::INVALID ==
+              static_cast<aidl::android::hardware::graphics::composer3::BlendMode>(
+                      ::android::hardware::graphics::composer::V2_1::IComposerClient::BlendMode::
+                              INVALID));
+static_assert(
+        aidl::android::hardware::graphics::composer3::BlendMode::NONE ==
+        static_cast<aidl::android::hardware::graphics::composer3::BlendMode>(
+                ::android::hardware::graphics::composer::V2_1::IComposerClient::BlendMode::NONE));
+static_assert(aidl::android::hardware::graphics::composer3::BlendMode::PREMULTIPLIED ==
+              static_cast<aidl::android::hardware::graphics::composer3::BlendMode>(
+                      ::android::hardware::graphics::composer::V2_1::IComposerClient::BlendMode::
+                              PREMULTIPLIED));
+static_assert(aidl::android::hardware::graphics::composer3::BlendMode::COVERAGE ==
+              static_cast<aidl::android::hardware::graphics::composer3::BlendMode>(
+                      ::android::hardware::graphics::composer::V2_1::IComposerClient::BlendMode::
+                              COVERAGE));
+
+static_assert(aidl::android::hardware::graphics::composer3::Composition::INVALID ==
+              static_cast<aidl::android::hardware::graphics::composer3::Composition>(
+                      ::android::hardware::graphics::composer::V2_1::IComposerClient::Composition::
+                              INVALID));
+static_assert(aidl::android::hardware::graphics::composer3::Composition::CLIENT ==
+              static_cast<aidl::android::hardware::graphics::composer3::Composition>(
+                      ::android::hardware::graphics::composer::V2_1::IComposerClient::Composition::
+                              CLIENT));
+static_assert(aidl::android::hardware::graphics::composer3::Composition::DEVICE ==
+              static_cast<aidl::android::hardware::graphics::composer3::Composition>(
+                      ::android::hardware::graphics::composer::V2_1::IComposerClient::Composition::
+                              DEVICE));
+static_assert(aidl::android::hardware::graphics::composer3::Composition::SOLID_COLOR ==
+              static_cast<aidl::android::hardware::graphics::composer3::Composition>(
+                      ::android::hardware::graphics::composer::V2_1::IComposerClient::Composition::
+                              SOLID_COLOR));
+static_assert(aidl::android::hardware::graphics::composer3::Composition::CURSOR ==
+              static_cast<aidl::android::hardware::graphics::composer3::Composition>(
+                      ::android::hardware::graphics::composer::V2_1::IComposerClient::Composition::
+                              CURSOR));
+static_assert(aidl::android::hardware::graphics::composer3::Composition::SIDEBAND ==
+              static_cast<aidl::android::hardware::graphics::composer3::Composition>(
+                      ::android::hardware::graphics::composer::V2_1::IComposerClient::Composition::
+                              SIDEBAND));
+
+static_assert(aidl::android::hardware::graphics::composer3::DisplayRequest::FLIP_CLIENT_TARGET ==
+              static_cast<aidl::android::hardware::graphics::composer3::DisplayRequest>(
+                      ::android::hardware::graphics::composer::V2_1::IComposerClient::
+                              DisplayRequest::FLIP_CLIENT_TARGET));
+static_assert(aidl::android::hardware::graphics::composer3::DisplayRequest::
+                      WRITE_CLIENT_TARGET_TO_OUTPUT ==
+              static_cast<aidl::android::hardware::graphics::composer3::DisplayRequest>(
+                      ::android::hardware::graphics::composer::V2_1::IComposerClient::
+                              DisplayRequest::WRITE_CLIENT_TARGET_TO_OUTPUT));
+
+static_assert(aidl::android::hardware::graphics::composer3::HandleIndex::EMPTY ==
+              static_cast<aidl::android::hardware::graphics::composer3::HandleIndex>(
+                      ::android::hardware::graphics::composer::V2_1::IComposerClient::HandleIndex::
+                              EMPTY));
+static_assert(aidl::android::hardware::graphics::composer3::HandleIndex::CACHED ==
+              static_cast<aidl::android::hardware::graphics::composer3::HandleIndex>(
+                      ::android::hardware::graphics::composer::V2_1::IComposerClient::HandleIndex::
+                              CACHED));
+
+static_assert(
+        aidl::android::hardware::graphics::composer3::PowerMode::OFF ==
+        static_cast<aidl::android::hardware::graphics::composer3::PowerMode>(
+                ::android::hardware::graphics::composer::V2_2::IComposerClient::PowerMode::OFF));
+static_assert(
+        aidl::android::hardware::graphics::composer3::PowerMode::DOZE ==
+        static_cast<aidl::android::hardware::graphics::composer3::PowerMode>(
+                ::android::hardware::graphics::composer::V2_2::IComposerClient::PowerMode::DOZE));
+static_assert(aidl::android::hardware::graphics::composer3::PowerMode::DOZE_SUSPEND ==
+              static_cast<aidl::android::hardware::graphics::composer3::PowerMode>(
+                      ::android::hardware::graphics::composer::V2_2::IComposerClient::PowerMode::
+                              DOZE_SUSPEND));
+static_assert(
+        aidl::android::hardware::graphics::composer3::PowerMode::ON ==
+        static_cast<aidl::android::hardware::graphics::composer3::PowerMode>(
+                ::android::hardware::graphics::composer::V2_2::IComposerClient::PowerMode::ON));
+static_assert(aidl::android::hardware::graphics::composer3::PowerMode::ON_SUSPEND ==
+              static_cast<aidl::android::hardware::graphics::composer3::PowerMode>(
+                      ::android::hardware::graphics::composer::V2_2::IComposerClient::PowerMode::
+                              ON_SUSPEND));
+
+static_assert(aidl::android::hardware::graphics::composer3::DisplayCapability::INVALID ==
+              static_cast<aidl::android::hardware::graphics::composer3::DisplayCapability>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::
+                              DisplayCapability::INVALID));
+static_assert(aidl::android::hardware::graphics::composer3::DisplayCapability::
+                      SKIP_CLIENT_COLOR_TRANSFORM ==
+              static_cast<aidl::android::hardware::graphics::composer3::DisplayCapability>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::
+                              DisplayCapability::SKIP_CLIENT_COLOR_TRANSFORM));
+static_assert(aidl::android::hardware::graphics::composer3::DisplayCapability::DOZE ==
+              static_cast<aidl::android::hardware::graphics::composer3::DisplayCapability>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::
+                              DisplayCapability::DOZE));
+static_assert(aidl::android::hardware::graphics::composer3::DisplayCapability::BRIGHTNESS ==
+              static_cast<aidl::android::hardware::graphics::composer3::DisplayCapability>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::
+                              DisplayCapability::BRIGHTNESS));
+static_assert(aidl::android::hardware::graphics::composer3::DisplayCapability::PROTECTED_CONTENTS ==
+              static_cast<aidl::android::hardware::graphics::composer3::DisplayCapability>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::
+                              DisplayCapability::PROTECTED_CONTENTS));
+static_assert(
+        aidl::android::hardware::graphics::composer3::DisplayCapability::AUTO_LOW_LATENCY_MODE ==
+        static_cast<aidl::android::hardware::graphics::composer3::DisplayCapability>(
+                ::android::hardware::graphics::composer::V2_4::IComposerClient::DisplayCapability::
+                        AUTO_LOW_LATENCY_MODE));
+
+static_assert(aidl::android::hardware::graphics::composer3::Command::LENGTH_MASK ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              LENGTH_MASK));
+static_assert(aidl::android::hardware::graphics::composer3::Command::OPCODE_SHIFT ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              OPCODE_SHIFT));
+static_assert(aidl::android::hardware::graphics::composer3::Command::OPCODE_MASK ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              OPCODE_MASK));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SELECT_DISPLAY ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SELECT_DISPLAY));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SELECT_LAYER ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SELECT_LAYER));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_ERROR ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_ERROR));
+static_assert(
+        aidl::android::hardware::graphics::composer3::Command::SET_CHANGED_COMPOSITION_TYPES ==
+        static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                        SET_CHANGED_COMPOSITION_TYPES));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_DISPLAY_REQUESTS ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_DISPLAY_REQUESTS));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_PRESENT_FENCE ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_PRESENT_FENCE));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_RELEASE_FENCES ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_RELEASE_FENCES));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_COLOR_TRANSFORM ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_COLOR_TRANSFORM));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_CLIENT_TARGET ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_CLIENT_TARGET));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_OUTPUT_BUFFER ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_OUTPUT_BUFFER));
+static_assert(aidl::android::hardware::graphics::composer3::Command::VALIDATE_DISPLAY ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              VALIDATE_DISPLAY));
+static_assert(aidl::android::hardware::graphics::composer3::Command::ACCEPT_DISPLAY_CHANGES ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              ACCEPT_DISPLAY_CHANGES));
+static_assert(aidl::android::hardware::graphics::composer3::Command::PRESENT_DISPLAY ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              PRESENT_DISPLAY));
+static_assert(aidl::android::hardware::graphics::composer3::Command::PRESENT_OR_VALIDATE_DISPLAY ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              PRESENT_OR_VALIDATE_DISPLAY));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_CURSOR_POSITION ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_CURSOR_POSITION));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_BUFFER ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_BUFFER));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_SURFACE_DAMAGE ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_SURFACE_DAMAGE));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_BLEND_MODE ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_BLEND_MODE));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_COLOR ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_COLOR));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_COMPOSITION_TYPE ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_COMPOSITION_TYPE));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_DATASPACE ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_DATASPACE));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_DISPLAY_FRAME ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_DISPLAY_FRAME));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_PLANE_ALPHA ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_PLANE_ALPHA));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_SIDEBAND_STREAM ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_SIDEBAND_STREAM));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_SOURCE_CROP ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_SOURCE_CROP));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_TRANSFORM ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_TRANSFORM));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_VISIBLE_REGION ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_VISIBLE_REGION));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_Z_ORDER ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_Z_ORDER));
+static_assert(aidl::android::hardware::graphics::composer3::Command::
+                      SET_PRESENT_OR_VALIDATE_DISPLAY_RESULT ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_PRESENT_OR_VALIDATE_DISPLAY_RESULT));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_PER_FRAME_METADATA ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_PER_FRAME_METADATA));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_FLOAT_COLOR ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_FLOAT_COLOR));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_COLOR_TRANSFORM ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_COLOR_TRANSFORM));
+static_assert(
+        aidl::android::hardware::graphics::composer3::Command::SET_LAYER_PER_FRAME_METADATA_BLOBS ==
+        static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                        SET_LAYER_PER_FRAME_METADATA_BLOBS));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_CLIENT_TARGET_PROPERTY ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_CLIENT_TARGET_PROPERTY));
+static_assert(aidl::android::hardware::graphics::composer3::Command::SET_LAYER_GENERIC_METADATA ==
+              static_cast<aidl::android::hardware::graphics::composer3::Command>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Command::
+                              SET_LAYER_GENERIC_METADATA));
+
+static_assert(aidl::android::hardware::graphics::composer3::DisplayAttribute::INVALID ==
+              static_cast<aidl::android::hardware::graphics::composer3::DisplayAttribute>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Attribute::
+                              INVALID));
+static_assert(
+        aidl::android::hardware::graphics::composer3::DisplayAttribute::WIDTH ==
+        static_cast<aidl::android::hardware::graphics::composer3::DisplayAttribute>(
+                ::android::hardware::graphics::composer::V2_4::IComposerClient::Attribute::WIDTH));
+static_assert(
+        aidl::android::hardware::graphics::composer3::DisplayAttribute::HEIGHT ==
+        static_cast<aidl::android::hardware::graphics::composer3::DisplayAttribute>(
+                ::android::hardware::graphics::composer::V2_4::IComposerClient::Attribute::HEIGHT));
+static_assert(aidl::android::hardware::graphics::composer3::DisplayAttribute::VSYNC_PERIOD ==
+              static_cast<aidl::android::hardware::graphics::composer3::DisplayAttribute>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Attribute::
+                              VSYNC_PERIOD));
+static_assert(
+        aidl::android::hardware::graphics::composer3::DisplayAttribute::DPI_X ==
+        static_cast<aidl::android::hardware::graphics::composer3::DisplayAttribute>(
+                ::android::hardware::graphics::composer::V2_4::IComposerClient::Attribute::DPI_X));
+static_assert(
+        aidl::android::hardware::graphics::composer3::DisplayAttribute::DPI_Y ==
+        static_cast<aidl::android::hardware::graphics::composer3::DisplayAttribute>(
+                ::android::hardware::graphics::composer::V2_4::IComposerClient::Attribute::DPI_Y));
+static_assert(aidl::android::hardware::graphics::composer3::DisplayAttribute::CONFIG_GROUP ==
+              static_cast<aidl::android::hardware::graphics::composer3::DisplayAttribute>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::Attribute::
+                              CONFIG_GROUP));
+
+static_assert(aidl::android::hardware::graphics::composer3::DisplayConnectionType::INTERNAL ==
+              static_cast<aidl::android::hardware::graphics::composer3::DisplayConnectionType>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::
+                              DisplayConnectionType::INTERNAL));
+static_assert(aidl::android::hardware::graphics::composer3::DisplayConnectionType::EXTERNAL ==
+              static_cast<aidl::android::hardware::graphics::composer3::DisplayConnectionType>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::
+                              DisplayConnectionType::EXTERNAL));
+
+static_assert(
+        aidl::android::hardware::graphics::composer3::PerFrameMetadataKey::DISPLAY_RED_PRIMARY_X ==
+        static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(
+                ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                        PerFrameMetadataKey::DISPLAY_RED_PRIMARY_X));
+static_assert(
+        aidl::android::hardware::graphics::composer3::PerFrameMetadataKey::DISPLAY_RED_PRIMARY_Y ==
+        static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(
+                ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                        PerFrameMetadataKey::DISPLAY_RED_PRIMARY_Y));
+static_assert(aidl::android::hardware::graphics::composer3::PerFrameMetadataKey::
+                      DISPLAY_GREEN_PRIMARY_X ==
+              static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(
+                      ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                              PerFrameMetadataKey::DISPLAY_GREEN_PRIMARY_X));
+static_assert(aidl::android::hardware::graphics::composer3::PerFrameMetadataKey::
+                      DISPLAY_GREEN_PRIMARY_Y ==
+              static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(
+                      ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                              PerFrameMetadataKey::DISPLAY_GREEN_PRIMARY_Y));
+static_assert(
+        aidl::android::hardware::graphics::composer3::PerFrameMetadataKey::DISPLAY_BLUE_PRIMARY_X ==
+        static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(
+                ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                        PerFrameMetadataKey::DISPLAY_BLUE_PRIMARY_X));
+static_assert(
+        aidl::android::hardware::graphics::composer3::PerFrameMetadataKey::DISPLAY_BLUE_PRIMARY_Y ==
+        static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(
+                ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                        PerFrameMetadataKey::DISPLAY_BLUE_PRIMARY_Y));
+static_assert(aidl::android::hardware::graphics::composer3::PerFrameMetadataKey::WHITE_POINT_X ==
+              static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(
+                      ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                              PerFrameMetadataKey::WHITE_POINT_X));
+static_assert(aidl::android::hardware::graphics::composer3::PerFrameMetadataKey::WHITE_POINT_Y ==
+              static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(
+                      ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                              PerFrameMetadataKey::WHITE_POINT_Y));
+static_assert(aidl::android::hardware::graphics::composer3::PerFrameMetadataKey::MAX_LUMINANCE ==
+              static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(
+                      ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                              PerFrameMetadataKey::MAX_LUMINANCE));
+static_assert(aidl::android::hardware::graphics::composer3::PerFrameMetadataKey::MIN_LUMINANCE ==
+              static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(
+                      ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                              PerFrameMetadataKey::MIN_LUMINANCE));
+static_assert(aidl::android::hardware::graphics::composer3::PerFrameMetadataKey::
+                      MAX_CONTENT_LIGHT_LEVEL ==
+              static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(
+                      ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                              PerFrameMetadataKey::MAX_CONTENT_LIGHT_LEVEL));
+static_assert(aidl::android::hardware::graphics::composer3::PerFrameMetadataKey::
+                      MAX_FRAME_AVERAGE_LIGHT_LEVEL ==
+              static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(
+                      ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                              PerFrameMetadataKey::MAX_FRAME_AVERAGE_LIGHT_LEVEL));
+static_assert(aidl::android::hardware::graphics::composer3::PerFrameMetadataKey::HDR10_PLUS_SEI ==
+              static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(
+                      ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                              PerFrameMetadataKey::HDR10_PLUS_SEI));
+
+static_assert(
+        aidl::android::hardware::graphics::composer3::FormatColorComponent::FORMAT_COMPONENT_0 ==
+        static_cast<aidl::android::hardware::graphics::composer3::FormatColorComponent>(
+                ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                        FormatColorComponent::FORMAT_COMPONENT_0));
+static_assert(
+        aidl::android::hardware::graphics::composer3::FormatColorComponent::FORMAT_COMPONENT_1 ==
+        static_cast<aidl::android::hardware::graphics::composer3::FormatColorComponent>(
+                ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                        FormatColorComponent::FORMAT_COMPONENT_1));
+static_assert(
+        aidl::android::hardware::graphics::composer3::FormatColorComponent::FORMAT_COMPONENT_2 ==
+        static_cast<aidl::android::hardware::graphics::composer3::FormatColorComponent>(
+                ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                        FormatColorComponent::FORMAT_COMPONENT_2));
+static_assert(
+        aidl::android::hardware::graphics::composer3::FormatColorComponent::FORMAT_COMPONENT_3 ==
+        static_cast<aidl::android::hardware::graphics::composer3::FormatColorComponent>(
+                ::android::hardware::graphics::composer::V2_3::IComposerClient::
+                        FormatColorComponent::FORMAT_COMPONENT_3));
+
+static_assert(
+        aidl::android::hardware::graphics::composer3::ContentType::NONE ==
+        static_cast<aidl::android::hardware::graphics::composer3::ContentType>(
+                ::android::hardware::graphics::composer::V2_4::IComposerClient::ContentType::NONE));
+static_assert(aidl::android::hardware::graphics::composer3::ContentType::GRAPHICS ==
+              static_cast<aidl::android::hardware::graphics::composer3::ContentType>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::ContentType::
+                              GRAPHICS));
+static_assert(aidl::android::hardware::graphics::composer3::ContentType::PHOTO ==
+              static_cast<aidl::android::hardware::graphics::composer3::ContentType>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::ContentType::
+                              PHOTO));
+static_assert(aidl::android::hardware::graphics::composer3::ContentType::CINEMA ==
+              static_cast<aidl::android::hardware::graphics::composer3::ContentType>(
+                      ::android::hardware::graphics::composer::V2_4::IComposerClient::ContentType::
+                              CINEMA));
+static_assert(
+        aidl::android::hardware::graphics::composer3::ContentType::GAME ==
+        static_cast<aidl::android::hardware::graphics::composer3::ContentType>(
+                ::android::hardware::graphics::composer::V2_4::IComposerClient::ContentType::GAME));
+
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_4::VsyncPeriodChangeTimeline& in,
+        aidl::android::hardware::graphics::composer3::VsyncPeriodChangeTimeline* out) {
+    out->newVsyncAppliedTimeNanos = static_cast<int64_t>(in.newVsyncAppliedTimeNanos);
+    out->refreshRequired = static_cast<bool>(in.refreshRequired);
+    out->refreshTimeNanos = static_cast<int64_t>(in.refreshTimeNanos);
+    return true;
+}
+
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_1::IComposerClient::Rect& in,
+        aidl::android::hardware::graphics::common::Rect* out) {
+    out->left = static_cast<int32_t>(in.left);
+    out->top = static_cast<int32_t>(in.top);
+    out->right = static_cast<int32_t>(in.right);
+    out->bottom = static_cast<int32_t>(in.bottom);
+    return true;
+}
+
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_1::IComposerClient::FRect& in,
+        aidl::android::hardware::graphics::common::FRect* out) {
+    out->left = static_cast<float>(in.left);
+    out->top = static_cast<float>(in.top);
+    out->right = static_cast<float>(in.right);
+    out->bottom = static_cast<float>(in.bottom);
+    return true;
+}
+
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_1::IComposerClient::Color& in,
+        aidl::android::hardware::graphics::composer3::Color* out) {
+    // FIXME This requires conversion between signed and unsigned. Change this if it doesn't suit
+    // your needs.
+    if (in.r > std::numeric_limits<int8_t>::max() || in.r < 0) {
+        return false;
+    }
+    out->r = static_cast<int8_t>(in.r);
+    // FIXME This requires conversion between signed and unsigned. Change this if it doesn't suit
+    // your needs.
+    if (in.g > std::numeric_limits<int8_t>::max() || in.g < 0) {
+        return false;
+    }
+    out->g = static_cast<int8_t>(in.g);
+    // FIXME This requires conversion between signed and unsigned. Change this if it doesn't suit
+    // your needs.
+    if (in.b > std::numeric_limits<int8_t>::max() || in.b < 0) {
+        return false;
+    }
+    out->b = static_cast<int8_t>(in.b);
+    // FIXME This requires conversion between signed and unsigned. Change this if it doesn't suit
+    // your needs.
+    if (in.a > std::numeric_limits<int8_t>::max() || in.a < 0) {
+        return false;
+    }
+    out->a = static_cast<int8_t>(in.a);
+    return true;
+}
+
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_3::IComposerClient::PerFrameMetadata& in,
+        aidl::android::hardware::graphics::composer3::PerFrameMetadata* out) {
+    out->key =
+            static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(in.key);
+    out->value = static_cast<float>(in.value);
+    return true;
+}
+
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_2::IComposerClient::FloatColor& in,
+        aidl::android::hardware::graphics::composer3::FloatColor* out) {
+    out->r = static_cast<float>(in.r);
+    out->g = static_cast<float>(in.g);
+    out->b = static_cast<float>(in.b);
+    out->a = static_cast<float>(in.a);
+    return true;
+}
+
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_3::IComposerClient::PerFrameMetadataBlob&
+                in,
+        aidl::android::hardware::graphics::composer3::PerFrameMetadataBlob* out) {
+    out->key =
+            static_cast<aidl::android::hardware::graphics::composer3::PerFrameMetadataKey>(in.key);
+    {
+        size_t size = in.blob.size();
+        for (size_t i = 0; i < size; i++) {
+            // FIXME This requires conversion between signed and unsigned. Change this if it doesn't
+            // suit your needs.
+            if (in.blob[i] > std::numeric_limits<int8_t>::max() || in.blob[i] < 0) {
+                return false;
+            }
+            out->blob.push_back(static_cast<int8_t>(in.blob[i]));
+        }
+    }
+    return true;
+}
+
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_4::IComposerClient::
+                VsyncPeriodChangeConstraints& in,
+        aidl::android::hardware::graphics::composer3::VsyncPeriodChangeConstraints* out) {
+    out->desiredTimeNanos = static_cast<int64_t>(in.desiredTimeNanos);
+    out->seamlessRequired = static_cast<bool>(in.seamlessRequired);
+    return true;
+}
+
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_4::IComposerClient::ClientTargetProperty&
+                in,
+        aidl::android::hardware::graphics::composer3::ClientTargetProperty* out) {
+    out->pixelFormat =
+            static_cast<aidl::android::hardware::graphics::common::PixelFormat>(in.pixelFormat);
+    out->dataspace =
+            static_cast<aidl::android::hardware::graphics::common::Dataspace>(in.dataspace);
+    return true;
+}
+
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_4::IComposerClient::
+                LayerGenericMetadataKey& in,
+        aidl::android::hardware::graphics::composer3::LayerGenericMetadataKey* out) {
+    out->name = in.name;
+    out->mandatory = static_cast<bool>(in.mandatory);
+    return true;
+}
+
+}  // namespace android::h2a
\ No newline at end of file
diff --git a/graphics/composer/aidl/include/android/hardware/graphics/composer3/translate-ndk.h b/graphics/composer/aidl/include/android/hardware/graphics/composer3/translate-ndk.h
new file mode 100644
index 0000000..c892863
--- /dev/null
+++ b/graphics/composer/aidl/include/android/hardware/graphics/composer3/translate-ndk.h
@@ -0,0 +1,90 @@
+/**
+ * Copyright (c) 2021, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <limits>
+#include "aidl/android/hardware/graphics/common/FRect.h"
+#include "aidl/android/hardware/graphics/common/Rect.h"
+#include "aidl/android/hardware/graphics/composer3/BlendMode.h"
+#include "aidl/android/hardware/graphics/composer3/Capability.h"
+#include "aidl/android/hardware/graphics/composer3/ClientTargetProperty.h"
+#include "aidl/android/hardware/graphics/composer3/Color.h"
+#include "aidl/android/hardware/graphics/composer3/Command.h"
+#include "aidl/android/hardware/graphics/composer3/Composition.h"
+#include "aidl/android/hardware/graphics/composer3/ContentType.h"
+#include "aidl/android/hardware/graphics/composer3/DisplayAttribute.h"
+#include "aidl/android/hardware/graphics/composer3/DisplayCapability.h"
+#include "aidl/android/hardware/graphics/composer3/DisplayConnectionType.h"
+#include "aidl/android/hardware/graphics/composer3/DisplayRequest.h"
+#include "aidl/android/hardware/graphics/composer3/FloatColor.h"
+#include "aidl/android/hardware/graphics/composer3/FormatColorComponent.h"
+#include "aidl/android/hardware/graphics/composer3/HandleIndex.h"
+#include "aidl/android/hardware/graphics/composer3/IComposer.h"
+#include "aidl/android/hardware/graphics/composer3/LayerGenericMetadataKey.h"
+#include "aidl/android/hardware/graphics/composer3/LayerRequest.h"
+#include "aidl/android/hardware/graphics/composer3/PerFrameMetadata.h"
+#include "aidl/android/hardware/graphics/composer3/PerFrameMetadataBlob.h"
+#include "aidl/android/hardware/graphics/composer3/PerFrameMetadataKey.h"
+#include "aidl/android/hardware/graphics/composer3/PowerMode.h"
+#include "aidl/android/hardware/graphics/composer3/VsyncPeriodChangeConstraints.h"
+#include "aidl/android/hardware/graphics/composer3/VsyncPeriodChangeTimeline.h"
+#include "android/hardware/graphics/composer/2.1/IComposer.h"
+#include "android/hardware/graphics/composer/2.1/IComposerCallback.h"
+#include "android/hardware/graphics/composer/2.1/IComposerClient.h"
+#include "android/hardware/graphics/composer/2.2/IComposerClient.h"
+#include "android/hardware/graphics/composer/2.3/IComposerClient.h"
+#include "android/hardware/graphics/composer/2.4/IComposerClient.h"
+#include "android/hardware/graphics/composer/2.4/types.h"
+
+namespace android::h2a {
+
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_4::VsyncPeriodChangeTimeline& in,
+        aidl::android::hardware::graphics::composer3::VsyncPeriodChangeTimeline* out);
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_1::IComposerClient::Rect& in,
+        aidl::android::hardware::graphics::common::Rect* out);
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_1::IComposerClient::FRect& in,
+        aidl::android::hardware::graphics::common::FRect* out);
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_1::IComposerClient::Color& in,
+        aidl::android::hardware::graphics::composer3::Color* out);
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_3::IComposerClient::PerFrameMetadata& in,
+        aidl::android::hardware::graphics::composer3::PerFrameMetadata* out);
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_2::IComposerClient::FloatColor& in,
+        aidl::android::hardware::graphics::composer3::FloatColor* out);
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_3::IComposerClient::PerFrameMetadataBlob&
+                in,
+        aidl::android::hardware::graphics::composer3::PerFrameMetadataBlob* out);
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_4::IComposerClient::
+                VsyncPeriodChangeConstraints& in,
+        aidl::android::hardware::graphics::composer3::VsyncPeriodChangeConstraints* out);
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_4::IComposerClient::ClientTargetProperty&
+                in,
+        aidl::android::hardware::graphics::composer3::ClientTargetProperty* out);
+__attribute__((warn_unused_result)) bool translate(
+        const ::android::hardware::graphics::composer::V2_4::IComposerClient::
+                LayerGenericMetadataKey& in,
+        aidl::android::hardware::graphics::composer3::LayerGenericMetadataKey* out);
+
+}  // namespace android::h2a
diff --git a/graphics/mapper/4.0/vts/functional/Android.bp b/graphics/mapper/4.0/vts/functional/Android.bp
index 032bc0f..65bc380 100644
--- a/graphics/mapper/4.0/vts/functional/Android.bp
+++ b/graphics/mapper/4.0/vts/functional/Android.bp
@@ -28,7 +28,7 @@
     defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalGraphicsMapperV4_0TargetTest.cpp"],
     static_libs: [
-        "android.hardware.graphics.common-V2-ndk",
+        "android.hardware.graphics.common-V3-ndk",
         "[email protected]",
         "libgralloctypes",
         "libsync",
diff --git a/neuralnetworks/aidl/Android.bp b/neuralnetworks/aidl/Android.bp
index 3a69936..a31157a 100644
--- a/neuralnetworks/aidl/Android.bp
+++ b/neuralnetworks/aidl/Android.bp
@@ -17,7 +17,7 @@
     stability: "vintf",
     imports: [
         "android.hardware.common-V2",
-        "android.hardware.graphics.common-V2",
+        "android.hardware.graphics.common-V3",
     ],
     backend: {
         java: {
diff --git a/neuralnetworks/aidl/utils/Android.bp b/neuralnetworks/aidl/utils/Android.bp
index 508b1ea..3c80d75 100644
--- a/neuralnetworks/aidl/utils/Android.bp
+++ b/neuralnetworks/aidl/utils/Android.bp
@@ -31,7 +31,7 @@
     export_include_dirs: ["include"],
     cflags: ["-Wthread-safety"],
     static_libs: [
-        "android.hardware.graphics.common-V2-ndk",
+        "android.hardware.graphics.common-V3-ndk",
         "libaidlcommonsupport",
         "libarect",
         "neuralnetworks_types",
@@ -57,7 +57,7 @@
     ],
     static_libs: [
         "android.hardware.common-V2-ndk",
-        "android.hardware.graphics.common-V2-ndk",
+        "android.hardware.graphics.common-V3-ndk",
         "android.hardware.neuralnetworks-V1-ndk",
         "libaidlcommonsupport",
         "libgmock",
diff --git a/neuralnetworks/aidl/vts/functional/Android.bp b/neuralnetworks/aidl/vts/functional/Android.bp
index 8fa9756..40da1fd 100644
--- a/neuralnetworks/aidl/vts/functional/Android.bp
+++ b/neuralnetworks/aidl/vts/functional/Android.bp
@@ -50,7 +50,7 @@
     ],
     static_libs: [
         "android.hardware.common-V2-ndk",
-        "android.hardware.graphics.common-V2-ndk",
+        "android.hardware.graphics.common-V3-ndk",
         "android.hardware.neuralnetworks-V1-ndk",
         "[email protected]",
         "[email protected]",