Revert "Set priority among various display devices"
* This reverts commit 52b4fdbdbd4b935c48164542cdd1f4a1292cb08a.
* Since DisplayDevices are not created for non-wfd virtual
displays(CTS/SR/SSD) anymore, we can remove these checks.
Change-Id: I9249a70c6d6f6b42f268e6ec8a28c0a86b954c4e
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index cc18686..879e4bd 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -2058,32 +2058,6 @@
return (ctx->enableABC && ctx->listStats[0].renderBufIndexforABC == 0);
}
-/* Since we fake non-Hybrid WFD solution as external display, this
- * function helps us in determining the priority between external
- * (hdmi/non-Hybrid WFD display) and virtual display devices(SSD/
- * screenrecord). This can be removed once wfd-client migrates to
- * using virtual-display api's.
- */
-bool canUseMDPforVirtualDisplay(hwc_context_t* ctx,
- const hwc_display_contents_1_t *list) {
-
- /* We rely on the fact that for pure virtual display solution
- * list->outbuf will be a non-NULL handle.
- *
- * If there are three active displays (which means there is one
- * primary, one external and one virtual active display)
- * we give mdss/mdp hw resources(pipes,smp,etc) for external
- * display(hdmi/non-Hybrid WFD display) rather than for virtual
- * display(SSD/screenrecord)
- */
-
- if(list->outbuf and (ctx->numActiveDisplays == HWC_NUM_DISPLAY_TYPES)) {
- return false;
- }
-
- return true;
-}
-
void dumpBuffer(private_handle_t *ohnd, char *bufferName) {
if (ohnd != NULL && ohnd->base) {
char dumpFilename[PATH_MAX];
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 49a01b2..dd55f8b 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -274,8 +274,6 @@
void reset_layer_prop(hwc_context_t* ctx, int dpy, int numAppLayers);
bool isAbcInUse(hwc_context_t *ctx);
-bool canUseMDPforVirtualDisplay(hwc_context_t* ctx,
- const hwc_display_contents_1_t *list);
void dumpBuffer(private_handle_t *ohnd, char *bufferName);
//Helper function to dump logs
diff --git a/libhwcomposer/hwc_virtual.cpp b/libhwcomposer/hwc_virtual.cpp
index 01c0873..f8f3b45 100644
--- a/libhwcomposer/hwc_virtual.cpp
+++ b/libhwcomposer/hwc_virtual.cpp
@@ -296,8 +296,7 @@
if (LIKELY(list && list->numHwLayers > 1) &&
ctx->dpyAttr[dpy].isActive &&
- ctx->dpyAttr[dpy].connected &&
- canUseMDPforVirtualDisplay(ctx,list)) {
+ ctx->dpyAttr[dpy].connected) {
reset_layer_prop(ctx, dpy, (int)list->numHwLayers - 1);
if(!ctx->dpyAttr[dpy].isPause) {
ctx->dpyAttr[dpy].isConfiguring = false;
@@ -332,8 +331,7 @@
if (LIKELY(list) && ctx->dpyAttr[dpy].isActive &&
ctx->dpyAttr[dpy].connected &&
- (!ctx->dpyAttr[dpy].isPause) &&
- canUseMDPforVirtualDisplay(ctx,list)) {
+ !ctx->dpyAttr[dpy].isPause) {
uint32_t last = (uint32_t)list->numHwLayers - 1;
hwc_layer_1_t *fbLayer = &list->hwLayers[last];
int fd = -1; //FenceFD from the Copybit(valid in async mode)