qdutils: Parse low and high bandwidth from mdp capabilities node
Parse low and high bandwidth from mdp capabilities sysfs node
/sys/class/graphics/fb0/mdp/caps
This will be specified in kbps.
Conflicts:
libqdutils/mdp_version.cpp
Change-Id: I2956e340106d47bb49f5744e4f9a4a0bb796f6e3
diff --git a/libqdutils/mdp_version.cpp b/libqdutils/mdp_version.cpp
index 0809fd0..e12b319 100644
--- a/libqdutils/mdp_version.cpp
+++ b/libqdutils/mdp_version.cpp
@@ -48,6 +48,8 @@
mMDPUpscale = 0;
mMDPDownscale = 0;
mPanelType = NO_PANEL;
+ mLowBw = 0;
+ mHighBw = 0;
if(!updatePanelInfo()) {
ALOGE("Unable to read Primary Panel Information");
@@ -168,8 +170,13 @@
else if(!strncmp(tokens[0], "max_upscale_ratio",
strlen("max_upscale_ratio"))) {
mMDPUpscale = atoi(tokens[1]);
- }
- else if(!strncmp(tokens[0], "features", strlen("features"))) {
+ } else if(!strncmp(tokens[0], "max_bandwidth_low",
+ strlen("max_bandwidth_low"))) {
+ mLowBw = atol(tokens[1]);
+ } else if(!strncmp(tokens[0], "max_bandwidth_high",
+ strlen("max_bandwidth_high"))) {
+ mHighBw = atol(tokens[1]);
+ } else if(!strncmp(tokens[0], "features", strlen("features"))) {
for(int i=1; i<index;i++) {
if(!strncmp(tokens[i], "bwc", strlen("bwc"))) {
mFeatures |= MDP_BWC_EN;
@@ -191,6 +198,9 @@
mRGBPipes, mVGPipes);
ALOGD_IF(DEBUG, "%s:mDMAPipes:%d \t mMDPDownscale:%d, mFeatures:%d",
__FUNCTION__, mDMAPipes, mMDPDownscale, mFeatures);
+ ALOGD_IF(DEBUG, "%s:mLowBw: %lu mHighBw: %lu", __FUNCTION__, mLowBw,
+ mHighBw);
+
return true;
}
diff --git a/libqdutils/mdp_version.h b/libqdutils/mdp_version.h
index 1e1e35e..fb7920e 100644
--- a/libqdutils/mdp_version.h
+++ b/libqdutils/mdp_version.h
@@ -113,6 +113,8 @@
bool is8x92();
int getLeftSplit() { return mSplit.left(); }
int getRightSplit() { return mSplit.right(); }
+ unsigned long getLowBw() { return mLowBw; }
+ unsigned long getHighBw() { return mHighBw; }
private:
bool updateSysFsInfo();
bool updatePanelInfo();
@@ -131,6 +133,8 @@
uint32_t mMDPDownscale;
uint32_t mMDPUpscale;
Split mSplit;
+ unsigned long mLowBw; //kbps
+ unsigned long mHighBw; //kbps
};
}; //namespace qdutils
#endif //INCLUDE_LIBQCOMUTILS_MDPVER