hwc/overlay: MDSS driver requires 4-aligned crop.h for interlaced

MDSS driver requires the crop height to be multiple of 4 to
de-interlace the interlaced Yuv content.

CRs-Fixed: 491488
Change-Id: I9a95392a71cca217e2890c9736f1450fd8aa4a59
diff --git a/liboverlay/overlayMdp.cpp b/liboverlay/overlayMdp.cpp
index 4c77f2e..e5d7d98 100644
--- a/liboverlay/overlayMdp.cpp
+++ b/liboverlay/overlayMdp.cpp
@@ -180,6 +180,11 @@
         if(mdpVersion < MDSS_V5) {
             utils::even_floor(mOVInfo.dst_rect.w);
             utils::even_floor(mOVInfo.dst_rect.h);
+        } else if (mOVInfo.flags & MDP_DEINTERLACE) {
+            // For interlaced, crop.h should be 4-aligned
+            if (!(mOVInfo.flags & MDP_SOURCE_ROTATED_90) &&
+                (mOVInfo.src_rect.h % 4))
+                mOVInfo.src_rect.h = utils::aligndown(mOVInfo.src_rect.h, 4);
         }
     }