hwc: always_split: Use pipe clock comparison to mixer to split
The layer clock is dependent on vertical downscaling and horizontal
dest width (pixels). When comparing to mixer's requirements,
line-time can be ignored since it is common to both pipe and mixer.
Also since mixer's scale is 1, layer's downscale * dest width needs
to be compared to mixer's width.
Change-Id: I6d28abc33f8a57a15101bf012b7706e163e2dc69
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 3315ee2..7597457 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -668,6 +668,11 @@
return ctx->dpyAttr[HWC_DISPLAY_VIRTUAL].connected;
}
+inline uint32_t getLayerClock(const uint32_t& dstW, const uint32_t& dstH,
+ const uint32_t& srcH) {
+ return max(dstW, (srcH * dstW) / dstH);
+}
+
};
#endif //HWC_UTILS_H