overlay: Add support for rotator downscale
Add support for rotator downscale. This is enabled from 8994 onwards
Constraints:
--Downscale should be a power of 2, max upto 32
--Both directions should have equal downscale
--{src_w, src_h} mod downscale = 0
--No BWC
--No Interlaced video support
The rotator's destination rect is modified to reflect the presence of
downscale. Any downscale calcs should be done only after adjusting
crop to meet rotator's requirements.
Smaller downscale is used if we need to chop off any more than 1
line or pixel.
Change-Id: Id07d62fefa3213035f16cca49497800716484a95
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 267815f..3c224ca 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -147,7 +147,8 @@
* to BLOCK_MODE */
if (canUseRotator(ctx, dpy) &&
- has90Transform(layer) && isRotationDoable(ctx, hnd)) {
+ (has90Transform(layer) || getRotDownscale(ctx, layer))
+ && isRotationDoable(ctx, hnd)) {
if(not ctx->mOverlay->isDMAMultiplexingSupported()) {
if(ctx->mOverlay->isPipeTypeAttached(
overlay::utils::OV_MDP_PIPE_DMA))