Lines Matching refs:ctx
72 hwc_context_t* ctx = (hwc_context_t*)(dev); in hwc_registerProcs() local
73 if(!ctx) { in hwc_registerProcs()
77 ctx->proc = procs; in hwc_registerProcs()
81 init_uevent_thread(ctx); in hwc_registerProcs()
82 init_vsync_thread(ctx); in hwc_registerProcs()
86 static void reset(hwc_context_t *ctx, int numDisplays, in reset() argument
101 if(ctx->mFBUpdate[i]) in reset()
102 ctx->mFBUpdate[i]->reset(); in reset()
103 if(ctx->mCopyBit[i]) in reset()
104 ctx->mCopyBit[i]->reset(); in reset()
105 if(ctx->mLayerRotMap[i]) in reset()
106 ctx->mLayerRotMap[i]->reset(); in reset()
111 static void reset_layer_prop(hwc_context_t* ctx, int dpy, int numAppLayers) { in reset_layer_prop() argument
112 if(ctx->layerProp[dpy]) { in reset_layer_prop()
113 delete[] ctx->layerProp[dpy]; in reset_layer_prop()
114 ctx->layerProp[dpy] = NULL; in reset_layer_prop()
116 ctx->layerProp[dpy] = new LayerProp[numAppLayers]; in reset_layer_prop()
119 static int display_commit(hwc_context_t *ctx, int dpy) { in display_commit() argument
120 int fbFd = ctx->dpyAttr[dpy].fd; in display_commit()
138 hwc_context_t* ctx = (hwc_context_t*)(dev); in hwc_prepare_primary() local
140 if(UNLIKELY(!ctx->mBasePipeSetup)) in hwc_prepare_primary()
141 setupBasePipe(ctx); in hwc_prepare_primary()
143 ctx->dpyAttr[dpy].isActive) { in hwc_prepare_primary()
144 reset_layer_prop(ctx, dpy, list->numHwLayers - 1); in hwc_prepare_primary()
148 setListStats(ctx, list, dpy); in hwc_prepare_primary()
149 int fbZOrder = ctx->mMDPComp[dpy]->prepare(ctx, list); in hwc_prepare_primary()
151 ctx->mFBUpdate[dpy]->prepare(ctx, list, fbZOrder); in hwc_prepare_primary()
167 hwc_context_t* ctx = (hwc_context_t*)(dev); in hwc_prepare_external() local
170 ctx->dpyAttr[dpy].isActive && in hwc_prepare_external()
171 ctx->dpyAttr[dpy].connected) { in hwc_prepare_external()
172 reset_layer_prop(ctx, dpy, list->numHwLayers - 1); in hwc_prepare_external()
175 if(!ctx->dpyAttr[dpy].isPause) { in hwc_prepare_external()
177 ctx->mExtDispConfiguring = false; in hwc_prepare_external()
178 setListStats(ctx, list, dpy); in hwc_prepare_external()
179 int fbZOrder = ctx->mMDPComp[dpy]->prepare(ctx, list); in hwc_prepare_external()
181 ctx->mFBUpdate[dpy]->prepare(ctx, list, fbZOrder); in hwc_prepare_external()
211 hwc_context_t* ctx = (hwc_context_t*)(dev); in hwc_prepare() local
212 Locker::Autolock _l(ctx->mBlankLock); in hwc_prepare()
213 reset(ctx, numDisplays, displays); in hwc_prepare()
215 ctx->mOverlay->configBegin(); in hwc_prepare()
216 ctx->mRotMgr->configBegin(); in hwc_prepare()
217 ctx->mNeedsRotator = false; in hwc_prepare()
236 ctx->mOverlay->configDone(); in hwc_prepare()
237 ctx->mRotMgr->configDone(); in hwc_prepare()
246 hwc_context_t* ctx = (hwc_context_t*)(dev); in hwc_eventControl() local
247 if(!ctx->dpyAttr[dpy].isActive) { in hwc_eventControl()
255 if (ctx->vstate.enable == enable) in hwc_eventControl()
257 ret = hwc_vsync_control(ctx, dpy, enable); in hwc_eventControl()
259 ctx->vstate.enable = !!enable; in hwc_eventControl()
272 hwc_context_t* ctx = (hwc_context_t*)(dev); in hwc_blank() local
274 Locker::Autolock _l(ctx->mBlankLock); in hwc_blank()
282 ctx->mOverlay->configBegin(); in hwc_blank()
283 ctx->mOverlay->configDone(); in hwc_blank()
284 ctx->mRotMgr->clear(); in hwc_blank()
289 ret = ioctl(ctx->dpyAttr[dpy].fd, FBIOBLANK, in hwc_blank()
292 ret = ioctl(ctx->dpyAttr[dpy].fd, FBIOBLANK,FB_BLANK_UNBLANK); in hwc_blank()
300 if (display_commit(ctx, dpy) < 0) { in hwc_blank()
313 ctx->mExtDisplay->setHPD(1); in hwc_blank()
315 ctx->dpyAttr[dpy].isActive = !blank; in hwc_blank()
330 hwc_context_t* ctx = (hwc_context_t*)(dev); in hwc_query() local
339 if(ctx->mMDP.hasOverlay) in hwc_query()
351 static int hwc_set_primary(hwc_context_t *ctx, hwc_display_contents_1_t* list) { in hwc_set_primary() argument
356 if (LIKELY(list) && ctx->dpyAttr[dpy].isActive) { in hwc_set_primary()
361 if(ctx->mCopyBit[dpy]) in hwc_set_primary()
362 copybitDone = ctx->mCopyBit[dpy]->draw(ctx, list, dpy, &fd); in hwc_set_primary()
364 hwc_sync(ctx, list, dpy, fd); in hwc_set_primary()
366 if (!ctx->mMDPComp[dpy]->draw(ctx, list)) { in hwc_set_primary()
375 hnd = ctx->mCopyBit[dpy]->getCurrentRenderBuffer(); in hwc_set_primary()
379 if (!ctx->mFBUpdate[dpy]->draw(ctx, hnd)) { in hwc_set_primary()
385 if (display_commit(ctx, dpy) < 0) { in hwc_set_primary()
395 static int hwc_set_external(hwc_context_t *ctx, in hwc_set_external() argument
400 Locker::Autolock _l(ctx->mExtSetLock); in hwc_set_external()
402 if (LIKELY(list) && ctx->dpyAttr[dpy].isActive && in hwc_set_external()
403 !ctx->dpyAttr[dpy].isPause && in hwc_set_external()
404 ctx->dpyAttr[dpy].connected) { in hwc_set_external()
409 if(ctx->mCopyBit[dpy]) in hwc_set_external()
410 copybitDone = ctx->mCopyBit[dpy]->draw(ctx, list, dpy, &fd); in hwc_set_external()
413 hwc_sync(ctx, list, dpy, fd); in hwc_set_external()
415 if (!ctx->mMDPComp[dpy]->draw(ctx, list)) { in hwc_set_external()
422 hnd = ctx->mCopyBit[dpy]->getCurrentRenderBuffer(); in hwc_set_external()
426 if (!ctx->mFBUpdate[dpy]->draw(ctx, hnd)) { in hwc_set_external()
432 if (display_commit(ctx, dpy) < 0) { in hwc_set_external()
442 static int hwc_set_virtual(hwc_context_t *ctx, in hwc_set_virtual() argument
463 hwc_context_t* ctx = (hwc_context_t*)(dev); in hwc_set() local
464 Locker::Autolock _l(ctx->mBlankLock); in hwc_set()
469 ret = hwc_set_primary(ctx, list); in hwc_set()
472 ret = hwc_set_external(ctx, list, i); in hwc_set()
475 ret = hwc_set_virtual(ctx, list, i); in hwc_set()
485 ctx->mVideoTransFlag = false; in hwc_set()
492 hwc_context_t* ctx = (hwc_context_t*)(dev); in hwc_getDisplayConfigs() local
505 if(ctx->dpyAttr[HWC_DISPLAY_EXTERNAL].connected) { in hwc_getDisplayConfigs()
520 hwc_context_t* ctx = (hwc_context_t*)(dev); in hwc_getDisplayAttributes() local
522 if(disp == HWC_DISPLAY_EXTERNAL && !ctx->dpyAttr[disp].connected) { in hwc_getDisplayAttributes()
542 values[i] = ctx->dpyAttr[disp].vsync_period; in hwc_getDisplayAttributes()
545 values[i] = ctx->dpyAttr[disp].xres; in hwc_getDisplayAttributes()
547 ctx->dpyAttr[disp].xres); in hwc_getDisplayAttributes()
550 values[i] = ctx->dpyAttr[disp].yres; in hwc_getDisplayAttributes()
552 ctx->dpyAttr[disp].yres); in hwc_getDisplayAttributes()
555 values[i] = (int32_t) (ctx->dpyAttr[disp].xdpi*1000.0); in hwc_getDisplayAttributes()
558 values[i] = (int32_t) (ctx->dpyAttr[disp].ydpi*1000.0); in hwc_getDisplayAttributes()
571 hwc_context_t* ctx = (hwc_context_t*)(dev); in hwc_dump() local
574 dumpsys_log(aBuf, " MDPVersion=%d\n", ctx->mMDP.version); in hwc_dump()
575 dumpsys_log(aBuf, " DisplayPanel=%c\n", ctx->mMDP.panel); in hwc_dump()
577 if(ctx->mMDPComp[dpy]) in hwc_dump()
578 ctx->mMDPComp[dpy]->dump(aBuf); in hwc_dump()
581 ctx->mOverlay->getDump(ovDump, 2048); in hwc_dump()
584 ctx->mRotMgr->getDump(ovDump, 2048); in hwc_dump()