From: Christopher N. Hesse Date: Sun, 28 Jan 2018 12:50:01 +0000 (+0100) Subject: DNM: Hacks X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5993d5badbab9cdf1d0a133c5f29aa3922e76f7b;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_exynos.git DNM: Hacks Change-Id: I3c45e869d1384ab06fa95a4c8eefca45bdefa920 --- diff --git a/libvppdisplay/ExynosDisplay.cpp b/libvppdisplay/ExynosDisplay.cpp index 77bcc0d..546c6b4 100644 --- a/libvppdisplay/ExynosDisplay.cpp +++ b/libvppdisplay/ExynosDisplay.cpp @@ -58,14 +58,12 @@ void ExynosDisplay::dumpConfig(decon_win_config &c) DISPLAY_LOGD(eDebugWinConfig, "\t\tfd = %d, dma = %u " "src_f_w = %u, src_f_h = %u, src_x = %d, src_y = %d, src_w = %u, src_h = %u, " "dst_f_w = %u, dst_f_h = %u, dst_x = %d, dst_y = %d, dst_w = %u, dst_h = %u, " - "format = %u, blending = %u, protection = %u, transparent(x:%d, y:%d, w:%d, h:%d), " - "block(x:%d, y:%d, w:%d, h:%d)", + "format = %u, blending = %u, protection = %u, transparent(x:%d, y:%d, w:%d, h:%d)", c.fd_idma[0], c.idma_type, c.src.f_w, c.src.f_h, c.src.x, c.src.y, c.src.w, c.src.h, c.dst.f_w, c.dst.f_h, c.dst.x, c.dst.y, c.dst.w, c.dst.h, c.format, c.blending, c.protection, - c.transparent_area.x, c.transparent_area.y, c.transparent_area.w, c.transparent_area.h, - c.covered_opaque_area.x, c.covered_opaque_area.y, c.covered_opaque_area.w, c.covered_opaque_area.h); + c.transparent_area.x, c.transparent_area.y, c.transparent_area.w, c.transparent_area.h); } } @@ -78,14 +76,12 @@ void ExynosDisplay::dumpConfig(decon_win_config &c, android::String8& result) result.appendFormat("\t\tfd = %d, dma = %u " "src_f_w = %u, src_f_h = %u, src_x = %d, src_y = %d, src_w = %u, src_h = %u, " "dst_f_w = %u, dst_f_h = %u, dst_x = %d, dst_y = %d, dst_w = %u, dst_h = %u, " - "format = %u, blending = %u, protection = %u, transparent(x:%d, y:%d, w:%d, h:%d), " - "block(x:%d, y:%d, w:%d, h:%d)\n", + "format = %u, blending = %u, protection = %u, transparent(x:%d, y:%d, w:%d, h:%d)", c.fd_idma[0], c.idma_type, c.src.f_w, c.src.f_h, c.src.x, c.src.y, c.src.w, c.src.h, c.dst.f_w, c.dst.f_h, c.dst.x, c.dst.y, c.dst.w, c.dst.h, c.format, c.blending, c.protection, - c.transparent_area.x, c.transparent_area.y, c.transparent_area.w, c.transparent_area.h, - c.covered_opaque_area.x, c.covered_opaque_area.y, c.covered_opaque_area.w, c.covered_opaque_area.h); + c.transparent_area.x, c.transparent_area.y, c.transparent_area.w, c.transparent_area.h); } } @@ -117,10 +113,14 @@ enum decon_pixel_format halFormatToS3CFormat(int format) case HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_PRIV: case HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_S10B: return DECON_PIXEL_FORMAT_NV12M; +#ifdef DECON_PIXEL_FORMAT_NV12N_10B case HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN_S10B: return DECON_PIXEL_FORMAT_NV12N_10B; +#endif +#ifdef DECON_PIXEL_FORMAT_NV12N case HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN: return DECON_PIXEL_FORMAT_NV12N; +#endif default: return DECON_PIXEL_FORMAT_MAX; } @@ -153,10 +153,14 @@ int S3CFormatToHalFormat(enum decon_pixel_format format) /* HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_PRIV, HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_S10B */ case DECON_PIXEL_FORMAT_NV12M: return HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M; +#ifdef DECON_PIXEL_FORMAT_NV12N case DECON_PIXEL_FORMAT_NV12N: return HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN; +#endif +#ifdef DECON_PIXEL_FORMAT_NV12N_10B case DECON_PIXEL_FORMAT_NV12N_10B: return HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN_S10B; +#endif default: return -1; } @@ -1197,11 +1201,13 @@ void ExynosDisplay::configureHandle(private_handle_t *handle, size_t index, if (handle == NULL) return; +#ifdef HWC_SET_OPAQUE if ((layer.flags & HWC_SET_OPAQUE) && handle && (handle->format == HAL_PIXEL_FORMAT_RGBA_8888) && (layer.compositionType == HWC_OVERLAY)) { handle->format = HAL_PIXEL_FORMAT_RGBX_8888; isOpaque = 1; } +#endif hwc_frect_t &sourceCrop = layer.sourceCropf; hwc_rect_t &displayFrame = layer.compositionType == HWC_FRAMEBUFFER_TARGET ? mFbUpdateRegion : layer.displayFrame; int32_t blending = layer.blending; @@ -1374,12 +1380,12 @@ void ExynosDisplay::configureHandle(private_handle_t *handle, size_t index, } } /* transparent region coordinates is on source buffer */ - getLayerRegion(layer, cfg.transparent_area, eTransparentRegion); + //getLayerRegion(layer, cfg.transparent_area, eTransparentRegion); cfg.transparent_area.x += cfg.dst.x; cfg.transparent_area.y += cfg.dst.y; /* opaque region coordinates is on screen */ - getLayerRegion(layer, cfg.covered_opaque_area, eCoveredOpaqueRegion); + //getLayerRegion(layer, cfg.covered_opaque_area, eCoveredOpaqueRegion); if (isOpaque && (handle->format == HAL_PIXEL_FORMAT_RGBX_8888)) { handle->format = HAL_PIXEL_FORMAT_RGBA_8888; @@ -1785,7 +1791,9 @@ int ExynosDisplay::handleWindowUpdate(hwc_display_contents_1_t __unused *content (config[winUpdateInfoIdx].dst.w != (uint32_t)mXres) || (config[winUpdateInfoIdx].dst.h != (uint32_t)mXres)) { for (size_t i = 0; i < NUM_HW_WINDOWS; i++) { memset(&config[i].transparent_area, 0, sizeof(config[i].transparent_area)); +#ifdef HWC_SET_OPAQUE memset(&config[i].covered_opaque_area, 0, sizeof(config[i].covered_opaque_area)); +#endif } } @@ -1797,6 +1805,7 @@ void ExynosDisplay::getLayerRegion(hwc_layer_1_t &layer, decon_win_rect &rect_ar hwc_rect_t const *hwcRects = NULL; unsigned int numRects = 0; switch (regionType) { +#if 0 case eTransparentRegion: hwcRects = layer.transparentRegion.rects; numRects = layer.transparentRegion.numRects; @@ -1805,6 +1814,7 @@ void ExynosDisplay::getLayerRegion(hwc_layer_1_t &layer, decon_win_rect &rect_ar hwcRects = layer.coveredOpaqueRegion.rects; numRects = layer.coveredOpaqueRegion.numRects; break; +#endif default: ALOGE("%s:: Invalid regionType (%d)", __func__, regionType); return;