libhwc: fix compilation
authorJan Altensen <info@stricted.net>
Sun, 4 Aug 2019 01:50:17 +0000 (03:50 +0200)
committerJan Altensen <info@stricted.net>
Sun, 5 Apr 2020 10:24:50 +0000 (12:24 +0200)
Change-Id: Ie3a71a213cfce49ae749abbae34b415d2fdb8144

libhwc/ExynosHWC.cpp
libhwc/ExynosHWC.h
libvideocodec/Android.mk
libvppdisplay/ExynosDisplay.cpp

index 4bda3887796e37f092fc6d7902289bb60240c7f4..9bc1203ce9246e0e430c0aa0fa14c5a5a7d0e4e2 100644 (file)
@@ -699,7 +699,6 @@ void *hwc_vsync_thread(void *data)
 int exynos5_blank(struct hwc_composer_device_1 *dev, int disp, int blank)
 {
     ATRACE_CALL();
-    int fence = 0;
     struct exynos5_hwc_composer_device_1_t *pdev =
             (struct exynos5_hwc_composer_device_1_t *)dev;
 #ifdef SKIP_DISPLAY_BLANK_CTRL
@@ -1042,7 +1041,7 @@ int exynos_setActiveConfig(struct hwc_composer_device_1* dev, int disp, int inde
     return -1;
 }
 
-int exynos_setCursorPositionAsync(struct hwc_composer_device_1 *dev, int disp, int x_pos, int y_pos)
+int exynos_setCursorPositionAsync(struct hwc_composer_device_1 *dev __unused, int disp __unused, int x_pos __unused, int y_pos __unused)
 {
     return 0;
 }
@@ -1050,7 +1049,6 @@ int exynos_setCursorPositionAsync(struct hwc_composer_device_1 *dev, int disp, i
 int exynos_setPowerMode(struct hwc_composer_device_1* dev, int disp, int mode)
 {
     ATRACE_CALL();
-    int fence = 0;
     struct exynos5_hwc_composer_device_1_t *pdev =
             (struct exynos5_hwc_composer_device_1_t *)dev;
 #ifdef SKIP_DISPLAY_BLANK_CTRL
@@ -1195,7 +1193,6 @@ int exynos5_open(const struct hw_module_t *module, const char *name,
 {
     int ret = 0;
     int refreshRate;
-    int sw_fd;
 
     if (strcmp(name, HWC_HARDWARE_COMPOSER)) {
         return -EINVAL;
@@ -1569,19 +1566,19 @@ int exynos5_close(hw_device_t *device)
 }
 
 static struct hw_module_methods_t exynos5_hwc_module_methods = {
-    open: exynos5_open,
+    .open = exynos5_open,
 };
 
 hwc_module_t HAL_MODULE_INFO_SYM = {
-    common: {
-        tag: HARDWARE_MODULE_TAG,
-        module_api_version: HWC_MODULE_API_VERSION_0_1,
-        hal_api_version: HARDWARE_HAL_API_VERSION,
-        id: HWC_HARDWARE_MODULE_ID,
-        name: "Samsung exynos5 hwcomposer module",
-        author: "Samsung LSI",
-        methods: &exynos5_hwc_module_methods,
-        dso: 0,
-        reserved: {0},
+    .common = {
+        .tag = HARDWARE_MODULE_TAG,
+        .module_api_version = HWC_MODULE_API_VERSION_0_1,
+        .hal_api_version = HARDWARE_HAL_API_VERSION,
+        .id = HWC_HARDWARE_MODULE_ID,
+        .name = "Samsung exynos5 hwcomposer module",
+        .author = "Samsung LSI",
+        .methods = &exynos5_hwc_module_methods,
+        .dso = 0,
+        .reserved = {0},
     }
 };
index a56a90d63793ae248fcf8ea3b87f37b0d00b0cd7..6b05e81cec3e13d9eb8b7af2cb83f2a206ddda48 100644 (file)
@@ -171,7 +171,6 @@ const size_t NO_FB_NEEDED = NUM_HW_WINDOWS + 1;
 
 #ifndef FIMD_BW_OVERLAP_CHECK
 const size_t MAX_NUM_FIMD_DMA_CH = 2;
-#else
 const int FIMD_DMA_CH_IDX[S3C_FB_MAX_WIN] = {0, 1, 1, 1, 0};
 #endif
 
index 97c216675b11a39edc11d566aba25f45186ed012..346313c44ceabdf8fd65d1afbba9942a9cb74bf0 100644 (file)
@@ -32,6 +32,7 @@ endif
 ifneq ($(filter-out 3.4, $(TARGET_LINUX_KERNEL_VERSION)),)
 LOCAL_CFLAGS += -DCID_SUPPORT
 LOCAL_CFLAGS += -DUSE_DEFINE_H264_SEI_TYPE
+LOCAL_CFLAGS += -DUSE_ORIGINAL_HEADER
 endif
 
 # since 3.18 kernel
index 546c6b4b0a3c5bcf01214bcb3c231015d1ba2cc4..ea2a6eac1d8a8a2322085abdd28551bf054db208 100644 (file)
@@ -2642,7 +2642,11 @@ void ExynosDisplay::determineBandwidthSupport(hwc_display_contents_1_t *contents
                     supportedInternalMPP->mState = MPP_STATE_ASSIGNED;
                     mLayerInfos[fbIndex]->mInternalMPP = supportedInternalMPP;
                     mLayerInfos[fbIndex]->mDmaType = getDeconDMAType(mLayerInfos[fbIndex]->mInternalMPP);
+#if defined(MAX_DECON_DMA_TYPE)
                     if (mLayerInfos[fbIndex]->mDmaType >= MAX_DECON_DMA_TYPE) {
+#else
+                    if (mLayerInfos[fbIndex]->mDmaType >= IDMA_MAX) {
+#endif
                         ALOGE("getDeconDMAType with InternalMPP for FramebufferTarget failed (MPP type: %d, MPP index: %d)",
                                 mLayerInfos[fbIndex]->mInternalMPP->mType, mLayerInfos[fbIndex]->mInternalMPP->mIndex);
                         mLayerInfos[fbIndex]->mDmaType = 0;
@@ -3410,5 +3414,9 @@ int ExynosDisplay::checkConfigValidation(decon_win_config *config)
 
 int ExynosDisplay::setPowerMode(int mode)
 {
+#if defined(S3CFB_POWER_MODE)
     return ioctl(this->mDisplayFd, S3CFB_POWER_MODE, &mode);
+#else
+    return ioctl(this->mDisplayFd, FBIOBLANK, (mode == HWC_POWER_MODE_OFF ? FB_BLANK_POWERDOWN : FB_BLANK_UNBLANK));
+#endif
 }