hwc: Add support for uneven split primary displays
Add support for unevenly split primary displays.
The driver provides info about the split via msm_fb_split sysfs node
For external we assume even split. If driver doesn't specify any split
for primary, we default to even split.
Change-Id: I4d541f41de2d7a5d2b62653fa33cab079a6d5d30
diff --git a/libhwcomposer/hwc_fbupdate.h b/libhwcomposer/hwc_fbupdate.h
index 5cf75f7..55cd655 100644
--- a/libhwcomposer/hwc_fbupdate.h
+++ b/libhwcomposer/hwc_fbupdate.h
@@ -45,7 +45,8 @@
//Reset values
virtual void reset();
//Factory method that returns a low-res or high-res version
- static IFBUpdate *getObject(const int& width, const int& dpy);
+ static IFBUpdate *getObject(const int& width, const int& rightSplit,
+ const int& dpy);
protected:
const int mDpy; // display to update
@@ -59,12 +60,12 @@
explicit FBUpdateLowRes(const int& dpy);
virtual ~FBUpdateLowRes() {};
bool prepare(hwc_context_t *ctx, hwc_display_contents_1 *list,
- int fbZorder);
+ int fbZorder);
bool draw(hwc_context_t *ctx, private_handle_t *hnd);
void reset();
private:
bool configure(hwc_context_t *ctx, hwc_display_contents_1 *list,
- int fbZorder);
+ int fbZorder);
ovutils::eDest mDest; //pipe to draw on
};
@@ -74,12 +75,12 @@
explicit FBUpdateHighRes(const int& dpy);
virtual ~FBUpdateHighRes() {};
bool prepare(hwc_context_t *ctx, hwc_display_contents_1 *list,
- int fbZorder);
+ int fbZorder);
bool draw(hwc_context_t *ctx, private_handle_t *hnd);
void reset();
private:
bool configure(hwc_context_t *ctx, hwc_display_contents_1 *list,
- int fbZorder);
+ int fbZorder);
ovutils::eDest mDestLeft; //left pipe to draw on
ovutils::eDest mDestRight; //right pipe to draw on
};