hwc: Fix MDP comp array index access

Fix MDP comp array index access in case of High Res pipe allocation.
This is already correct in case of Low Res allocation routine.

Bug: 24163261

Acked-by: Saurabh Shah <saurshah@codeaurora.org>

Change-Id: I7eaa0711ef8998ea03edba18b74db80459daf4c7
diff --git a/msm8960/libhwcomposer/hwc_mdpcomp.cpp b/msm8960/libhwcomposer/hwc_mdpcomp.cpp
index 16d0c0b..b302943 100644
--- a/msm8960/libhwcomposer/hwc_mdpcomp.cpp
+++ b/msm8960/libhwcomposer/hwc_mdpcomp.cpp
@@ -1032,7 +1032,8 @@
         if(isYuvBuffer(hnd))
             continue;
 
-        PipeLayerPair& info = mCurrentFrame.mdpToLayer[index];
+        int mdpIndex = mCurrentFrame.layerToMDP[index];
+        PipeLayerPair& info = mCurrentFrame.mdpToLayer[mdpIndex];
         info.pipeInfo = new MdpPipeInfoHighRes;
         info.rot = NULL;
         MdpPipeInfoHighRes& pipe_info = *(MdpPipeInfoHighRes*)info.pipeInfo;