hwc/overlay: If configRotator fails, mark all pipes as available.
If configRotator fails, reset usage & allocation bits on all pipes
for the given display to make them available for the current draw
cycle. It is required because if external is connected and Rotator
commit() on Video fails, all pipes which were picked-up by primary
are not available for FB update, hence it runs out of pipes.
CRs-Fixed: 483002
Change-Id: Ifd0d708e4ef8e3ddbe9d0531f6090539b8dcb249
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index 05bdfb9..ab48c8d 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -908,6 +908,7 @@
//Configure rotator for pre-rotation
if(configRotator(*rot, whf, crop, mdpFlags, orient, downscale) < 0) {
ALOGE("%s: configRotator failed!", __FUNCTION__);
+ ctx->mOverlay->clear(dpy);
return -1;
}
whf.format = (*rot)->getDstFormat();
@@ -981,6 +982,7 @@
//Configure rotator for pre-rotation
if(configRotator(*rot, whf, crop, mdpFlagsL, orient, downscale) < 0) {
ALOGE("%s: configRotator failed!", __FUNCTION__);
+ ctx->mOverlay->clear(dpy);
return -1;
}
whf.format = (*rot)->getDstFormat();