hwc: Disable Actionsafe for 8974 target and non-HDMI display.
1. Disable Action safe for 8974 due to HW limitation while downscaling
layers with overlapped region
2. Disable Actionsafe for non HDMI displays.
Change-Id: If974cf2bb2259ee6051645698ba641791b1425ce
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index ce2da87..92edb21 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -962,8 +962,14 @@
bool isActionSafePresent(hwc_context_t *ctx, int dpy) {
// if external supports underscan, do nothing
// it will be taken care in the driver
- if(!dpy || ctx->mExtDisplay->isCEUnderscanSupported())
+ // Disable Action safe for 8974 due to HW limitation for downscaling
+ // layers with overlapped region
+ // Disable Actionsafe for non HDMI displays.
+ if(!(dpy == HWC_DISPLAY_EXTERNAL) ||
+ qdutils::MDPVersion::getInstance().is8x74v2() ||
+ ctx->mExtDisplay->isCEUnderscanSupported()) {
return false;
+ }
char value[PROPERTY_VALUE_MAX];
// Read action safe properties
@@ -1696,6 +1702,10 @@
whf.format = getMdpFormat(HAL_PIXEL_FORMAT_BGRX_8888);
}
+ /* Calculate the external display position based on MDP downscale,
+ ActionSafe, and extorientation features. */
+ calcExtDisplayPosition(ctx, hnd, dpy, crop, dst, transform, orient);
+
setMdpFlags(layer, mdpFlagsL, 0, transform);
if(lDest != OV_INVALID && rDest != OV_INVALID) {