Lines Matching refs:dpy
61 EGLAPI EGLBoolean eglGpuPerfHintQCOM(EGLDisplay dpy, EGLContext ctx,
126 void updateDisplayInfo(hwc_context_t* ctx, int dpy) { in updateDisplayInfo() argument
127 ctx->dpyAttr[dpy].fd = ctx->mHDMIDisplay->getFd(); in updateDisplayInfo()
128 ctx->dpyAttr[dpy].xres = ctx->mHDMIDisplay->getWidth(); in updateDisplayInfo()
129 ctx->dpyAttr[dpy].yres = ctx->mHDMIDisplay->getHeight(); in updateDisplayInfo()
130 ctx->dpyAttr[dpy].mMDPScalingMode = ctx->mHDMIDisplay->getMDPScalingMode(); in updateDisplayInfo()
131 ctx->dpyAttr[dpy].vsync_period = ctx->mHDMIDisplay->getVsyncPeriod(); in updateDisplayInfo()
135 ctx->dpyAttr[dpy].secure = true; in updateDisplayInfo()
136 ctx->mViewFrame[dpy].left = 0; in updateDisplayInfo()
137 ctx->mViewFrame[dpy].top = 0; in updateDisplayInfo()
138 ctx->mViewFrame[dpy].right = ctx->dpyAttr[dpy].xres; in updateDisplayInfo()
139 ctx->mViewFrame[dpy].bottom = ctx->dpyAttr[dpy].yres; in updateDisplayInfo()
143 void resetDisplayInfo(hwc_context_t* ctx, int dpy) { in resetDisplayInfo() argument
144 memset(&(ctx->dpyAttr[dpy]), 0, sizeof(ctx->dpyAttr[dpy])); in resetDisplayInfo()
145 memset(&(ctx->listStats[dpy]), 0, sizeof(ctx->listStats[dpy])); in resetDisplayInfo()
149 ctx->dpyAttr[dpy].fd = -1; in resetDisplayInfo()
153 void initCompositionResources(hwc_context_t* ctx, int dpy) { in initCompositionResources() argument
154 ctx->mFBUpdate[dpy] = IFBUpdate::getObject(ctx, dpy); in initCompositionResources()
155 ctx->mMDPComp[dpy] = MDPComp::getObject(ctx, dpy); in initCompositionResources()
158 void destroyCompositionResources(hwc_context_t* ctx, int dpy) { in destroyCompositionResources() argument
159 if(ctx->mFBUpdate[dpy]) { in destroyCompositionResources()
160 delete ctx->mFBUpdate[dpy]; in destroyCompositionResources()
161 ctx->mFBUpdate[dpy] = NULL; in destroyCompositionResources()
163 if(ctx->mMDPComp[dpy]) { in destroyCompositionResources()
164 delete ctx->mMDPComp[dpy]; in destroyCompositionResources()
165 ctx->mMDPComp[dpy] = NULL; in destroyCompositionResources()
502 void setRefreshRate(hwc_context_t* ctx, int dpy, uint32_t refreshRate) { in setRefreshRate() argument
504 if(!ctx || refreshRate == ctx->dpyAttr[dpy].dynRefreshRate) in setRefreshRate()
506 const int fbNum = Overlay::getFbForDpy(dpy); in setRefreshRate()
520 ctx->dpyAttr[dpy].dynRefreshRate = refreshRate; in setRefreshRate()
547 void getActionSafePosition(hwc_context_t *ctx, int dpy, hwc_rect_t& rect) { in getActionSafePosition() argument
553 if(!ctx->dpyAttr[dpy].mActionSafePresent) in getActionSafePosition()
556 int asWidthRatio = ctx->dpyAttr[dpy].mAsWidthRatio; in getActionSafePosition()
557 int asHeightRatio = ctx->dpyAttr[dpy].mAsHeightRatio; in getActionSafePosition()
564 uint32_t fbWidth = ctx->dpyAttr[dpy].xres; in getActionSafePosition()
565 uint32_t fbHeight = ctx->dpyAttr[dpy].yres; in getActionSafePosition()
566 if(ctx->dpyAttr[dpy].mMDPScalingMode) { in getActionSafePosition()
613 void getAspectRatioPosition(hwc_context_t* ctx, int dpy, int extOrientation, in getAspectRatioPosition() argument
616 float fbWidth = (float)ctx->dpyAttr[dpy].xres; in getAspectRatioPosition()
617 float fbHeight = (float)ctx->dpyAttr[dpy].yres; in getAspectRatioPosition()
698 if(ctx->dpyAttr[dpy].mMDPScalingMode) { in getAspectRatioPosition()
700 if(dpy == HWC_DISPLAY_EXTERNAL) { in getAspectRatioPosition()
702 } else if(dpy == HWC_DISPLAY_VIRTUAL) { in getAspectRatioPosition()
709 fbWidth = (float)ctx->dpyAttr[dpy].xres; in getAspectRatioPosition()
710 fbHeight = (float)ctx->dpyAttr[dpy].yres; in getAspectRatioPosition()
749 int dpy, in calcExtDisplayPosition() argument
756 if(dpy && ctx->mOverlay->isUIScalingOnExternalSupported()) { in calcExtDisplayPosition()
759 int dstWidth = ctx->dpyAttr[dpy].xres; in calcExtDisplayPosition()
760 int dstHeight = ctx->dpyAttr[dpy].yres;; in calcExtDisplayPosition()
779 if(ctx->dpyAttr[dpy].mMDPScalingMode) { in calcExtDisplayPosition()
783 float fbWidth = (float)ctx->dpyAttr[dpy].xres; in calcExtDisplayPosition()
784 float fbHeight = (float)ctx->dpyAttr[dpy].yres; in calcExtDisplayPosition()
786 if(dpy == HWC_DISPLAY_EXTERNAL) { in calcExtDisplayPosition()
788 } else if(dpy == HWC_DISPLAY_VIRTUAL) { in calcExtDisplayPosition()
810 if(extOrient || ctx->dpyAttr[dpy].mMDPScalingMode) { in calcExtDisplayPosition()
811 getAspectRatioPosition(ctx, dpy, extOrient, in calcExtDisplayPosition()
821 getActionSafePosition(ctx, dpy, displayFrame); in calcExtDisplayPosition()
895 const int& dpy) { in needsScalingWithSplit() argument
901 int hw_w = ctx->dpyAttr[dpy].xres; in needsScalingWithSplit()
902 int hw_h = ctx->dpyAttr[dpy].yres; in needsScalingWithSplit()
904 const int lSplit = getLeftSplit(ctx, dpy); in needsScalingWithSplit()
912 scissorL = getIntersection(ctx->mViewFrame[dpy], scissorL); in needsScalingWithSplit()
918 scissorR = getIntersection(ctx->mViewFrame[dpy], scissorR); in needsScalingWithSplit()
969 static void trimLayer(hwc_context_t *ctx, const int& dpy, const int& transform, in trimLayer() argument
971 int hw_w = ctx->dpyAttr[dpy].xres; in trimLayer()
972 int hw_h = ctx->dpyAttr[dpy].yres; in trimLayer()
976 scissor = getIntersection(ctx->mViewFrame[dpy], scissor); in trimLayer()
982 const int& dpy) { in trimList() argument
988 trimLayer(ctx, dpy, in trimList()
1000 hwc_display_contents_1_t *list, int dpy) { in setListStats() argument
1001 const int prevYuvCount = ctx->listStats[dpy].yuvCount; in setListStats()
1002 memset(&ctx->listStats[dpy], 0, sizeof(ListStats)); in setListStats()
1003 ctx->listStats[dpy].numAppLayers = (int)list->numHwLayers - 1; in setListStats()
1004 ctx->listStats[dpy].fbLayerIndex = (int)list->numHwLayers - 1; in setListStats()
1005 ctx->listStats[dpy].skipCount = 0; in setListStats()
1006 ctx->listStats[dpy].preMultipliedAlpha = false; in setListStats()
1007 ctx->listStats[dpy].isSecurePresent = false; in setListStats()
1008 ctx->listStats[dpy].yuvCount = 0; in setListStats()
1010 ctx->listStats[dpy].isDisplayAnimating = false; in setListStats()
1011 ctx->listStats[dpy].secureUI = false; in setListStats()
1012 ctx->listStats[dpy].yuv4k2kCount = 0; in setListStats()
1013 ctx->dpyAttr[dpy].mActionSafePresent = isActionSafePresent(ctx, dpy); in setListStats()
1014 ctx->listStats[dpy].renderBufIndexforABC = -1; in setListStats()
1015 ctx->listStats[dpy].secureRGBCount = 0; in setListStats()
1016 ctx->listStats[dpy].refreshRateRequest = ctx->dpyAttr[dpy].refreshRate; in setListStats()
1020 ctx->listStats[dpy].mAIVVideoMode = false; in setListStats()
1021 resetROI(ctx, dpy); in setListStats()
1023 trimList(ctx, list, dpy); in setListStats()
1025 for (size_t i = 0; i < (size_t)ctx->listStats[dpy].numAppLayers; i++) { in setListStats()
1032 if(ctx->mWindowboxFeature && dpy && isAIVVideoLayer(layer)) { in setListStats()
1033 ctx->listStats[dpy].mAIVVideoMode = true; in setListStats()
1036 ctx->listStats[dpy].isDisplayAnimating = true; in setListStats()
1039 ctx->listStats[dpy].secureUI = true; in setListStats()
1043 if(ctx->listStats[dpy].numAppLayers > MAX_NUM_APP_LAYERS) in setListStats()
1047 ctx->listStats[dpy].yuvIndices[i] = -1; in setListStats()
1048 ctx->listStats[dpy].yuv4k2kIndices[i] = -1; in setListStats()
1051 ctx->listStats[dpy].isSecurePresent = true; in setListStats()
1054 int& secureRGBCount = ctx->listStats[dpy].secureRGBCount; in setListStats()
1055 ctx->listStats[dpy].secureRGBIndices[secureRGBCount] = (int)i; in setListStats()
1061 ctx->listStats[dpy].skipCount++; in setListStats()
1065 int& yuvCount = ctx->listStats[dpy].yuvCount; in setListStats()
1066 ctx->listStats[dpy].yuvIndices[yuvCount] = (int)i; in setListStats()
1070 int& yuv4k2kCount = ctx->listStats[dpy].yuv4k2kCount; in setListStats()
1071 ctx->listStats[dpy].yuv4k2kIndices[yuv4k2kCount] = (int)i; in setListStats()
1076 ctx->listStats[dpy].preMultipliedAlpha = true; in setListStats()
1079 if (!dpy && mdpHw.isDynFpsSupported() && ctx->mUseMetaDataRefreshRate){ in setListStats()
1093 refreshRate = ctx->dpyAttr[dpy].refreshRate; in setListStats()
1100 if(ctx->listStats[dpy].yuvCount > 0) { in setListStats()
1116 if(prevYuvCount != ctx->listStats[dpy].yuvCount) { in setListStats()
1120 if(dpy == HWC_DISPLAY_PRIMARY) { in setListStats()
1123 ctx->listStats[dpy].refreshRateRequest = refreshRate ? in setListStats()
1124 refreshRate : ctx->dpyAttr[dpy].refreshRate; in setListStats()
1210 bool isActionSafePresent(hwc_context_t *ctx, int dpy) { in isActionSafePresent() argument
1216 if(!(dpy == HWC_DISPLAY_EXTERNAL) || in isActionSafePresent()
1225 ctx->dpyAttr[dpy].mAsWidthRatio = atoi(value); in isActionSafePresent()
1227 ctx->dpyAttr[dpy].mAsHeightRatio = atoi(value); in isActionSafePresent()
1229 if(!ctx->dpyAttr[dpy].mAsWidthRatio && !ctx->dpyAttr[dpy].mAsHeightRatio) { in isActionSafePresent()
1498 int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy, in hwc_sync() argument
1525 if(dpy) in hwc_sync()
1526 isExtAnimating = ctx->listStats[dpy].isDisplayAnimating; in hwc_sync()
1529 for(uint32_t i = 0; i < ctx->mLayerRotMap[dpy]->getCount(); i++) { in hwc_sync()
1532 overlay::Rotator* currRot = ctx->mLayerRotMap[dpy]->getRot(i); in hwc_sync()
1533 hwc_layer_1_t* currLayer = ctx->mLayerRotMap[dpy]->getLayer(i); in hwc_sync()
1547 if(LIKELY(!swapzero) and (not ctx->mLayerRotMap[dpy]->isRotCached(i))) in hwc_sync()
1582 if(ctx->listStats[dpy].renderBufIndexforABC ==(int32_t)i) in hwc_sync()
1604 if ((fd >= 0) && !dpy && ctx->mPtorInfo.isActive()) { in hwc_sync()
1611 fbFd = ctx->dpyAttr[dpy].fd; in hwc_sync()
1623 dpy, list->numHwLayers); in hwc_sync()
1650 ctx->listStats[dpy].renderBufIndexforABC !=(int32_t)i){ in hwc_sync()
1671 if (ctx->mCopyBit[dpy]) { in hwc_sync()
1672 if (!dpy && ctx->mPtorInfo.isActive()) in hwc_sync()
1673 ctx->mCopyBit[dpy]->setReleaseFdSync(releaseFd); in hwc_sync()
1675 ctx->mCopyBit[dpy]->setReleaseFd(releaseFd); in hwc_sync()
1679 ctx->mLayerRotMap[dpy]->setReleaseFd(releaseFd); in hwc_sync()
1805 const int& dpy, eMdpFlags& mdpFlags, eZorder& z, in configColorLayer() argument
1809 trimLayer(ctx, dpy, 0, dst, dst); in configColorLayer()
1811 int w = ctx->dpyAttr[dpy].xres; in configColorLayer()
1812 int h = ctx->dpyAttr[dpy].yres; in configColorLayer()
1911 void updateCropAIVVideoMode(hwc_context_t *ctx, hwc_rect_t& crop, int dpy) { in updateCropAIVVideoMode() argument
1912 ALOGD_IF(HWC_UTILS_DEBUG, "dpy %d Source crop [%d %d %d %d]", dpy, in updateCropAIVVideoMode()
1918 int extW = ctx->dpyAttr[dpy].xres; in updateCropAIVVideoMode()
1919 int extH = ctx->dpyAttr[dpy].yres; in updateCropAIVVideoMode()
1931 " source crop [%d %d %d %d]", extW, extH, dpy, in updateCropAIVVideoMode()
1937 hwc_rect_t& dst, int dpy) { in updateDestAIVVideoMode() argument
1938 ALOGD_IF(HWC_UTILS_DEBUG, "dpy %d Destination position [%d %d %d %d]", dpy, in updateDestAIVVideoMode()
1943 int extW = ctx->dpyAttr[dpy].xres; in updateDestAIVVideoMode()
1944 int extH = ctx->dpyAttr[dpy].yres; in updateDestAIVVideoMode()
1961 extW, extH, dpy, dst.left, dst.top, dst.right, dst.bottom, in updateDestAIVVideoMode()
1966 hwc_rect_t& dst, int dpy) { in updateCoordinates() argument
1967 updateCropAIVVideoMode(ctx, crop, dpy); in updateCoordinates()
1968 updateDestAIVVideoMode(ctx, crop, dst, dpy); in updateCoordinates()
1972 const int& dpy, eMdpFlags& mdpFlags, eZorder& z, in configureNonSplit() argument
1980 return configColorLayer(ctx, layer, dpy, mdpFlags, z, dest); in configureNonSplit()
2004 if(ctx->listStats[dpy].mAIVVideoMode && isYuvBuffer(hnd)) { in configureNonSplit()
2005 updateCoordinates(ctx, crop, dst, dpy); in configureNonSplit()
2007 calcExtDisplayPosition(ctx, hnd, dpy, crop, dst, transform, orient); in configureNonSplit()
2015 ctx->mLayerRotMap[dpy]->add(layer, *rot); in configureNonSplit()
2016 BwcPM::setBwc(ctx, dpy, hnd, crop, dst, transform, downscale, in configureNonSplit()
2071 const int& dpy, eMdpFlags& mdpFlagsL, eZorder& z, in configureSplit() argument
2082 int hw_w = ctx->dpyAttr[dpy].xres; in configureSplit()
2083 int hw_h = ctx->dpyAttr[dpy].yres; in configureSplit()
2101 if(ctx->listStats[dpy].mAIVVideoMode && isYuvBuffer(hnd)) { in configureSplit()
2102 updateCoordinates(ctx, crop, dst, dpy); in configureSplit()
2107 calcExtDisplayPosition(ctx, hnd, dpy, crop, dst, transform, orient); in configureSplit()
2126 ctx->mLayerRotMap[dpy]->add(layer, *rot); in configureSplit()
2142 const int lSplit = getLeftSplit(ctx, dpy); in configureSplit()
2149 scissor = getIntersection(ctx->mViewFrame[dpy], scissor); in configureSplit()
2158 scissor = getIntersection(ctx->mViewFrame[dpy], scissor); in configureSplit()
2221 const int& dpy, eMdpFlags& mdpFlagsL, eZorder& z, in configureSourceSplit() argument
2247 if(ctx->listStats[dpy].mAIVVideoMode && isYuvBuffer(hnd)) { in configureSourceSplit()
2248 updateCoordinates(ctx, crop, dst, dpy); in configureSourceSplit()
2253 calcExtDisplayPosition(ctx, hnd, dpy, crop, dst, transform, orient); in configureSourceSplit()
2256 trimLayer(ctx, dpy, transform, crop, dst); in configureSourceSplit()
2261 ctx->mLayerRotMap[dpy]->add(layer, *rot); in configureSourceSplit()
2346 bool canUseRotator(hwc_context_t *ctx, int dpy) { in canUseRotator() argument
2353 if(dpy == HWC_DISPLAY_PRIMARY) in canUseRotator()
2362 int getLeftSplit(hwc_context_t *ctx, const int& dpy) { in getLeftSplit() argument
2364 int lSplit = ctx->dpyAttr[dpy].xres / 2; in getLeftSplit()
2365 if(dpy == HWC_DISPLAY_PRIMARY && in getLeftSplit()
2373 bool isDisplaySplit(hwc_context_t* ctx, int dpy) { in isDisplaySplit() argument
2375 if(ctx->dpyAttr[dpy].xres > mdpHw.getMaxPipeWidth()) { in isDisplaySplit()
2379 if(dpy == HWC_DISPLAY_PRIMARY && mdpHw.getRightSplit()) { in isDisplaySplit()
2386 void reset_layer_prop(hwc_context_t* ctx, int dpy, int numAppLayers) { in reset_layer_prop() argument
2387 if(ctx->layerProp[dpy]) { in reset_layer_prop()
2388 delete[] ctx->layerProp[dpy]; in reset_layer_prop()
2389 ctx->layerProp[dpy] = NULL; in reset_layer_prop()
2391 ctx->layerProp[dpy] = new LayerProp[numAppLayers]; in reset_layer_prop()
2536 void BwcPM::setBwc(const hwc_context_t *ctx, const int& dpy, in setBwc() argument
2551 if(dpy) return; in setBwc()
2650 void resetROI(hwc_context_t *ctx, const int dpy) { in resetROI() argument
2651 const int fbXRes = (int)ctx->dpyAttr[dpy].xres; in resetROI()
2652 const int fbYRes = (int)ctx->dpyAttr[dpy].yres; in resetROI()
2659 isDisplaySplit(ctx, dpy)) { in resetROI()
2660 const int lSplit = getLeftSplit(ctx, dpy); in resetROI()
2661 ctx->listStats[dpy].lRoi = (struct hwc_rect){0, 0, lSplit, fbYRes}; in resetROI()
2662 ctx->listStats[dpy].rRoi = (struct hwc_rect){lSplit, 0, fbXRes, fbYRes}; in resetROI()
2664 ctx->listStats[dpy].lRoi = (struct hwc_rect){0, 0,fbXRes, fbYRes}; in resetROI()
2665 ctx->listStats[dpy].rRoi = (struct hwc_rect){0, 0, 0, 0}; in resetROI()
2748 void handle_pause(hwc_context_t* ctx, int dpy) { in handle_pause() argument
2749 if(ctx->dpyAttr[dpy].connected) { in handle_pause()
2751 ctx->dpyAttr[dpy].isActive = true; in handle_pause()
2752 ctx->dpyAttr[dpy].isPause = true; in handle_pause()
2763 if (!Overlay::displayCommit(ctx->dpyAttr[dpy].fd)) { in handle_pause()
2765 __FUNCTION__, dpy); in handle_pause()
2773 void handle_resume(hwc_context_t* ctx, int dpy) { in handle_resume() argument
2774 if(ctx->dpyAttr[dpy].connected) { in handle_resume()
2776 ctx->dpyAttr[dpy].isConfiguring = true; in handle_resume()
2777 ctx->dpyAttr[dpy].isActive = true; in handle_resume()
2786 ctx->dpyAttr[dpy].isPause = false; in handle_resume()
2793 void clearPipeResources(hwc_context_t* ctx, int dpy) { in clearPipeResources() argument
2803 if(!Overlay::displayCommit(ctx->dpyAttr[dpy].fd)) { in clearPipeResources()
2804 ALOGE("%s: display commit failed for %d", __FUNCTION__, dpy); in clearPipeResources()
2810 void handle_online(hwc_context_t* ctx, int dpy) { in handle_online() argument
2819 if (ctx->dpyAttr[dpy].fd >= 0) { in handle_online()
2820 close(ctx->dpyAttr[dpy].fd); in handle_online()
2821 ctx->dpyAttr[dpy].fd = -1; in handle_online()
2827 updateDisplayInfo(ctx, dpy); in handle_online()
2828 initCompositionResources(ctx, dpy); in handle_online()
2829 ctx->dpyAttr[dpy].connected = true; in handle_online()
2834 void handle_offline(hwc_context_t* ctx, int dpy) { in handle_offline() argument
2835 destroyCompositionResources(ctx, dpy); in handle_offline()
2841 clearPipeResources(ctx, dpy); in handle_offline()
2844 resetDisplayInfo(ctx, dpy); in handle_offline()
2845 ctx->dpyAttr[dpy].connected = false; in handle_offline()
2846 ctx->dpyAttr[dpy].isActive = false; in handle_offline()