From: Jan Altensen Date: Sat, 3 Oct 2020 05:18:02 +0000 (+0200) Subject: libhwcutils: resolve compilation errors X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=429d6b1ecb173947dab4a4e9ce44bff0a2fee972;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_exynos.git libhwcutils: resolve compilation errors Change-Id: I2c71ac47bc628b998f00fcea3a5adb0af96a0bc7 --- diff --git a/libhwcutils/ExynosG2DWrapper.cpp b/libhwcutils/ExynosG2DWrapper.cpp index 280679c..06c252a 100644 --- a/libhwcutils/ExynosG2DWrapper.cpp +++ b/libhwcutils/ExynosG2DWrapper.cpp @@ -104,7 +104,6 @@ int ExynosG2DWrapper::runCompositor(hwc_layer_1_t &src_layer, private_handle_t * { int ret = 0; unsigned long srcYAddress = 0; - unsigned long srcCbCrAddress = 0; unsigned long dstYAddress = 0; unsigned long dstCbCrAddress =0; @@ -412,7 +411,6 @@ int ExynosG2DWrapper::runSecureCompositor(hwc_layer_1_t &src_layer, blit_op mode, bool force_clear) { int ret = 0; - unsigned long srcYAddress = 0; ExynosRect srcImgRect, dstImgRect; @@ -441,8 +439,6 @@ int ExynosG2DWrapper::runSecureCompositor(hwc_layer_1_t &src_layer, uint32_t srcG2d_bpp, dstG2d_bpp; uint32_t srcImageSize, dstImageSize; - bool src_ion_mapped = false; - bool dst_ion_mapped = false; private_handle_t *src_handle = private_handle_t::dynamicCast(src_layer.handle); @@ -644,7 +640,7 @@ bool ExynosG2DWrapper::InitSecureG2D() ALOGE("%s: failed to mmap for virtual display buffer", __func__); return -ENOMEM; } - ALOGI("allocated secure g2d input buffer: 0x%x", mVirtualDisplay->mPhysicallyLinearBufferAddr); + ALOGI("allocated secure g2d input buffer: 0x%lx", mVirtualDisplay->mPhysicallyLinearBufferAddr); } } return true; @@ -658,7 +654,7 @@ bool ExynosG2DWrapper::TerminateSecureG2D() int ret = 0; if (mVirtualDisplay->mPhysicallyLinearBuffer) { - ALOGI("free g2d input buffer: 0x%x", mVirtualDisplay->mPhysicallyLinearBufferAddr); + ALOGI("free g2d input buffer: 0x%lx", mVirtualDisplay->mPhysicallyLinearBufferAddr); munmap((void *)mVirtualDisplay->mPhysicallyLinearBufferAddr, mAllocSize); mVirtualDisplay->mPhysicallyLinearBufferAddr = 0; @@ -676,7 +672,7 @@ bool ExynosG2DWrapper::TerminateSecureG2D() } #endif -void ExynosG2DWrapper::exynos5_cleanup_g2d(int force) +void ExynosG2DWrapper::exynos5_cleanup_g2d(int force __unused) { #ifdef G2D_COMPOSITION exynos5_g2d_data_t &mG2d = mDisplay->mG2d; @@ -722,7 +718,7 @@ void ExynosG2DWrapper::exynos5_cleanup_g2d(int force) #endif } -int ExynosG2DWrapper::exynos5_g2d_buf_alloc(hwc_display_contents_1_t* contents) +int ExynosG2DWrapper::exynos5_g2d_buf_alloc(hwc_display_contents_1_t* contents __unused) { #ifdef G2D_COMPOSITION int w, h; @@ -785,7 +781,7 @@ G2D_BUF_ALLOC_FAIL: return 1; } -int ExynosG2DWrapper::exynos5_config_g2d(hwc_layer_1_t &layer, private_handle_t *dst_handle, s3c_fb_win_config &cfg, int win_idx_2d, int win_idx) +int ExynosG2DWrapper::exynos5_config_g2d(hwc_layer_1_t &layer __unused, private_handle_t *dst_handle __unused, s3c_fb_win_config &cfg __unused, int win_idx_2d __unused, int win_idx __unused) { #ifdef G2D_COMPOSITION int ret = 0; diff --git a/libhwcutils/ExynosMPP.cpp b/libhwcutils/ExynosMPP.cpp index 49788e1..7335ab7 100644 --- a/libhwcutils/ExynosMPP.cpp +++ b/libhwcutils/ExynosMPP.cpp @@ -54,7 +54,7 @@ ExynosMPP::ExynosMPP(ExynosDisplay *display, int gscIndex) mDoubleOperation = false; mBufferFreeThread = new BufferFreeThread(this); mBufferFreeThread->mRunning = true; - mBufferFreeThread->run(); + mBufferFreeThread->run("MPPThread"); } ExynosMPP::~ExynosMPP() @@ -389,10 +389,9 @@ bool ExynosMPP::isProcessingRequired(hwc_layer_1_t &layer, int format) || isTransformed(layer); } -int ExynosMPP::getAdjustedCrop(int rawSrcSize, int dstSize, int format, bool isVertical, bool isRotated) +int ExynosMPP::getAdjustedCrop(int rawSrcSize, int dstSize, int format, bool isVertical __unused, bool isRotated) { int ratio; - int adjustedSize; int align; if (dstSize >= rawSrcSize || rawSrcSize <= dstSize * FIRST_PRESCALER_THRESHOLD) @@ -474,17 +473,17 @@ void ExynosMPP::setupOtfDestination(exynos_mpp_img &src_img, exynos_mpp_img &dst dst_img.yaddr = (ptrdiff_t)NULL; } -int ExynosMPP::sourceWidthAlign(int format) +int ExynosMPP::sourceWidthAlign(int format __unused) { return 16; } -int ExynosMPP::sourceHeightAlign(int format) +int ExynosMPP::sourceHeightAlign(int format __unused) { return 16; } -int ExynosMPP::destinationAlign(int format) +int ExynosMPP::destinationAlign(int format __unused) { return 16; } @@ -525,8 +524,6 @@ int ExynosMPP::processOTF(hwc_layer_1_t &layer) ATRACE_CALL(); ALOGV("configuring gscaler %u for memory-to-fimd-localout", mIndex); - buffer_handle_t dst_buf; - private_handle_t *dst_handle; int ret = 0; int dstAlign; @@ -786,14 +783,15 @@ int ExynosMPP::processM2M(hwc_layer_1_t &layer, int dst_format, hwc_frect_t *sou ATRACE_CALL(); ALOGV("configuring gscaler %u for memory-to-memory", AVAILABLE_GSC_UNITS[mIndex]); +#ifdef USES_VIRTUAL_DISPLAY alloc_device_t* alloc_device = mDisplay->mAllocDevice; +#endif private_handle_t *src_handle = private_handle_t::dynamicCast(layer.handle); buffer_handle_t dst_buf; private_handle_t *dst_handle; buffer_handle_t mid_buf; private_handle_t *mid_handle; int ret = 0; - int dstAlign; if (isUsingMSC()) { if (dst_format != HAL_PIXEL_FORMAT_RGB_565) @@ -1198,17 +1196,17 @@ bool ExynosMPP::isDstConfigChanged(exynos_mpp_img &c1, exynos_mpp_img &c2) c1.drmMode != c2.drmMode; } -bool ExynosMPP::isSourceCropChanged(exynos_mpp_img &c1, exynos_mpp_img &c2) +bool ExynosMPP::isSourceCropChanged(exynos_mpp_img &c1 __unused, exynos_mpp_img &c2 __unused) { return false; } -bool ExynosMPP::isPerFrameSrcChanged(exynos_mpp_img &c1, exynos_mpp_img &c2) +bool ExynosMPP::isPerFrameSrcChanged(exynos_mpp_img &c1 __unused, exynos_mpp_img &c2 __unused) { return false; } -bool ExynosMPP::isPerFrameDstChanged(exynos_mpp_img &c1, exynos_mpp_img &c2) +bool ExynosMPP::isPerFrameDstChanged(exynos_mpp_img &c1 __unused, exynos_mpp_img &c2 __unused) { return false; }