void ExternalDisplay::setActionSafeDimension(int w, int h) { ALOGD_IF(DEBUG,"ActionSafe w=%d h=%d", w, h); Mutex::Autolock lock(mExtDispLock); char actionsafeWidth[PROPERTY_VALUE_MAX]; char actionsafeHeight[PROPERTY_VALUE_MAX]; sprintf(actionsafeWidth, "%d", w); property_set("hw.actionsafe.width", actionsafeWidth); sprintf(actionsafeHeight, "%d", h); property_set("hw.actionsafe.height", actionsafeHeight); setExternalDisplay(true, mHdmiFbNum); }
void ExternalDisplay::processUEventOffline(const char *str) { const char *s1 = str + (strlen(str)-strlen(DEVICE_NODE_FB1)); // check if it is for FB1 if(strncmp(s1,DEVICE_NODE_FB1, strlen(DEVICE_NODE_FB1))== 0) { if(isHDMIConfigured()) { enableHDMIVsync(EXTERN_DISPLAY_NONE); closeFrameBuffer(); resetInfo(); } else { closeFrameBuffer(); } } else if(strncmp(s1, DEVICE_NODE_FB2, strlen(DEVICE_NODE_FB2)) == 0) { closeFrameBuffer(); } setExternalDisplay(EXTERN_DISPLAY_NONE); }
int ExternalDisplay::configureWFDDisplay() { int ret = 0; if(mConnectedFbNum == mHdmiFbNum) { ALOGE("%s: Cannot process WFD connection while HDMI is active", __FUNCTION__); return -1; } openFrameBuffer(mWfdFbNum); if(mFd == -1) return -1; ret = ioctl(mFd, FBIOGET_VSCREENINFO, &mVInfo); if(ret < 0) { ALOGD("In %s: FBIOGET_VSCREENINFO failed Err Str = %s", __FUNCTION__, strerror(errno)); } setDpyWfdAttr(); setExternalDisplay(true, mWfdFbNum); return 0; }
int ExternalDisplay::configureHDMIDisplay() { openFrameBuffer(mHdmiFbNum); if(mFd == -1) return -1; readCEUnderscanInfo(); readResolution(); // TODO: Move this to activate /* Used for changing the resolution * getUserMode will get the preferred * mode set thru adb shell */ int mode = getUserMode(); if (mode == -1) { //Get the best mode and set mode = getBestMode(); } setResolution(mode); setDpyHdmiAttr(); setExternalDisplay(true, mHdmiFbNum); return 0; }
void ExternalDisplay::setActionSafeDimension(int w, int h) { ALOGD_IF(DEBUG,"ActionSafe w=%d h=%d", w, h); Mutex::Autolock lock(mExtDispLock); overlay::utils::ActionSafe::getInstance()->setDimension(w, h); setExternalDisplay(mExternalDisplay); }