hwcomposer: Remove vsync event control for WFD External Display
Change-Id: Ic0ffcfb035a8d0037d6394cb4b77888390eb7608
This commit is contained in:
parent
ad7f1aa0d3
commit
d0181d6f7c
@ -134,7 +134,8 @@ static int hwc_eventControl(struct hwc_composer_device* dev,
|
||||
if(ioctl(m->framebuffer->fd, MSMFB_OVERLAY_VSYNC_CTRL, &value) < 0)
|
||||
ret = -errno;
|
||||
|
||||
if(ctx->mExtDisplay->getExternalDisplay()) {
|
||||
if(ctx->mExtDisplay->isHDMIConfigured() &&
|
||||
(ctx->mExtDisplay->getExternalDisplay()==EXTERN_DISPLAY_FB1)) {
|
||||
ret = ctx->mExtDisplay->enableHDMIVsync(value);
|
||||
}
|
||||
break;
|
||||
|
@ -446,6 +446,17 @@ void ExternalDisplay::processUEventOffline(const char *str) {
|
||||
setExternalDisplay(EXTERN_DISPLAY_NONE);
|
||||
}
|
||||
|
||||
void ExternalDisplay::configureWFDDisplay(int fbIndex) {
|
||||
int ret = 0;
|
||||
if (!openFrameBuffer(fbIndex))
|
||||
return;
|
||||
ret = ioctl(mFd, FBIOGET_VSCREENINFO, &mVInfo);
|
||||
if(ret < 0) {
|
||||
ALOGD("In %s: FBIOGET_VSCREENINFO failed Err Str = %s", __FUNCTION__,
|
||||
strerror(errno));
|
||||
}
|
||||
mVInfo.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_ALL | FB_ACTIVATE_FORCE;
|
||||
}
|
||||
|
||||
void ExternalDisplay::processUEventOnline(const char *str) {
|
||||
const char *s1 = str + (strlen(str)-strlen(DEVICE_NODE_FB1));
|
||||
@ -463,7 +474,7 @@ void ExternalDisplay::processUEventOnline(const char *str) {
|
||||
setResolution(getBestMode());
|
||||
enableHDMIVsync(EXTERN_DISPLAY_FB1);
|
||||
} else {
|
||||
openFrameBuffer(EXTERN_DISPLAY_FB1);
|
||||
configureWFDDisplay(EXTERN_DISPLAY_FB1);
|
||||
}
|
||||
setExternalDisplay(EXTERN_DISPLAY_FB1);
|
||||
}
|
||||
@ -474,7 +485,7 @@ void ExternalDisplay::processUEventOnline(const char *str) {
|
||||
// Do Not Override.
|
||||
}else {
|
||||
// WFD is connected
|
||||
openFrameBuffer(EXTERN_DISPLAY_FB2);
|
||||
configureWFDDisplay(EXTERN_DISPLAY_FB2);
|
||||
setExternalDisplay(EXTERN_DISPLAY_FB2);
|
||||
}
|
||||
}
|
||||
@ -536,9 +547,9 @@ bool ExternalDisplay::commit()
|
||||
if(mFd == -1) {
|
||||
return false;
|
||||
} else if(ioctl(mFd, FBIOPUT_VSCREENINFO, &mVInfo) == -1) {
|
||||
ALOGE("%s: FBIOPUT_VSCREENINFO failed, str: %s", __FUNCTION__,
|
||||
strerror(errno));
|
||||
return false;
|
||||
ALOGE("%s: FBIOPUT_VSCREENINFO failed, str: %s", __FUNCTION__,
|
||||
strerror(errno));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -89,6 +89,7 @@ class ExternalDisplay
|
||||
int getModeOrder(int mode);
|
||||
int getBestMode();
|
||||
void resetInfo();
|
||||
void configureWFDDisplay(int fbIndex);
|
||||
|
||||
mutable android::Mutex mExtDispLock;
|
||||
int mFd;
|
||||
|
Loading…
Reference in New Issue
Block a user