diff --git a/libgralloc-qsd8k/framebuffer.cpp b/libgralloc-qsd8k/framebuffer.cpp index 6d9a929..794adb4 100644 --- a/libgralloc-qsd8k/framebuffer.cpp +++ b/libgralloc-qsd8k/framebuffer.cpp @@ -315,10 +315,11 @@ static void *hdmi_ui_loop(void *ptr) break; } } - if(rot != m->currentOrientation) { + int currOrientation = 0; + pTemp->getOrientation(currOrientation); + if(rot != currOrientation) { pTemp->setParameter(OVERLAY_TRANSFORM, rot); - m->currentOrientation = rot; } EVEN_OUT(asX); EVEN_OUT(asY); diff --git a/libgralloc-qsd8k/gralloc_priv.h b/libgralloc-qsd8k/gralloc_priv.h index 7e41906..39b488e 100755 --- a/libgralloc-qsd8k/gralloc_priv.h +++ b/libgralloc-qsd8k/gralloc_priv.h @@ -235,7 +235,6 @@ struct private_module_t { bool exitHDMIUILoop; float actionsafeWidthRatio; float actionsafeHeightRatio; - int currentOrientation; bool hdmiStateChanged; pthread_mutex_t overlayLock; pthread_cond_t overlayPost; diff --git a/liboverlay/overlayLib.cpp b/liboverlay/overlayLib.cpp index 53d430b..00a5ccb 100644 --- a/liboverlay/overlayLib.cpp +++ b/liboverlay/overlayLib.cpp @@ -1109,14 +1109,8 @@ bool OverlayControlChannel::getPosition(int& x, int& y, bool OverlayControlChannel::getOrientation(int& orientation) const { if (!isChannelUP()) return false; - - mdp_overlay ov; - ov.id = mOVInfo.id; - if (ioctl(mFD, MSMFB_OVERLAY_GET, &ov)) { - reportError("getOrientation, overlay GET failed"); - return false; - } - orientation = ov.user_data[0]; + // mOVInfo has the current orientation + orientation = mOVInfo.user_data[0]; return true; } bool OverlayControlChannel::getOvSessionID(int& sessionID) const {