minigbm: Andorid.bp: Add intel varients to gralloc4
gralloc4 built with libminigbm_gralloc.so and gralloc0
with libminigbm_gralloc_intel.so, causes mismatch hence
leading to get_buffer failure during CTS tests.
The commit helps to have same instance of default libraries
shared between gralloc0 and gralloc4 and fixes get_buffer
failure on intel platform.
Change-Id: I82e8b942f4a817c97cbc58efc64d55fd960767af
Signed-off-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
diff --git a/cros_gralloc/gralloc4/Android.bp b/cros_gralloc/gralloc4/Android.bp
index b9d94a9..c9de525 100644
--- a/cros_gralloc/gralloc4/Android.bp
+++ b/cros_gralloc/gralloc4/Android.bp
@@ -80,6 +80,23 @@
init_rc: ["android.hardware.graphics.allocator@4.0-service.minigbm_msm.rc"],
}
+cc_binary {
+ name: "android.hardware.graphics.allocator@4.0-service.minigbm_intel",
+ defaults: ["minigbm_gralloc4_allocator_defaults"],
+ shared_libs: ["libminigbm_gralloc_intel"],
+ vintf_fragments: ["android.hardware.graphics.allocator@4.0.xml"],
+ init_rc: ["android.hardware.graphics.allocator@4.0-service.minigbm_intel.rc"],
+ enabled: false,
+ arch: {
+ x86: {
+ enabled: true,
+ },
+ x86_64: {
+ enabled: true,
+ },
+ },
+}
+
cc_library_shared {
name: "android.hardware.graphics.mapper@4.0-impl.minigbm",
defaults: ["minigbm_gralloc4_common_defaults"],
@@ -95,3 +112,20 @@
vintf_fragments: ["android.hardware.graphics.mapper@4.0.xml"],
srcs: [":minigbm_gralloc4_mapper_files"],
}
+
+cc_library_shared {
+ name: "android.hardware.graphics.mapper@4.0-impl.minigbm_intel",
+ defaults: ["minigbm_gralloc4_common_defaults"],
+ shared_libs: ["libminigbm_gralloc_intel"],
+ vintf_fragments: ["android.hardware.graphics.mapper@4.0.xml"],
+ srcs: [":minigbm_gralloc4_mapper_files"],
+ enabled: false,
+ arch: {
+ x86: {
+ enabled: true,
+ },
+ x86_64: {
+ enabled: true,
+ },
+ },
+}
diff --git a/cros_gralloc/gralloc4/android.hardware.graphics.allocator@4.0-service.minigbm_intel.rc b/cros_gralloc/gralloc4/android.hardware.graphics.allocator@4.0-service.minigbm_intel.rc
new file mode 100644
index 0000000..9a3512f
--- /dev/null
+++ b/cros_gralloc/gralloc4/android.hardware.graphics.allocator@4.0-service.minigbm_intel.rc
@@ -0,0 +1,24 @@
+#
+# Copyright 2020 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.
+#
+
+service vendor.graphics.allocator-4-0 /vendor/bin/hw/android.hardware.graphics.allocator@4.0-service.minigbm_intel
+ interface android.hardware.graphics.allocator@4.0::IAllocator default
+ class hal animation
+ user system
+ group graphics drmrpc
+ capabilities SYS_NICE
+ onrestart restart surfaceflinger
+ task_profiles ServiceCapacityLow