Merge "hwc: Use 1 pipe if rotator downscale reduces dimensions"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
ea51be6e5b
@@ -2772,19 +2772,21 @@ bool MDPCompSrcSplit::acquireMDPPipes(hwc_context_t *ctx, hwc_layer_1_t* layer,
|
|||||||
const uint32_t lSplit = getLeftSplit(ctx, mDpy);
|
const uint32_t lSplit = getLeftSplit(ctx, mDpy);
|
||||||
const uint32_t dstWidth = dst.right - dst.left;
|
const uint32_t dstWidth = dst.right - dst.left;
|
||||||
const uint32_t dstHeight = dst.bottom - dst.top;
|
const uint32_t dstHeight = dst.bottom - dst.top;
|
||||||
const uint32_t cropWidth = has90Transform(layer) ? crop.bottom - crop.top :
|
uint32_t cropWidth = has90Transform(layer) ? crop.bottom - crop.top :
|
||||||
crop.right - crop.left;
|
crop.right - crop.left;
|
||||||
const uint32_t cropHeight = has90Transform(layer) ? crop.right - crop.left :
|
uint32_t cropHeight = has90Transform(layer) ? crop.right - crop.left :
|
||||||
crop.bottom - crop.top;
|
crop.bottom - crop.top;
|
||||||
//Approximation to actual clock, ignoring the common factors in pipe and
|
//Approximation to actual clock, ignoring the common factors in pipe and
|
||||||
//mixer cases like line_time
|
//mixer cases like line_time
|
||||||
const uint32_t layerClock = getLayerClock(dstWidth, dstHeight, cropHeight);
|
const uint32_t layerClock = getLayerClock(dstWidth, dstHeight, cropHeight);
|
||||||
const uint32_t mixerClock = lSplit;
|
const uint32_t mixerClock = lSplit;
|
||||||
|
|
||||||
//TODO Even if a 4k video is going to be rot-downscaled to dimensions under
|
const uint32_t downscale = getRotDownscale(ctx, layer);
|
||||||
//pipe line length, we are still using 2 pipes. This is fine just because
|
if(downscale) {
|
||||||
//this is source split where destination doesn't matter. Evaluate later to
|
cropWidth /= downscale;
|
||||||
//see if going through all the calcs to save a pipe is worth it
|
cropHeight /= downscale;
|
||||||
|
}
|
||||||
|
|
||||||
if(dstWidth > mdpHw.getMaxPipeWidth() or
|
if(dstWidth > mdpHw.getMaxPipeWidth() or
|
||||||
cropWidth > mdpHw.getMaxPipeWidth() or
|
cropWidth > mdpHw.getMaxPipeWidth() or
|
||||||
(primarySplitAlways and
|
(primarySplitAlways and
|
||||||
|
|||||||
Reference in New Issue
Block a user