hwc: Add target specific checks in hwcomposer
* Mdss driver supports DMA-Multiplexing on wb interface
for certain targets. Add overlay get function to query
this info during pipe allocation for wb.
* UI Scaling on external is not supported on certain
targets due to the lack of availability of pipes with
scalars. Add overlay get function to query this info
to disable action-safe calcs, DRC and others which
require downscaling.
Change-Id: I1726caa4634f72d781561e797078648524ea2eef
diff --git a/liboverlay/overlay.h b/liboverlay/overlay.h
index fa19dc3..0b785d5 100644
--- a/liboverlay/overlay.h
+++ b/liboverlay/overlay.h
@@ -130,6 +130,10 @@
/* Returns pipe dump. Expects a NULL terminated buffer of big enough size
* to populate.
*/
+ /* Returns if DMA pipe multiplexing is supported by the mdss driver */
+ static bool isDMAMultiplexingSupported();
+ /* Returns if UI scaling on external is supported on the targets */
+ static bool isUIScalingOnExternalSupported();
void getDump(char *buf, size_t len);
/* Reset usage and allocation bits on all pipes for given display */
void clear(int dpy);
@@ -306,6 +310,18 @@
sDMAMultiplexingSupported = true;
}
+inline bool Overlay::isDMAMultiplexingSupported() {
+ return sDMAMultiplexingSupported;
+}
+
+inline bool Overlay::isUIScalingOnExternalSupported() {
+ if(qdutils::MDPVersion::getInstance().is8x26() or
+ qdutils::MDPVersion::getInstance().is8x16()) {
+ return false;
+ }
+ return true;
+}
+
inline int Overlay::getDMAMode() {
return sDMAMode;
}