From: ivanmeler Date: Thu, 7 Jul 2022 10:32:53 +0000 (+0000) Subject: DNM: disable hwc with a shim X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6d6dd148c45cf3a8721b302016044218618b3b59;p=GitHub%2Fexynos8895%2Fandroid_device_samsung_universal8895-common.git DNM: disable hwc with a shim --- diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index d7c65af..6a93f39 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -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) diff --git a/device-common.mk b/device-common.mk index 8f483c6..32b5a87 100644 --- a/device-common.mk +++ b/device-common.mk @@ -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 index 0000000..7d92c8c --- /dev/null +++ b/shims/libexynosdisplay/Android.mk @@ -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 index 0000000..1d759a5 --- /dev/null +++ b/shims/libexynosdisplay/libexynosdisplay.c @@ -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 +#include + +//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; +}