From cfca2f3ae528fd45afdd1e8ff714a7d218044426 Mon Sep 17 00:00:00 2001 From: Jan Altensen Date: Sun, 5 Apr 2020 01:55:10 +0200 Subject: [PATCH] libvppdisplay: resolve compilation errors Change-Id: Ie87fab990cfdf84a53d03cdb40499eb5010da0bf --- libvppdisplay/ExynosDisplay.cpp | 29 ++++++------------- .../ExynosDisplayResourceManager.cpp | 4 ++- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/libvppdisplay/ExynosDisplay.cpp b/libvppdisplay/ExynosDisplay.cpp index afb6e22..84b39ea 100644 --- a/libvppdisplay/ExynosDisplay.cpp +++ b/libvppdisplay/ExynosDisplay.cpp @@ -762,7 +762,7 @@ int ExynosDisplay::clearDisplay() int ExynosDisplay::getCompModeSwitch() { - unsigned int tot_win_size = 0, updateFps = 0; + unsigned int updateFps = 0; unsigned int lcd_size = this->mXres * this->mYres; uint64_t TimeStampDiff; float Temp; @@ -902,7 +902,6 @@ void ExynosDisplay::getIDMAMinSize(hwc_layer_1_t __unused &layer, int *w, int *h bool ExynosDisplay::isOverlaySupported(hwc_layer_1_t &layer, size_t index, bool useVPPOverlay, ExynosMPPModule** supportedInternalMPP, ExynosMPPModule** supportedExternalMPP) { - int mMPPIndex = 0; int ret = 0; ExynosMPPModule* transitionInternalMPP = NULL; private_handle_t *handle = NULL; @@ -1013,7 +1012,7 @@ bool ExynosDisplay::isOverlaySupported(hwc_layer_1_t &layer, size_t index, bool (WIDTH(extMPPOutLayer.displayFrame) % mCheckIntMPP->getCropWidthAlign(layer) != 0 || HEIGHT(extMPPOutLayer.displayFrame) % mCheckIntMPP->getCropHeightAlign(layer) != 0 || !(mCheckIntMPP->isFormatSupportedByMPP(handleFormat)) || - !(mCheckIntMPP->isCSCSupportedByMPP(handleFormat, HAL_PIXEL_FORMAT_RGBX_8888, layer.dataSpace)))) + !(mCheckIntMPP->isCSCSupportedByMPP(handleFormat, HAL_PIXEL_FORMAT_RGBX_8888, 1)))) dst_format = mExternalMPPDstFormat; /* extMPPOutLayer is output of ExtMPP */ @@ -1822,7 +1821,7 @@ int ExynosDisplay::handleWindowUpdate(hwc_display_contents_1_t __unused *content return 1; } -void ExynosDisplay::getLayerRegion(hwc_layer_1_t &layer, decon_win_rect &rect_area, uint32_t regionType) +void ExynosDisplay::getLayerRegion(hwc_layer_1_t &layer __unused, decon_win_rect &rect_area, uint32_t regionType) { hwc_rect_t const *hwcRects = NULL; unsigned int numRects = 0; @@ -1931,7 +1930,7 @@ int ExynosDisplay::postFrame(hwc_display_contents_1_t* contents) return -1; } struct decon_win_config *config = mWinData->config; - int win_map = 0; + int tot_ovly_wins = 0; uint32_t rectCount = 0; int ret = 0; @@ -1964,20 +1963,18 @@ int ExynosDisplay::postFrame(hwc_display_contents_1_t* contents) if ((layer.flags & HWC_SKIP_RENDERING) || ((layer.compositionType == HWC_OVERLAY) && - ((window_index < 0) || (window_index >= NUM_HW_WINDOWS)))) { + ((window_index < 0) || (window_index >= (int32_t)NUM_HW_WINDOWS)))) { if (layer.acquireFenceFd >= 0) close(layer.acquireFenceFd); layer.acquireFenceFd = -1; layer.releaseFenceFd = -1; - if ((window_index < 0) || (window_index >= NUM_HW_WINDOWS)) { + if ((window_index < 0) || (window_index >= (int32_t)NUM_HW_WINDOWS)) { android::String8 result; DISPLAY_LOGE("window of layer %d was not assigned (window_index: %d)", i, window_index); dumpContents(result, contents); - ALOGE(result.string()); result.clear(); dumpLayerInfo(result); - ALOGE(result.string()); } continue; } @@ -2080,13 +2077,10 @@ int ExynosDisplay::postFrame(hwc_display_contents_1_t* contents) result.appendFormat("window %zu configuration:\n", i); dumpConfig(config[i], result); } - ALOGE(result.string()); result.clear(); dumpContents(result, contents); - ALOGE(result.string()); result.clear(); dumpLayerInfo(result); - ALOGE(result.string()); } if (checkConfigChanged(*mWinData, mLastConfigData) == false) { @@ -2131,7 +2125,6 @@ int ExynosDisplay::postFrame(hwc_display_contents_1_t* contents) void ExynosDisplay::skipStaticLayers(hwc_display_contents_1_t* contents) { mVirtualOverlayFlag = 0; - int win_map = 0; int fbIndex = contents->numHwLayers - 1; if (!mHwc->hwc_ctrl.skip_static_layer_mode) @@ -2282,7 +2275,6 @@ void ExynosDisplay::determineYuvOverlay(hwc_display_contents_1_t *contents) ExynosMPPModule* supportedExternalMPP = NULL; hwc_layer_1_t &layer = contents->hwLayers[i]; useVPPOverlayFlag = false; - hwc_frect_t origin; if (layer.handle) { private_handle_t *handle = private_handle_t::dynamicCast(layer.handle); @@ -2579,7 +2571,6 @@ void ExynosDisplay::determineBandwidthSupport(hwc_display_contents_1_t *contents bool changed; this->mBypassSkipStaticLayer = false; unsigned int cannotComposeFlag = 0; - int internalDMAsUsed = 0; int retry = 0; int fbIndex = contents->numHwLayers - 1; @@ -2970,7 +2961,6 @@ void ExynosDisplay::assignWindows(hwc_display_contents_1_t *contents) } } else { DISPLAY_LOGD(eDebugResourceAssigning, "%u layer can't use internalDMA, isProcessingRequired(%d)", i, isProcessingRequired(layer)); - unsigned int dmaType = 0; mLayerInfos[i]->mWindowIndex = nextWindow; if (mLayerInfos[i]->mInternalMPP != NULL) { mLayerInfos[i]->mInternalMPP->setDisplay(this); @@ -3064,7 +3054,7 @@ int ExynosDisplay::postMPPM2M(hwc_layer_1_t &layer, struct decon_win_config *con (isFormatRgb(handle->format) || (bothMPPUsed && !isFormatRgb(handle->format) && exynosInternalMPP != NULL && - exynosInternalMPP->isCSCSupportedByMPP(handle->format, HAL_PIXEL_FORMAT_RGBX_8888, layer.dataSpace) && + exynosInternalMPP->isCSCSupportedByMPP(handle->format, HAL_PIXEL_FORMAT_RGBX_8888, 1) && exynosInternalMPP->isFormatSupportedByMPP(handle->format) && WIDTH(extMPPOutLayer.displayFrame) % exynosInternalMPP->getCropWidthAlign(layer) == 0 && HEIGHT(extMPPOutLayer.displayFrame) % exynosInternalMPP->getCropHeightAlign(layer) == 0))) @@ -3181,7 +3171,6 @@ bool ExynosDisplay::isBothMPPProcessingRequired(hwc_layer_1_t &layer) ((dstH > srcH * maxUpscaleExt) && (dstH <= srcH * maxUpscaleExt * maxUpscaleInt)); int maxDownscaleExt = mExternalMPPs[0]->getMaxDownscale(layer); - int maxDownscaleInt = mCheckIntMPP->getMaxDownscale(layer); needDoubleOperation |= ((dstW < srcW / maxDownscaleExt) && (dstW >= srcW / (maxDownscaleExt * maxDownscaleExt))) || ((dstH < srcH / maxDownscaleExt) && (dstH >= srcH / (maxDownscaleExt * maxDownscaleExt))); @@ -3284,13 +3273,13 @@ bool ExynosDisplay::isBothMPPProcessingRequired(hwc_layer_1_t &layer, hwc_layer_ return needDoubleOperation; } -bool ExynosDisplay::isSourceCropfSupported(hwc_layer_1_t layer) +bool ExynosDisplay::isSourceCropfSupported(hwc_layer_1_t layer __unused) { +#if 0 private_handle_t *handle = private_handle_t::dynamicCast(layer.handle); unsigned int bpp = formatToBpp(handle->format); /* HACK: Disable overlay if the layer have float position or size */ -#if 0 if ((isFormatRgb(handle->format) && (bpp == 32)) || isFormatYUV420(handle->format)) return true; diff --git a/libvppdisplay/ExynosDisplayResourceManager.cpp b/libvppdisplay/ExynosDisplayResourceManager.cpp index 0d8ea9f..3659d2c 100644 --- a/libvppdisplay/ExynosDisplayResourceManager.cpp +++ b/libvppdisplay/ExynosDisplayResourceManager.cpp @@ -383,10 +383,12 @@ int ExynosDisplayResourceManager::assignResources(size_t numDisplays, hwc_displa int primary_previous_drm_dma = -1; int secondary_previous_drm_dma = -1; - int virtual_previous_drm_dma = -1; ExynosMPPModule *previousDRMInternalMPPPrimary = NULL; ExynosMPPModule *previousDRMInternalMPPSecondary = NULL; +#ifdef USES_VIRTUAL_DISPLAY + int virtual_previous_drm_dma = -1; ExynosMPPModule *previousDRMInternalMPPVirtual = NULL; +#endif #if defined(USES_DUAL_DISPLAY) if (mHwc->hdmi_hpd == false) { -- 2.20.1