Don't support for standard HAL_PIXEL_FORMAT_YV12 format.

Bug: 29160724
Bug: IMINAN-49451

Otherwise gralloc HAL has to hack the buffer allocation for the
format, with 128 bytes alignment requirement by overlay plane
of Intel display controller.

Change-Id: I26960cf12f59d1233787d8f9dee69949a0582090
Signed-off-by: Austin Hu <[email protected]>
diff --git a/moorefield_hdmi/common/planes/DisplayPlane.cpp b/moorefield_hdmi/common/planes/DisplayPlane.cpp
index 1251c29..a748b13 100755
--- a/moorefield_hdmi/common/planes/DisplayPlane.cpp
+++ b/moorefield_hdmi/common/planes/DisplayPlane.cpp
@@ -217,7 +217,10 @@
     if (index < 0) {
         VLOGTRACE("unmapped buffer, mapping...");
         mapper = mapBuffer(buffer);
-        if (!mapper) {
+        // Skip the unsupported format in case that a new gralloc buffer was
+        // created and added into the mapped list, triggered by SoftwareRender
+        // with color conversion from known formats to YV12.
+        if (!mapper || mapper->getFormat() == HAL_PIXEL_FORMAT_YV12) {
             ELOGTRACE("failed to map buffer %#x", handle);
             bm->unlockDataBuffer(buffer);
             return false;
diff --git a/moorefield_hdmi/ips/anniedale/PlaneCapabilities.cpp b/moorefield_hdmi/ips/anniedale/PlaneCapabilities.cpp
index 71def21..a7fbe48 100755
--- a/moorefield_hdmi/ips/anniedale/PlaneCapabilities.cpp
+++ b/moorefield_hdmi/ips/anniedale/PlaneCapabilities.cpp
@@ -58,7 +58,6 @@
                 WLOGTRACE("180 degree rotation is not supported yet");
             }
             return trans ? false : true;
-        case HAL_PIXEL_FORMAT_YV12:
         case HAL_PIXEL_FORMAT_INTEL_YV12:
             return trans ? false: true;
         case HAL_PIXEL_FORMAT_NV12:
@@ -102,7 +101,6 @@
         }
     } else if (planeType == DisplayPlane::PLANE_OVERLAY) {
         switch (format) {
-        case HAL_PIXEL_FORMAT_YV12:
         case HAL_PIXEL_FORMAT_INTEL_YV12:
         case HAL_PIXEL_FORMAT_I420:
         case HAL_PIXEL_FORMAT_NV12:
diff --git a/moorefield_hdmi/ips/tangier/TngDisplayQuery.cpp b/moorefield_hdmi/ips/tangier/TngDisplayQuery.cpp
index 8ba7e6d..1a8adb2 100755
--- a/moorefield_hdmi/ips/tangier/TngDisplayQuery.cpp
+++ b/moorefield_hdmi/ips/tangier/TngDisplayQuery.cpp
@@ -32,7 +32,6 @@
     case OMX_INTEL_COLOR_FormatYUV420PackedSemiPlanar_Tiled:
     // Expand format to support the case: Software decoder + HW rendering
     // Only VP9 use this foramt now
-    case HAL_PIXEL_FORMAT_YV12:
     case HAL_PIXEL_FORMAT_INTEL_YV12:
         return true;
     default: