display: Add support for HW Cursor
- Retrieve cursor pipe info from driver
- Configure the layer marked with flag HWC_IS_CURSOR_LAYER to the
HWCursor using the fb_cursor ioctl.
- The config happens only when it satisfies the hw limitions of
cursor
- HWCursor is supported on primary display
- Since cursor configuration happens first, make use of drop
layer/count to handle other composition strategies
- Add support for hwc_setCursorPositionAsync as per HWC 1.4
Change-Id: I8663b6da89b0c2dd9b48af96d64a433b2b8a302c
diff --git a/libqdutils/mdp_version.cpp b/libqdutils/mdp_version.cpp
index a6a1b85..c02e28d 100644
--- a/libqdutils/mdp_version.cpp
+++ b/libqdutils/mdp_version.cpp
@@ -91,6 +91,7 @@
mRGBPipes = 0;
mVGPipes = 0;
mDMAPipes = 0;
+ mCursorPipes = 0;
mFeatures = 0;
mMDPUpscale = 1;
mMDPDownscale = 1;
@@ -110,6 +111,7 @@
// Default width of MDSS SSPP. For layer resolutions beyond this, we drive
// using two SSPP's.
mMaxPipeWidth = 2048;
+ mMaxCursorSize = 0;
updatePanelInfo();
@@ -309,6 +311,10 @@
else if(!strncmp(tokens[0], "dma_pipes", strlen("dma_pipes"))) {
mDMAPipes = (uint8_t)atoi(tokens[1]);
}
+ else if(!strncmp(tokens[0], "cursor_pipes",
+ strlen("cursor_pipes"))) {
+ mCursorPipes = (uint8_t)atoi(tokens[1]);
+ }
else if(!strncmp(tokens[0], "blending_stages",
strlen("blending_stages"))) {
mBlendStages = (uint8_t)atoi(tokens[1]);
@@ -354,6 +360,9 @@
mRotDownscale = true;
}
}
+ } else if(!strncmp(tokens[0], "max_cursor_size",
+ strlen("max_cursor_size"))) {
+ mMaxCursorSize = atoi(tokens[1]);
}
}
}
@@ -389,8 +398,8 @@
}
ALOGD_IF(DEBUG, "%s: mMDPVersion: %d mMdpRev: %x mRGBPipes:%d,"
- "mVGPipes:%d", __FUNCTION__, mMDPVersion, mMdpRev,
- mRGBPipes, mVGPipes);
+ "mVGPipes:%d mCursorPipes:%d", __FUNCTION__, mMDPVersion,
+ mMdpRev, mRGBPipes, mVGPipes, mCursorPipes);
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,