hwc/overlay: Dynamic pipe tracking.
Remove state based pipe handling and make pipes tracked dynamically.
Add the configStart, configDone, nextPipe availablePipes APIs.
Remove setState API.
-configStart marks all pipes available.
-configDone garbage-collects unused pipe objects.
-nextPipe returns the index of next available pipe and create a corresponding
pipe object if not present
-availablePipes returns total of "unallocated" pipes. (Pipes could be allocated
but unused)
Changes in hwc adapt to the new overlay APIs.
Compile out MDP comp.
Remove unused files in overlay and hwc.
Update licenses.
Conflicts:
libhwcomposer/hwc.cpp
libhwcomposer/hwc_utils.cpp
Bug: 7626586
Change-Id: Id8e56901d34e5dc0fd088260d05e3e46f68ff090
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index a6a6f3e..dea82df 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -15,16 +15,15 @@
* limitations under the License.
*/
+#include <sys/ioctl.h>
#include <EGL/egl.h>
-#include <overlay.h>
#include <cutils/properties.h>
#include <gralloc_priv.h>
#include <fb_priv.h>
+#include <overlay.h>
#include "hwc_utils.h"
#include "mdp_version.h"
-#include "hwc_video.h"
#include "external.h"
-#include "hwc_mdpcomp.h"
#include "QService.h"
namespace qhwc {
@@ -52,16 +51,13 @@
{
openFramebufferDevice(ctx);
overlay::Overlay::initOverlay();
- for(uint32_t i = 0; i < HWC_NUM_DISPLAY_TYPES; i++) {
- ctx->mOverlay[i] = overlay::Overlay::getInstance(i);
- }
+ ctx->mOverlay = overlay::Overlay::getInstance();
ctx->mQService = qService::QService::getInstance(ctx);
ctx->mMDP.version = qdutils::MDPVersion::getInstance().getMDPVersion();
ctx->mMDP.hasOverlay = qdutils::MDPVersion::getInstance().hasOverlay();
ctx->mMDP.panel = qdutils::MDPVersion::getInstance().getPanelType();
ctx->mExtDisplay = new ExternalDisplay(ctx);
ctx->mLayerCache = new LayerCache();
- MDPComp::init(ctx);
pthread_mutex_init(&(ctx->vstate.lock), NULL);
pthread_cond_init(&(ctx->vstate.cond), NULL);
@@ -73,11 +69,9 @@
void closeContext(hwc_context_t *ctx)
{
- for(uint32_t i = 0; i < HWC_NUM_DISPLAY_TYPES; i++) {
- if(ctx->mOverlay[i]) {
- delete ctx->mOverlay[i];
- ctx->mOverlay[i] = NULL;
- }
+ if(ctx->mOverlay) {
+ delete ctx->mOverlay;
+ ctx->mOverlay = NULL;
}
if(ctx->mFbDev) {