DNM: disable hwc with a shim lineage-18.1
authorivanmeler <i_ivan@windowslive.com>
Thu, 7 Jul 2022 10:32:53 +0000 (10:32 +0000)
committerivanmeler <i_ivan@windowslive.com>
Sat, 9 Sep 2023 08:30:40 +0000 (08:30 +0000)
BoardConfigCommon.mk
device-common.mk
shims/libexynosdisplay/Android.mk [new file with mode: 0644]
shims/libexynosdisplay/libexynosdisplay.c [new file with mode: 0644]

index d7c65afb0269943bbe16a84bd56d2bf73e01b371..6a93f393b2214573f7b397b819c350659ec0ddb9 100644 (file)
@@ -147,7 +147,11 @@ ENABLE_VENDOR_RIL_SERVICE := true
 # Shims
 TARGET_LD_SHIM_LIBS += \
     /system/lib/libexynoscamera.so|/vendor/lib/libexynoscamera_shim.so \
-    /system/lib64/libexynoscamera.so|/vendor/lib64/libexynoscamera_shim.so
+    /system/lib64/libexynoscamera.so|/vendor/lib64/libexynoscamera_shim.so \
+    /system/vendor/lib64/libexynosdisplay.so|/system/vendor/lib64/libexynosdisplay_shim.so \
+    /system/vendor/lib/libexynosdisplay.so|/system/vendor/lib/libexynosdisplay_shim.so \
+    /system/vendor/lib64/hw/hwcomposer.exynos5.so|/system/vendor/lib64/libexynosdisplay_shim.so \
+    /system/vendor/lib/hw/hwcomposer.exynos5.so|/system/vendor/lib/libexynosdisplay_shim.so
 
 # Soong namespaces
 PRODUCT_SOONG_NAMESPACES += $(LOCAL_PATH)
index 8f483c6d289d13c6193db5dbe2f5bf389e15c613..32b5a8797f30d6af8f60d0524b1d5e39aa1ed48d 100644 (file)
@@ -280,7 +280,8 @@ $(call inherit-product, frameworks/native/build/phone-xhdpi-4096-dalvik-heap.mk)
 # Shims
 PRODUCT_PACKAGES += \
     libexynoscamera_shim \
-    libmemset
+    libmemset \
+    libexynosdisplay_shim
 
 # stagefright
 PRODUCT_PACKAGES += \
diff --git a/shims/libexynosdisplay/Android.mk b/shims/libexynosdisplay/Android.mk
new file mode 100644 (file)
index 0000000..7d92c8c
--- /dev/null
@@ -0,0 +1,26 @@
+#
+# Copyright (C) 2017 The LineageOS 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := libexynosdisplay.c
+LOCAL_SHARED_LIBRARIES := liblog
+LOCAL_MODULE := libexynosdisplay_shim
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_VENDOR_MODULE := true
+include $(BUILD_SHARED_LIBRARY)
diff --git a/shims/libexynosdisplay/libexynosdisplay.c b/shims/libexynosdisplay/libexynosdisplay.c
new file mode 100644 (file)
index 0000000..1d759a5
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2017 The LineageOS 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.
+ */
+
+#define LOG_TAG "libexynosdisplay_shim"
+#define LOG_NDEBUG 1
+
+#include <cutils/log.h>
+#include <cutils/native_handle.h>
+
+//int32_t ExynosLayer::setLayerBuffer(buffer_handle_t buffer, int32_t acquireFence)
+bool _ZN11ExynosLayer14setLayerBufferEPK13native_handlei(buffer_handle_t buffer, int32_t acquireFence)
+{
+    ALOGV("SHIM: hijacking %s!", __func__);
+
+    /* Force this check to always return false */
+    return 0;
+}