Home | History | Annotate | Download | only in libhwcomposer

Lines Matching refs:ctx

83 bool MDPComp::init(hwc_context_t *ctx) {
85 if(!ctx) {
119 if(ctx->mMDP.panel != MIPI_CMD_PANEL) {
135 idleInvalidator->init(timeout_handler, ctx, idle_timeout);
148 struct hwc_context_t* ctx = (struct hwc_context_t*)(udata);
150 if(!ctx) {
155 if(!ctx->proc) {
161 ctx->proc->invalidate(ctx->proc);
164 void MDPComp::setMDPCompLayerFlags(hwc_context_t *ctx,
166 LayerProp *layerProp = ctx->layerProp[mDpy];
168 for(int index = 0; index < ctx->listStats[mDpy].numAppLayers; index++) {
243 bool MDPComp::isSupportedForMDPComp(hwc_context_t *ctx, hwc_layer_1_t* layer) {
246 (not isValidDimension(ctx,layer))
254 bool MDPComp::isValidDimension(hwc_context_t *ctx, hwc_layer_1_t *layer) {
267 int hw_w = ctx->dpyAttr[mDpy].xres;
268 int hw_h = ctx->dpyAttr[mDpy].yres;
293 if(ctx->mMDP.version >= qdutils::MDSS_V5) {
309 ovutils::eDest MDPComp::getMdpPipe(hwc_context_t *ctx, ePipeType type,
311 overlay::Overlay& ov = *ctx->mOverlay;
340 bool MDPComp::isFrameDoable(hwc_context_t *ctx) {
342 const int numAppLayers = ctx->listStats[mDpy].numAppLayers;
348 ctx->mVideoTransFlag &&
349 isSecondaryConnected(ctx)) {
354 } else if(isSecondaryConfiguring(ctx)) {
358 } else if(ctx->isPaddingRound) {
359 ctx->isPaddingRound = false;
368 bool MDPComp::isFullFrameDoable(hwc_context_t *ctx,
371 const int numAppLayers = ctx->listStats[mDpy].numAppLayers;
378 if(isSkipPresent(ctx, mDpy)) {
381 isSkipPresent(ctx, mDpy));
385 if(ctx->listStats[mDpy].needsAlphaScale
386 && ctx->mMDP.version < qdutils::MDSS_V5) {
396 if(!canUseRotator(ctx, mDpy)) {
410 (ctx->dpyAttr[mDpy].xres > 1024) &&
416 if(ctx->mAD->isDoable()) {
422 if(fullMDPComp(ctx, list)) {
424 } else if(partialMDPComp(ctx, list)) {
430 bool MDPComp::fullMDPComp(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
446 const int numAppLayers = ctx->listStats[mDpy].numAppLayers;
449 if(not isSupportedForMDPComp(ctx, layer)) {
467 if(!arePipesAvailable(ctx, list)) {
474 bool MDPComp::partialMDPComp(hwc_context_t *ctx, hwc_display_contents_1_t* list)
482 if(isLoadBasedCompDoable(ctx, list)) {
483 ret = loadBasedComp(ctx, list);
487 ret = cacheBasedComp(ctx, list);
493 bool MDPComp::cacheBasedComp(hwc_context_t *ctx,
495 int numAppLayers = ctx->listStats[mDpy].numAppLayers;
497 updateLayerCache(ctx, list);
503 if(not isSupportedForMDPComp(ctx, layer)) {
511 updateYUV(ctx, list);
512 bool ret = batchLayers(ctx, list); //sets up fbZ also
540 if(!arePipesAvailable(ctx, list)) {
547 bool MDPComp::loadBasedComp(hwc_context_t *ctx,
549 int numAppLayers = ctx->listStats[mDpy].numAppLayers;
587 if(not isSupportedForMDPComp(ctx, layer)) {
600 if(!arePipesAvailable(ctx, list)) {
609 bool MDPComp::isLoadBasedCompDoable(hwc_context_t *ctx,
611 if(mDpy or isSecurePresent(ctx, mDpy) or
618 bool MDPComp::isOnlyVideoDoable(hwc_context_t *ctx,
620 int numAppLayers = ctx->listStats[mDpy].numAppLayers;
622 updateYUV(ctx, list);
626 if(!isYuvPresent(ctx, mDpy)) {
638 if(!arePipesAvailable(ctx, list)) {
642 int nYuvCount = ctx->listStats[mDpy].yuvCount;
644 int nYuvIndex = ctx->listStats[mDpy].yuvIndices[index];
662 bool MDPComp::isYUVDoable(hwc_context_t* ctx, hwc_layer_1_t* layer) {
668 if(layer->transform & HWC_TRANSFORM_ROT_90 && !canUseRotator(ctx,mDpy)) {
673 if(isSecuring(ctx, layer)) {
678 if(!isValidDimension(ctx, layer)) {
687 bool MDPComp::batchLayers(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
726 if(not isSupportedForMDPComp(ctx, layer)) {
745 void MDPComp::updateLayerCache(hwc_context_t* ctx,
747 int numAppLayers = ctx->listStats[mDpy].numAppLayers;
768 void MDPComp::updateYUV(hwc_context_t* ctx, hwc_display_contents_1_t* list) {
770 int nYuvCount = ctx->listStats[mDpy].yuvCount;
772 int nYuvIndex = ctx->listStats[mDpy].yuvIndices[index];
775 if(!isYUVDoable(ctx, layer)) {
794 bool MDPComp::programMDP(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
795 if(!allocLayerPipes(ctx, list)) {
810 if(configure(ctx, layer, mCurrentFrame.mdpToLayer[mdpIndex]) != 0 ){
824 bool MDPComp::programYUV(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
825 if(!allocLayerPipes(ctx, list)) {
839 if(configure(ctx, layer,
850 int MDPComp::prepare(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
851 const int numLayers = ctx->listStats[mDpy].numAppLayers;
866 if(!isFrameDoable(ctx)) {
874 if(isFullFrameDoable(ctx, list)) {
878 if(!ctx->mFBUpdate[mDpy]->prepare(ctx, list,
886 if(!programMDP(ctx, list)) {
898 isSkipPresent(ctx, mDpy))) {
902 } else if(isOnlyVideoDoable(ctx, list)) {
915 if(!ctx->mFBUpdate[mDpy]->prepare(ctx, list, mCurrentFrame.fbZ)) {
921 if(!programYUV(ctx, list)) {
931 setMDPCompLayerFlags(ctx, list);
950 int MDPCompLowRes::configure(hwc_context_t *ctx, hwc_layer_1_t *layer,
962 return configureLowRes(ctx, layer, mDpy, mdpFlags, zOrder, isFg, dest,
966 bool MDPCompLowRes::arePipesAvailable(hwc_context_t *ctx,
968 overlay::Overlay& ov = *ctx->mOverlay;
985 bool MDPCompLowRes::allocLayerPipes(hwc_context_t *ctx,
1002 } else if(!qhwc::needsScaling(ctx, layer, mDpy)
1004 && ctx->mMDP.version >= qdutils::MDSS_V5) {
1008 pipe_info.index = getMdpPipe(ctx, type, Overlay::MIXER_DEFAULT);
1018 bool MDPCompLowRes::draw(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
1025 if(!ctx || !list) {
1030 if(ctx->listStats[mDpy].numAppLayers > MAX_NUM_APP_LAYERS) {
1039 overlay::Overlay& ov = *ctx->mOverlay;
1040 LayerProp *layerProp = ctx->layerProp[mDpy];
1042 int numHwLayers = ctx->listStats[mDpy].numAppLayers;
1075 if(ctx->mAD->isModeOn()) {
1076 if(ctx->mAD->draw(ctx, fd, offset)) {
1077 fd = ctx->mAD->getDstFd(ctx);
1078 offset = ctx->mAD->getDstOffset(ctx);
1102 int MDPCompHighRes::pipesNeeded(hwc_context_t *ctx,
1106 const int xres = ctx->dpyAttr[mDpy].xres;
1108 const int lSplit = getLeftSplit(ctx, mDpy);
1124 bool MDPCompHighRes::arePipesAvailable(hwc_context_t *ctx,
1126 overlay::Overlay& ov = *ctx->mOverlay;
1129 int numPipesNeeded = pipesNeeded(ctx, list, i);
1146 bool MDPCompHighRes::acquireMDPPipes(hwc_context_t *ctx, hwc_layer_1_t* layer,
1149 const int xres = ctx->dpyAttr[mDpy].xres;
1150 const int lSplit = getLeftSplit(ctx, mDpy);
1157 pipe_info.lIndex = getMdpPipe(ctx, type, Overlay::MIXER_LEFT);
1163 pipe_info.rIndex = getMdpPipe(ctx, type, Overlay::MIXER_RIGHT);
1171 bool MDPCompHighRes::allocLayerPipes(hwc_context_t *ctx,
1188 } else if(!qhwc::needsScaling(ctx, layer, mDpy)
1190 && ctx->mMDP.version >= qdutils::MDSS_V5) {
1194 if(!acquireMDPPipes(ctx, layer, pipe_info, type)) {
1206 int MDPCompHighRes::configure(hwc_context_t *ctx, hwc_layer_1_t *layer,
1219 return configureHighRes(ctx, layer, mDpy, mdpFlagsL, zOrder, isFg, lDest,
1223 bool MDPCompHighRes::draw(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
1230 if(!ctx || !list) {
1235 if(ctx->listStats[mDpy].numAppLayers > MAX_NUM_APP_LAYERS) {
1244 overlay::Overlay& ov = *ctx->mOverlay;
1245 LayerProp *layerProp = ctx->layerProp[mDpy];
1247 int numHwLayers = ctx->listStats[mDpy].numAppLayers;
1275 if(ctx->mAD->isModeOn()) {
1276 if(ctx->mAD->draw(ctx, fd, offset)) {
1277 fd = ctx->mAD->getDstFd(ctx);
1278 offset = ctx->mAD->getDstOffset(ctx);