gta4xl-common: Use linaro BSP

Change-Id: I67c078e3ea2fab1da19029ca3e97ce968cad77ad
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index 51057ca..6ea0c07 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -58,6 +58,7 @@
 BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOTIMG_HEADER_VERSION)
 
 ## Display
+BOARD_MINIMUM_DISPLAY_BRIGHTNESS := 1
 TARGET_SCREEN_DENSITY := 240
 
 ## Dynamic Partitions
@@ -140,6 +141,7 @@
 TARGET_BOARD_PLATFORM := universal9611
 TARGET_BOOTLOADER_BOARD_NAME := exynos9611
 TARGET_SOC := exynos9611
+include hardware/samsung_slsi-linaro/config/BoardConfig9611.mk
 
 ## Properties
 TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.prop
diff --git a/common.mk b/common.mk
index d87821a..a71e242 100644
--- a/common.mk
+++ b/common.mk
@@ -65,6 +65,9 @@
     android.hardware.camera.provider@2.5-service_64 \
     libsensorndkbridge
 
+PRODUCT_PACKAGES += \
+    libhwjpeg
+
 # Charger
 PRODUCT_PACKAGES += \
     charger_res_images_vendor
@@ -77,11 +80,12 @@
 PRODUCT_PACKAGES += \
     android.hardware.graphics.allocator@2.0-impl:64 \
     android.hardware.graphics.allocator@2.0-service \
-    android.hardware.graphics.composer@2.2-service \
     android.hardware.graphics.mapper@2.0-impl-2.1
 
 PRODUCT_PACKAGES += \
-    libdrm.vendor:64
+    android.hardware.composer.hwc3-service.slsi \
+    gralloc.exynos9611 \
+    libion
 
 # Dynamic Partitions
 PRODUCT_USE_DYNAMIC_PARTITIONS := true
@@ -149,10 +153,6 @@
     android.hardware.keymaster@4.0-service.samsung \
     libkeymaster4_1support.vendor:64
 
-# Lights
-PRODUCT_PACKAGES += \
-    android.hardware.light-service.samsung
-
 # Media
 PRODUCT_COPY_FILES += \
     frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
@@ -165,7 +165,20 @@
 
 # OMX
 PRODUCT_PACKAGES += \
-    libepicoperator
+    libstagefrighthw \
+    libExynosOMX_Core \
+    libExynosOMX_Resourcemanager \
+    libOMX.Exynos.AVC.Decoder \
+    libOMX.Exynos.AVC.Encoder \
+    libOMX.Exynos.HEVC.Decoder \
+    libOMX.Exynos.HEVC.Encoder \
+    libOMX.Exynos.MPEG4.Decoder \
+    libOMX.Exynos.MPEG4.Encoder \
+    libOMX.Exynos.VP8.Decoder \
+    libOMX.Exynos.VP8.Encoder \
+    libOMX.Exynos.VP9.Decoder \
+    libOMX.Exynos.VP9.Encoder \
+    libOMX.Exynos.WMV.Decoder
 
 # Overlays
 DEVICE_PACKAGE_OVERLAYS += $(COMMON_PATH)/overlay
diff --git a/include/samsung_lights.h b/include/samsung_lights.h
deleted file mode 100644
index f37fec9..0000000
--- a/include/samsung_lights.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2020-2022 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.
- */
-
-#pragma once
-
-/*
- * Board specific nodes
- *
- * If your kernel exposes these controls in another place, you can either
- * symlink to the locations given here, or override this header in your
- * device tree.
- */
-#define PANEL_BRIGHTNESS_NODE "/sys/class/backlight/panel/brightness"
-#define PANEL_MAX_BRIGHTNESS_NODE "/sys/class/backlight/panel/max_brightness"
diff --git a/lineage.dependencies b/lineage.dependencies
index 04e93f6..572019c 100644
--- a/lineage.dependencies
+++ b/lineage.dependencies
@@ -12,6 +12,26 @@
         "target_path": "hardware/samsung_slsi/libbt"
     },
     {
+        "repository": "android_hardware_samsung_slsi-linaro_config",
+        "target_path": "hardware/samsung_slsi-linaro/config"
+    },
+    {
+        "repository": "android_hardware_samsung_slsi-linaro_exynos",
+        "target_path": "hardware/samsung_slsi-linaro/exynos"
+    },
+    {
+        "repository": "android_hardware_samsung_slsi-linaro_exynos5",
+        "target_path": "hardware/samsung_slsi-linaro/exynos5"
+    },
+    {
+        "repository": "android_hardware_samsung_slsi-linaro_graphics",
+        "target_path": "hardware/samsung_slsi-linaro/graphics"
+    },
+    {
+        "repository": "android_hardware_samsung_slsi-linaro_openmax",
+        "target_path": "hardware/samsung_slsi-linaro/openmax"
+    },
+    {
         "repository": "android_hardware_samsung_slsi_scsc_wifibt_wifi_hal",
         "target_path": "hardware/samsung_slsi/scsc_wifibt/wifi_hal"
     },
diff --git a/manifest.xml b/manifest.xml
index c412a31..029da7c 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -66,7 +66,7 @@
     <hal format="hidl">
         <name>android.hardware.graphics.composer</name>
         <transport>hwbinder</transport>
-        <version>2.2</version>
+        <version>2.4</version>
         <interface>
             <name>IComposer</name>
             <instance>default</instance>
diff --git a/proprietary-files.txt b/proprietary-files.txt
index eae8874..f6e0d94 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -46,18 +46,10 @@
 
 ## Camera dependencies
 -vendor/lib/libSEF.quram.so
--vendor/lib/libacryl.so
--vendor/lib/libacryl_plugin_slsi_hdr10.so
--vendor/lib/libcsc.so
--vendor/lib/libgiantmscl.so
--vendor/lib/libhwjpeg.so
 -vendor/lib/libsensorlistener.so
 -vendor/lib/libuniapi.so
 -vendor/lib/libuniplugin.so
 -vendor/lib64/libSEF.quram.so
--vendor/lib64/libcsc.so
--vendor/lib64/libgiantmscl.so
--vendor/lib64/libhwjpeg.so
 -vendor/lib64/libsensorlistener.so
 -vendor/lib64/libuniapi.so
 -vendor/lib64/libuniplugin.so
@@ -94,10 +86,6 @@
 -vendor/lib/hw/gatekeeper.exynos9611.so
 -vendor/lib64/hw/gatekeeper.exynos9611.so
 
-## Gralloc
--vendor/lib/hw/gralloc.exynos9611.so
--vendor/lib64/hw/gralloc.exynos9611.so
-
 ## GPS
 -vendor/bin/hw/vendor.samsung.hardware.gnss@2.0-service
 vendor/etc/init/vendor.samsung.hardware.gnss@2.0-service.rc
@@ -105,66 +93,12 @@
 
 ## Graphics
 -vendor/lib/egl/libGLES_mali.so
--vendor/lib/libion_exynos.so
 -vendor/lib64/egl/libGLES_mali.so
--vendor/lib64/libion_exynos.so
-
-## HWC
--vendor/lib64/hw/hwcomposer.exynos9611.so
--vendor/lib/libExynosHWCService.so
--vendor/lib/libGrallocWrapper.so
--vendor/lib/libdrmresource.so
--vendor/lib/libexynosdisplay.so
--vendor/lib/libexynosgraphicbuffer.so
--vendor/lib/libexynosscaler.so
--vendor/lib/libexynosutils.so
--vendor/lib/libexynosv4l2.so
--vendor/lib/hw/hwcomposer.exynos9611.so
--vendor/lib64/libExynosHWCService.so
--vendor/lib64/libGrallocWrapper.so
--vendor/lib64/libacryl.so
--vendor/lib64/libacryl_plugin_slsi_hdr10.so
--vendor/lib64/libdrmresource.so
--vendor/lib64/libexynosdisplay.so
--vendor/lib64/libexynosgraphicbuffer.so
--vendor/lib64/libexynosscaler.so
--vendor/lib64/libexynosutils.so
--vendor/lib64/libexynosv4l2.so
 
 ## Keymaster
 -vendor/lib64/libkeymaster_helper.so
 -vendor/lib64/libskeymaster4device.so
 
-## OMX
--vendor/lib/libstagefrighthw.so
--vendor/lib/libExynosOMX_Core.so
--vendor/lib/libExynosOMX_Resourcemanager.so
--vendor/lib/omx/libOMX.Exynos.AVC.Decoder.so
--vendor/lib/omx/libOMX.Exynos.AVC.Encoder.so
--vendor/lib/omx/libOMX.Exynos.HEVC.Decoder.so
--vendor/lib/omx/libOMX.Exynos.HEVC.Encoder.so
--vendor/lib/omx/libOMX.Exynos.MPEG4.Decoder.so
--vendor/lib/omx/libOMX.Exynos.MPEG4.Encoder.so
--vendor/lib/omx/libOMX.Exynos.VP8.Decoder.so
--vendor/lib/omx/libOMX.Exynos.VP8.Encoder.so
--vendor/lib/omx/libOMX.Exynos.VP9.Decoder.so
--vendor/lib/omx/libOMX.Exynos.VP9.Encoder.so
--vendor/lib/omx/libOMX.Exynos.WMV.Decoder.so
--vendor/lib64/libstagefrighthw.so
--vendor/lib64/libExynosOMX_Core.so
--vendor/lib64/libExynosOMX_Resourcemanager.so
--vendor/lib64/omx/libOMX.Exynos.AVC.Decoder.so
--vendor/lib64/omx/libOMX.Exynos.AVC.Encoder.so
--vendor/lib64/omx/libOMX.Exynos.HEVC.Decoder.so
--vendor/lib64/omx/libOMX.Exynos.HEVC.Encoder.so
--vendor/lib64/omx/libOMX.Exynos.MPEG4.Decoder.so
--vendor/lib64/omx/libOMX.Exynos.MPEG4.Encoder.so
--vendor/lib64/omx/libOMX.Exynos.VP8.Decoder.so
--vendor/lib64/omx/libOMX.Exynos.VP8.Encoder.so
--vendor/lib64/omx/libOMX.Exynos.VP9.Decoder.so
--vendor/lib64/omx/libOMX.Exynos.VP9.Encoder.so
--vendor/lib64/omx/libOMX.Exynos.WMV.Decoder.so
-
 ## RIL
 -vendor/lib/libaudio-ril.so
 -vendor/lib/libsecril-client.so;MODULE=libsecril-client.exynos9611
diff --git a/sepolicy/vendor/hal_graphics_composer_default.te b/sepolicy/vendor/hal_graphics_composer_default.te
index 3ad0244..1c7d239 100644
--- a/sepolicy/vendor/hal_graphics_composer_default.te
+++ b/sepolicy/vendor/hal_graphics_composer_default.te
@@ -17,4 +17,5 @@
 allow hal_graphics_composer_default sysfs_chipid:file r_file_perms;
 
 get_prop(hal_graphics_composer_default, vendor_camera_prop);
-set_prop(hal_graphics_composer_default, vendor_hwc_prop);
+
+allow hal_graphics_composer_default sysfs_backlight_writable:file rw_file_perms;
diff --git a/sepolicy/vendor/property.te b/sepolicy/vendor/property.te
index 6a79931..f11a3d5 100644
--- a/sepolicy/vendor/property.te
+++ b/sepolicy/vendor/property.te
@@ -1,3 +1,2 @@
 vendor_internal_prop(vendor_camera_prop)
-vendor_internal_prop(vendor_hwc_prop)
 vendor_internal_prop(vendor_wlan_prop)
diff --git a/shims/libepicoperator/Android.bp b/shims/libepicoperator/Android.bp
deleted file mode 100644
index 016b563..0000000
--- a/shims/libepicoperator/Android.bp
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// Copyright (C) 2021 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.
-
-cc_library_shared {
-    name: "libepicoperator",
-    srcs: ["epicoperator.c"],
-    vendor: true,
-}
diff --git a/shims/libepicoperator/epicoperator.c b/shims/libepicoperator/epicoperator.c
deleted file mode 100644
index 448baab..0000000
--- a/shims/libepicoperator/epicoperator.c
+++ /dev/null
@@ -1,3 +0,0 @@
-unsigned int createOperator(int param_1 __attribute__((unused))) {
-    return 0;
-}