Merge "hwc/overlay: If configRotator fails, mark all pipes as available."
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
b27da8ff97
@@ -908,6 +908,7 @@ int configureLowRes(hwc_context_t *ctx, hwc_layer_1_t *layer,
|
|||||||
//Configure rotator for pre-rotation
|
//Configure rotator for pre-rotation
|
||||||
if(configRotator(*rot, whf, crop, mdpFlags, orient, downscale) < 0) {
|
if(configRotator(*rot, whf, crop, mdpFlags, orient, downscale) < 0) {
|
||||||
ALOGE("%s: configRotator failed!", __FUNCTION__);
|
ALOGE("%s: configRotator failed!", __FUNCTION__);
|
||||||
|
ctx->mOverlay->clear(dpy);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
whf.format = (*rot)->getDstFormat();
|
whf.format = (*rot)->getDstFormat();
|
||||||
@@ -981,6 +982,7 @@ int configureHighRes(hwc_context_t *ctx, hwc_layer_1_t *layer,
|
|||||||
//Configure rotator for pre-rotation
|
//Configure rotator for pre-rotation
|
||||||
if(configRotator(*rot, whf, crop, mdpFlagsL, orient, downscale) < 0) {
|
if(configRotator(*rot, whf, crop, mdpFlagsL, orient, downscale) < 0) {
|
||||||
ALOGE("%s: configRotator failed!", __FUNCTION__);
|
ALOGE("%s: configRotator failed!", __FUNCTION__);
|
||||||
|
ctx->mOverlay->clear(dpy);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
whf.format = (*rot)->getDstFormat();
|
whf.format = (*rot)->getDstFormat();
|
||||||
|
|||||||
@@ -311,6 +311,16 @@ void Overlay::getDump(char *buf, size_t len) {
|
|||||||
strncat(buf, str_pipes, strlen(str_pipes));
|
strncat(buf, str_pipes, strlen(str_pipes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Overlay::clear(int dpy) {
|
||||||
|
for(int i = 0; i < PipeBook::NUM_PIPES; i++) {
|
||||||
|
if (mPipeBook[i].mDisplay == dpy) {
|
||||||
|
// Mark as available for this round
|
||||||
|
PipeBook::resetUse(i);
|
||||||
|
PipeBook::resetAllocation(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Overlay::PipeBook::init() {
|
void Overlay::PipeBook::init() {
|
||||||
mPipe = NULL;
|
mPipe = NULL;
|
||||||
mDisplay = DPY_UNUSED;
|
mDisplay = DPY_UNUSED;
|
||||||
|
|||||||
@@ -90,6 +90,8 @@ public:
|
|||||||
* to populate.
|
* to populate.
|
||||||
*/
|
*/
|
||||||
void getDump(char *buf, size_t len);
|
void getDump(char *buf, size_t len);
|
||||||
|
/* Reset usage and allocation bits on all pipes for given display */
|
||||||
|
void clear(int dpy);
|
||||||
static void setDMAMode(const int& mode);
|
static void setDMAMode(const int& mode);
|
||||||
static int getDMAMode();
|
static int getDMAMode();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user