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
This commit is contained in:
Arun Kumar K.R 2015-09-18 19:16:12 -07:00 committed by Patrick Tjin
parent 45660529af
commit 95c2601aab
1 changed files with 2 additions and 1 deletions

View File

@ -1037,7 +1037,8 @@ bool MDPCompHighRes::allocLayerPipes(hwc_context_t *ctx,
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;