libhwcomposer: Fix UI freeze on 8660 on HDMI cable connect
-In 3 layer bypass case on hdmi cable connection, UI freezes. -Overlay state change from OV_BYPASS_3_LAYER to OV_UI_MIRROR directly not possible on 8660 as BF pipe is not available. -Add support to change overlay state via OV_CLOSED to make pipe free OV_BYPASS_3_LAYER-->OV_CLOSED-->OV_UI_MIRROR -Move processUEventOnline to prepare thread. Change-Id: I29c657ab799d1cd4ad52adcf6a8f86d18e76bcf9 CRs-Fixed: 386335 Conflicts: libhwcomposer/hwc_utils.h Conflicts: libhwcomposer/hwc_utils.cpp
This commit is contained in:
parent
e8cda20833
commit
9d12887c02
@ -92,7 +92,14 @@ static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list)
|
||||
|
||||
if(ctx->mExtDisplay->getExternalDisplay())
|
||||
ovutils::setExtType(ctx->mExtDisplay->getExternalDisplay());
|
||||
|
||||
if (ctx->hdmi_pending == true) {
|
||||
if ((qdutils::MDPVersion::getInstance().getMDPVersion() >=
|
||||
qdutils::MDP_V4_2) || (ctx->mOverlay->getState() !=
|
||||
ovutils::OV_BYPASS_3_LAYER)) {
|
||||
ctx->mExtDisplay->processUEventOnline((const char*)ctx->mHDMIEvent);
|
||||
ctx->hdmi_pending = false;
|
||||
}
|
||||
}
|
||||
if (LIKELY(list)) {
|
||||
//reset for this draw round
|
||||
VideoOverlay::reset();
|
||||
@ -128,7 +135,6 @@ static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list)
|
||||
|
||||
qdutils::CBUtils::checkforGPULayer(list);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -353,7 +353,7 @@ bool MDPComp::is_doable(hwc_composer_device_t *dev, hwc_layer_list_t* list) {
|
||||
}
|
||||
|
||||
//Disable MDPComp when ext display connected
|
||||
if(ctx->mExtDisplay->getExternalDisplay()) {
|
||||
if(ctx->mExtDisplay->getExternalDisplay()|| (ctx->hdmi_pending == true)) {
|
||||
ALOGD_IF(isDebug(), "%s: External display connected.", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
|
@ -50,8 +50,17 @@ static void handle_uevent(hwc_context_t* ctx, const char* udata, int len)
|
||||
// for now just parsing onlin/offline info is enough
|
||||
str = udata;
|
||||
if(!(strncmp(str,"online@",strlen("online@")))) {
|
||||
ctx->mExtDisplay->processUEventOnline(str);
|
||||
strncpy(ctx->mHDMIEvent,str,strlen(str));
|
||||
ctx->hdmi_pending = true;
|
||||
//Invalidate
|
||||
hwc_procs* proc = (hwc_procs*)ctx->device.reserved_proc[0];
|
||||
if(!proc) {
|
||||
ALOGE("%s: HWC proc not registered", __FUNCTION__);
|
||||
} else {
|
||||
proc->invalidate(proc);
|
||||
}
|
||||
} else if(!(strncmp(str,"offline@",strlen("offline@")))) {
|
||||
ctx->hdmi_pending = false;
|
||||
ctx->mExtDisplay->processUEventOffline(str);
|
||||
}
|
||||
}
|
||||
|
@ -70,6 +70,8 @@ void initContext(hwc_context_t *ctx)
|
||||
pthread_cond_init(&(ctx->vstate.cond), NULL);
|
||||
ctx->vstate.enable = false;
|
||||
|
||||
ctx->hdmi_pending = false;
|
||||
|
||||
ALOGI("Initializing Qualcomm Hardware Composer");
|
||||
ALOGI("MDP version: %d", ctx->mMDP.version);
|
||||
ALOGI("DYN composition threshold : %f", ctx->dynThreshold);
|
||||
|
@ -180,6 +180,8 @@ struct hwc_context_t {
|
||||
|
||||
// flag that indicate whether secure/desecure session in progress
|
||||
bool mSecureConfig;
|
||||
bool hdmi_pending;
|
||||
char mHDMIEvent[512];
|
||||
};
|
||||
|
||||
#endif //HWC_UTILS_H
|
||||
|
Loading…
Reference in New Issue
Block a user