Home | History | Annotate | Download | only in libhwcomposer

Lines Matching full:ctx

76     hwc_context_t* ctx = (hwc_context_t*)(dev);
77 if(!ctx) {
81 ctx->proc = procs;
85 init_uevent_thread(ctx);
86 init_vsync_thread(ctx);
90 static void reset(hwc_context_t *ctx, int numDisplays,
105 if(ctx->mFBUpdate[i])
106 ctx->mFBUpdate[i]->reset();
107 if(ctx->mMDPComp[i])
108 ctx->mMDPComp[i]->reset();
109 if(ctx->mCopyBit[i])
110 ctx->mCopyBit[i]->reset();
111 if(ctx->mLayerRotMap[i])
112 ctx->mLayerRotMap[i]->reset();
115 ctx->mAD->reset();
119 static void reset_layer_prop(hwc_context_t* ctx, int dpy, int numAppLayers) {
120 if(ctx->layerProp[dpy]) {
121 delete[] ctx->layerProp[dpy];
122 ctx->layerProp[dpy] = NULL;
124 ctx->layerProp[dpy] = new LayerProp[numAppLayers];
127 static void handleGeomChange(hwc_context_t *ctx, int dpy,
130 ctx->mOverlay->forceSet(dpy);
134 static int display_commit(hwc_context_t *ctx, int dpy) {
135 int fbFd = ctx->dpyAttr[dpy].fd;
154 hwc_context_t* ctx = (hwc_context_t*)(dev);
157 ctx->dpyAttr[dpy].isActive) {
158 reset_layer_prop(ctx, dpy, list->numHwLayers - 1);
159 handleGeomChange(ctx, dpy, list);
160 setListStats(ctx, list, dpy);
161 if(ctx->mMDPComp[dpy]->prepare(ctx, list) < 0) {
163 ctx->mFBUpdate[dpy]->prepare(ctx, list, fbZ);
165 if (ctx->mMDP.version < qdutils::MDP_V4_0) {
166 if(ctx->mCopyBit[dpy])
167 ctx->mCopyBit[dpy]->prepare(ctx, list, dpy);
177 hwc_context_t* ctx = (hwc_context_t*)(dev);
181 ctx->dpyAttr[dpy].isActive &&
182 ctx->dpyAttr[dpy].connected) {
183 reset_layer_prop(ctx, dpy, list->numHwLayers - 1);
184 handleGeomChange(ctx, dpy, list);
185 if(!ctx->dpyAttr[dpy].isPause) {
186 ctx->dpyAttr[dpy].isConfiguring = false;
187 setListStats(ctx, list, dpy);
188 if(ctx->mMDPComp[dpy]->prepare(ctx, list) < 0) {
190 ctx->mFBUpdate[dpy]->prepare(ctx, list, fbZ);
196 if((fbZOrder >= 0) && ctx->mCopyBit[dpy])
197 ctx->mCopyBit[dpy]->prepare(ctx, list, dpy);
213 hwc_context_t* ctx = (hwc_context_t*)(dev);
217 reset_layer_prop(ctx, dpy, list->numHwLayers - 1);
222 ctx->dpyAttr[dpy].xres = fbWidth;
223 ctx->dpyAttr[dpy].yres = fbHeight;
225 if(ctx->dpyAttr[dpy].connected == false) {
226 ctx->dpyAttr[dpy].connected = true;
227 setupSecondaryObjs(ctx, dpy);
230 ctx->dpyAttr[dpy].fd = Writeback::getInstance()->getFbFd();
233 setListStats(ctx, list, dpy);
235 if(ctx->mMDPComp[dpy]->prepare(ctx, list) < 0) {
237 ctx->mFBUpdate[dpy]->prepare(ctx, list, fbZ);
247 hwc_context_t* ctx = (hwc_context_t*)(dev);
249 ctx->mDrawLock.lock();
250 reset(ctx, numDisplays, displays);
252 ctx->mOverlay->configBegin();
253 ctx->mRotMgr->configBegin();
259 if(ctx->dpyAttr[HWC_DISPLAY_VIRTUAL].connected &&
262 ctx->dpyAttr[HWC_DISPLAY_VIRTUAL].connected = false;
263 clearSecondaryObjs(ctx, HWC_DISPLAY_VIRTUAL);
283 ctx->mOverlay->configDone();
284 ctx->mRotMgr->configDone();
295 hwc_context_t* ctx = (hwc_context_t*)(dev);
298 if(!ctx->dpyAttr[dpy].isActive) {
304 if (ctx->vstate.enable == enable)
306 ret = hwc_vsync_control(ctx, dpy, enable);
308 ctx->vstate.enable = !!enable;
321 hwc_context_t* ctx = (hwc_context_t*)(dev);
323 Locker::Autolock _l(ctx->mDrawLock);
331 ctx->mOverlay->configBegin();
332 ctx->mOverlay->configDone();
333 ctx->mRotMgr->clear();
339 ret = ioctl(ctx->dpyAttr[dpy].fd, FBIOBLANK,
342 ret = ioctl(ctx->dpyAttr[dpy].fd, FBIOBLANK,FB_BLANK_UNBLANK);
350 if (display_commit(ctx, dpy) < 0) {
362 ctx->dpyAttr[dpy].isActive = !blank;
377 hwc_context_t* ctx = (hwc_context_t*)(dev);
386 if(ctx->mMDP.hasOverlay) {
401 static int hwc_set_primary(hwc_context_t *ctx, hwc_display_contents_1_t* list) {
406 if (LIKELY(list) && ctx->dpyAttr[dpy].isActive) {
411 if(ctx->mCopyBit[dpy])
412 copybitDone = ctx->mCopyBit[dpy]->draw(ctx, list, dpy, &fd);
414 hwc_sync(ctx, list, dpy, fd);
416 if (!ctx->mMDPComp[dpy]->draw(ctx, list)) {
425 hnd = ctx->mCopyBit[dpy]->getCurrentRenderBuffer();
429 if (!ctx->mFBUpdate[dpy]->draw(ctx, hnd)) {
435 if (display_commit(ctx, dpy) < 0) {
445 static int hwc_set_external(hwc_context_t *ctx,
452 if (LIKELY(list) && ctx->dpyAttr[dpy].isActive &&
453 !ctx->dpyAttr[dpy].isPause &&
454 ctx->dpyAttr[dpy].connected) {
459 if(ctx->mCopyBit[dpy])
460 copybitDone = ctx->mCopyBit[dpy]->draw(ctx, list, dpy, &fd);
463 hwc_sync(ctx, list, dpy, fd);
465 if (!ctx->mMDPComp[dpy]->draw(ctx, list)) {
472 hnd = ctx->mCopyBit[dpy]->getCurrentRenderBuffer();
476 if (!ctx->mFBUpdate[dpy]->draw(ctx, hnd)) {
482 if (display_commit(ctx, dpy) < 0) {
492 static int hwc_set_virtual(hwc_context_t *ctx,
502 if(fbLayer->handle && ctx->dpyAttr[dpy].connected
506 && !isGLESOnlyComp(ctx, dpy)
518 hwc_sync(ctx, list, dpy, fd);
520 if (!ctx->mMDPComp[dpy]->draw(ctx, list)) {
525 if (!ctx->mFBUpdate[dpy]->draw(ctx,
532 if (display_commit(ctx, dpy) < 0) {
557 hwc_context_t* ctx = (hwc_context_t*)(dev);
562 ret = hwc_set_primary(ctx, list);
565 ret = hwc_set_external(ctx, list);
568 ret = hwc_set_virtual(ctx, list);
578 ctx->mVideoTransFlag = false;
580 ctx->mDrawLock.unlock();
587 hwc_context_t* ctx = (hwc_context_t*)(dev);
600 if(ctx->dpyAttr[HWC_DISPLAY_EXTERNAL].connected) {
615 hwc_context_t* ctx = (hwc_context_t*)(dev);
617 if(disp == HWC_DISPLAY_EXTERNAL && !ctx->dpyAttr[disp].connected) {
637 values[i] = ctx->dpyAttr[disp].vsync_period;
640 values[i] = ctx->dpyAttr[disp].xres;
642 ctx->dpyAttr[disp].xres);
645 values[i] = ctx->dpyAttr[disp].yres;
647 ctx->dpyAttr[disp].yres);
650 values[i] = (int32_t) (ctx->dpyAttr[disp].xdpi*1000.0);
653 values[i] = (int32_t) (ctx->dpyAttr[disp].ydpi*1000.0);
666 hwc_context_t* ctx = (hwc_context_t*)(dev);
667 Locker::Autolock _l(ctx->mDrawLock);
670 dumpsys_log(aBuf, " MDPVersion=%d\n", ctx->mMDP.version);
671 dumpsys_log(aBuf, " DisplayPanel=%c\n", ctx->mMDP.panel);
673 if(ctx->mMDPComp[dpy])
674 ctx->mMDPComp[dpy]->dump(aBuf);
677 ctx->mOverlay->getDump(ovDump, 2048);
680 ctx->mRotMgr->getDump(ovDump, 1024);