hwc: Extend PTOR feature for two layers
- Consider two smallest layers for PTOR feature which uses MDP comp.
- These two layers are rendered on a buffer and are queued to MDP
to acheive full MDP Composition
- This helps to acheive performance enhancement
Change-Id: I43d9306ff19cd2d7a410c885316523965a44cbd4
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 6b7d87f..ad06e89 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -41,6 +41,8 @@
#define MIN_DISPLAY_YRES 200
#define HWC_WFDDISPSYNC_LOG 0
#define STR(f) #f;
+// Max number of PTOR layers handled
+#define MAX_PTOR_LAYERS 2
//Fwrd decls
struct hwc_context_t;
@@ -131,6 +133,23 @@
int renderBufIndexforABC;
};
+//PTOR Comp info
+struct PtorInfo {
+ int count;
+ int layerIndex[MAX_PTOR_LAYERS];
+ int mRenderBuffOffset[MAX_PTOR_LAYERS];
+ hwc_rect_t displayFrame[MAX_PTOR_LAYERS];
+ bool isActive() { return (count>0); }
+ int getPTORArrayIndex(int index) {
+ int idx = -1;
+ for(int i = 0; i < count; i++) {
+ if(index == layerIndex[i])
+ idx = i;
+ }
+ return idx;
+ }
+};
+
struct LayerProp {
uint32_t mFlags; //qcom specific layer flags
LayerProp():mFlags(0){};
@@ -574,6 +593,8 @@
struct gpu_hint_info mGPUHintInfo;
//App Buffer Composition
bool enableABC;
+ // PTOR Info
+ qhwc::PtorInfo mPtorInfo;
};
namespace qhwc {