Lines Matching refs:ctx

79 bool MDPComp::init(hwc_context_t *ctx) {
81 if(!ctx) {
119 idleInvalidator->init(timeout_handler, ctx, idle_timeout);
125 struct hwc_context_t* ctx = (struct hwc_context_t*)(udata);
127 if(!ctx) {
132 if(!ctx->proc) {
138 ctx->proc->invalidate(ctx->proc);
141 void MDPComp::setMDPCompLayerFlags(hwc_context_t *ctx,
143 LayerProp *layerProp = ctx->layerProp[mDpy];
145 for(int index = 0; index < ctx->listStats[mDpy].numAppLayers; index++) {
163 bool MDPComp::setupBasePipe(hwc_context_t *ctx) {
165 int fb_stride = ctx->dpyAttr[dpy].stride;
166 int fb_width = ctx->dpyAttr[dpy].xres;
167 int fb_height = ctx->dpyAttr[dpy].yres;
168 int fb_fd = ctx->dpyAttr[dpy].fd;
261 bool MDPComp::isValidDimension(hwc_context_t *ctx, hwc_layer_1_t *layer) {
270 int hw_w = ctx->dpyAttr[mDpy].xres;
271 int hw_h = ctx->dpyAttr[mDpy].yres;
294 if(ctx->mMDP.version >= qdutils::MDSS_V5) {
309 ovutils::eDest MDPComp::getMdpPipe(hwc_context_t *ctx, ePipeType type) {
310 overlay::Overlay& ov = *ctx->mOverlay;
317 ctx->mDMAInUse = true;
340 bool MDPComp::isFrameDoable(hwc_context_t *ctx) {
341 int numAppLayers = ctx->listStats[mDpy].numAppLayers;
347 } else if(ctx->mExtDispConfiguring) {
357 bool MDPComp::isFullFrameDoable(hwc_context_t *ctx,
360 const int numAppLayers = ctx->listStats[mDpy].numAppLayers;
373 if(isSkipPresent(ctx, mDpy)) {
376 isSkipPresent(ctx, mDpy));
380 if(ctx->listStats[mDpy].planeAlpha
381 && ctx->mMDP.version >= qdutils::MDSS_V5) {
387 if(ctx->listStats[mDpy].needsAlphaScale
388 && ctx->mMDP.version < qdutils::MDSS_V5) {
400 if(isSecuring(ctx, layer)) {
409 if(!isValidDimension(ctx,layer)) {
418 if(fullMDPComp(ctx, list)) {
420 } else if (partialMDPComp(ctx, list)) {
426 bool MDPComp::fullMDPComp(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
439 int numPipesNeeded = pipesNeeded(ctx, list);
440 int availPipes = getAvailablePipes(ctx);
451 bool MDPComp::partialMDPComp(hwc_context_t *ctx, hwc_display_contents_1_t* list)
453 int numAppLayers = ctx->listStats[mDpy].numAppLayers;
456 updateLayerCache(ctx, list);
457 updateYUV(ctx, list);
466 int numPipesNeeded = pipesNeeded(ctx, list);
467 int availPipes = getAvailablePipes(ctx);
478 bool MDPComp::isOnlyVideoDoable(hwc_context_t *ctx,
480 int numAppLayers = ctx->listStats[mDpy].numAppLayers;
482 updateYUV(ctx, list);
486 if(!isYuvPresent(ctx, mDpy)) {
498 int numPipesNeeded = pipesNeeded(ctx, list);
499 int availPipes = getAvailablePipes(ctx);
510 bool MDPComp::isYUVDoable(hwc_context_t* ctx, hwc_layer_1_t* layer) {
523 if(ctx->mNeedsRotator && ctx->mDMAInUse) {
528 if(isSecuring(ctx, layer)) {
533 if(!isValidDimension(ctx, layer)) {
592 void MDPComp::updateLayerCache(hwc_context_t* ctx,
595 int numAppLayers = ctx->listStats[mDpy].numAppLayers;
614 int MDPComp::getAvailablePipes(hwc_context_t* ctx) {
616 overlay::Overlay& ov = *ctx->mOverlay;
621 if(ctx->mNeedsRotator)
631 void MDPComp::updateYUV(hwc_context_t* ctx, hwc_display_contents_1_t* list) {
633 int nYuvCount = ctx->listStats[mDpy].yuvCount;
635 int nYuvIndex = ctx->listStats[mDpy].yuvIndices[index];
638 if(!isYUVDoable(ctx, layer)) {
657 bool MDPComp::programMDP(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
658 ctx->mDMAInUse = false;
659 if(!allocLayerPipes(ctx, list)) {
674 if(configure(ctx, layer, mCurrentFrame.mdpToLayer[mdpIndex]) != 0 ){
688 bool MDPComp::programYUV(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
689 if(!allocLayerPipes(ctx, list)) {
703 if(configure(ctx, layer,
714 int MDPComp::prepare(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
717 const int numLayers = ctx->listStats[mDpy].numAppLayers;
721 if(!isFrameDoable(ctx)) {
731 if(isFullFrameDoable(ctx, list)){
734 if(!programMDP(ctx, list)) {
746 isSkipPresent(ctx, mDpy) ||
751 } else if(isOnlyVideoDoable(ctx, list)) {
758 mCurrentFrame.fbZ = ctx->listStats[mDpy].yuvCount;
761 if(!programYUV(ctx, list)) {
771 setMDPCompLayerFlags(ctx, list);
789 int MDPCompLowRes::configure(hwc_context_t *ctx, hwc_layer_1_t *layer,
801 return configureLowRes(ctx, layer, mDpy, mdpFlags, zOrder, isFg, dest,
805 int MDPCompLowRes::pipesNeeded(hwc_context_t *ctx,
810 bool MDPCompLowRes::allocLayerPipes(hwc_context_t *ctx,
812 if(isYuvPresent(ctx, mDpy)) {
813 int nYuvCount = ctx->listStats[mDpy].yuvCount;
816 int nYuvIndex = ctx->listStats[mDpy].yuvIndices[index];
830 pipe_info.index = getMdpPipe(ctx, MDPCOMP_OV_VG);
856 if(!qhwc::needsScaling(layer) && !ctx->mNeedsRotator
857 && ctx->mMDP.version >= qdutils::MDSS_V5) {
861 pipe_info.index = getMdpPipe(ctx, type);
870 bool MDPCompLowRes::draw(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
877 if(!ctx || !list) {
886 overlay::Overlay& ov = *ctx->mOverlay;
887 LayerProp *layerProp = ctx->layerProp[mDpy];
889 int numHwLayers = ctx->listStats[mDpy].numAppLayers;
941 int MDPCompHighRes::pipesNeeded(hwc_context_t *ctx,
944 int hw_w = ctx->dpyAttr[mDpy].xres;
962 bool MDPCompHighRes::acquireMDPPipes(hwc_context_t *ctx, hwc_layer_1_t* layer,
965 int hw_w = ctx->dpyAttr[mDpy].xres;
970 pipe_info.rIndex = getMdpPipe(ctx, type);
975 pipe_info.lIndex = getMdpPipe(ctx, type);
979 pipe_info.rIndex = getMdpPipe(ctx, type);
980 pipe_info.lIndex = getMdpPipe(ctx, type);
988 bool MDPCompHighRes::allocLayerPipes(hwc_context_t *ctx,
990 overlay::Overlay& ov = *ctx->mOverlay;
991 int layer_count = ctx->listStats[mDpy].numAppLayers;
993 if(isYuvPresent(ctx, mDpy)) {
994 int nYuvCount = ctx->listStats[mDpy].yuvCount;
997 int nYuvIndex = ctx->listStats[mDpy].yuvIndices[index];
1003 if(!acquireMDPPipes(ctx, layer, pipe_info,MDPCOMP_OV_VG)) {
1027 if(!qhwc::needsScaling(layer) && !ctx->mNeedsRotator
1028 && ctx->mMDP.version >= qdutils::MDSS_V5)
1031 if(!acquireMDPPipes(ctx, layer, pipe_info, type)) {
1043 int MDPCompHighRes::configure(hwc_context_t *ctx, hwc_layer_1_t *layer,
1056 return configureHighRes(ctx, layer, mDpy, mdpFlagsL, zOrder, isFg, lDest,
1060 bool MDPCompHighRes::draw(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
1067 if(!ctx || !list) {
1076 overlay::Overlay& ov = *ctx->mOverlay;
1077 LayerProp *layerProp = ctx->layerProp[mDpy];
1079 int numHwLayers = ctx->listStats[mDpy].numAppLayers;