From: Danny Wood Date: Sun, 21 Jul 2019 14:19:46 +0000 (+0100) Subject: Backport a few more changes from S7 stock pie blobs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=05a1f6b2e9ff2aa93cf80695543d246e9c84fbab;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_exynos.git Backport a few more changes from S7 stock pie blobs Change-Id: I9b4615b4f94ec3c7f02d64c0b5b919d56e7c63c0 --- diff --git a/libvppdisplay/ExynosDisplay.cpp b/libvppdisplay/ExynosDisplay.cpp index 6148441..afb6e22 100644 --- a/libvppdisplay/ExynosDisplay.cpp +++ b/libvppdisplay/ExynosDisplay.cpp @@ -427,7 +427,7 @@ int ExynosDisplay::set(hwc_display_contents_1_t *contents) if (mType != EXYNOS_SECONDARY_DISPLAY) { #endif - if (err) + if (err < 0) fence = clearDisplay(); if (fence == 0) { @@ -456,6 +456,19 @@ int ExynosDisplay::set(hwc_display_contents_1_t *contents) } #endif + uint32_t rectCount = 0; + for (size_t i = 0; i < contents->numHwLayers; i++) { + hwc_layer_1_t &layer = contents->hwLayers[i]; + if (layer.handle) { + private_handle_t *handle = private_handle_t::dynamicCast(layer.handle); + if (handle->format == HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_PRIV + && rectCount < mOriginFrect.size()) + layer.sourceCropf = mOriginFrect[rectCount++]; + } + } + mOriginFrect.clear(); + mBackUpFrect.clear(); + return err; } @@ -2108,18 +2121,6 @@ int ExynosDisplay::postFrame(hwc_display_contents_1_t* contents) layer.acquireFenceFd = -1; layer.releaseFenceFd = -1; } - rectCount = 0; - for (size_t i = 0; i < contents->numHwLayers; i++) { - hwc_layer_1_t &layer = contents->hwLayers[i]; - if (layer.handle) { - private_handle_t *handle = private_handle_t::dynamicCast(layer.handle); - if (handle->format == HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_PRIV - && rectCount < mOriginFrect.size()) - layer.sourceCropf = mOriginFrect[rectCount++]; - } - } - mOriginFrect.clear(); - mBackUpFrect.clear(); if (!this->mVirtualOverlayFlag && (ret >= 0)) this->mLastFbWindow = mFbWindow; diff --git a/libvppdisplay/ExynosDisplay.h b/libvppdisplay/ExynosDisplay.h index 5bd4cbd..b71a72f 100644 --- a/libvppdisplay/ExynosDisplay.h +++ b/libvppdisplay/ExynosDisplay.h @@ -82,6 +82,12 @@ const struct deconFormat { {DECON_PIXEL_FORMAT_YVU420, "FORMATYVU420"}, {DECON_PIXEL_FORMAT_YUV420M, "FORMATYUV420M"}, {DECON_PIXEL_FORMAT_YVU420M, "FORMATYVU420M"}, +#ifdef DECON_PIXEL_FORMAT_NV12N + {DECON_PIXEL_FORMAT_NV12N, "FORMATNV21N"}, +#endif +#ifdef DECON_PIXEL_FORMAT_NV12N_10B + {DECON_PIXEL_FORMAT_NV12N_10B, "FORMATNV21N10B"}, +#endif }; enum {