Lines Matching refs:ctx
42 static int getConnectedDisplay(hwc_context_t* ctx, const char* strUdata) in getConnectedDisplay() argument
47 if (ctx->mHDMIDisplay->isHDMIPrimaryDisplay()) { in getConnectedDisplay()
56 static bool getPanelResetStatus(hwc_context_t* ctx, const char* strUdata, int len) in getPanelResetStatus() argument
65 ctx->mPanelResetStatus = true; in getPanelResetStatus()
88 static void handle_uevent(hwc_context_t* ctx, const char* udata, int len) in handle_uevent() argument
90 bool bpanelReset = getPanelResetStatus(ctx, udata, len); in handle_uevent()
92 ctx->proc->invalidate(ctx->proc); in handle_uevent()
96 int dpy = getConnectedDisplay(ctx, udata); in handle_uevent()
111 if(!ctx->dpyAttr[dpy].connected){ in handle_uevent()
117 ctx->mDrawLock.lock(); in handle_uevent()
118 handle_offline(ctx, dpy); in handle_uevent()
119 ctx->mDrawLock.unlock(); in handle_uevent()
126 ctx->proc->hotplug(ctx->proc, dpy, EXTERNAL_OFFLINE); in handle_uevent()
133 if(ctx->dpyAttr[dpy].connected) { in handle_uevent()
139 if (ctx->mHDMIDisplay->isHDMIPrimaryDisplay()) { in handle_uevent()
140 ctx->mDrawLock.lock(); in handle_uevent()
141 handle_online(ctx, dpy); in handle_uevent()
142 ctx->mDrawLock.unlock(); in handle_uevent()
144 ctx->proc->invalidate(ctx->proc); in handle_uevent()
147 ctx->mDrawLock.lock(); in handle_uevent()
156 ctx->dpyAttr[dpy].isConfiguring = true; in handle_uevent()
157 ctx->mDrawLock.unlock(); in handle_uevent()
159 ctx->proc->invalidate(ctx->proc); in handle_uevent()
162 usleep(ctx->dpyAttr[HWC_DISPLAY_PRIMARY].vsync_period in handle_uevent()
165 if(isVDConnected(ctx)) { in handle_uevent()
174 ctx->mWfdSyncLock.lock(); in handle_uevent()
178 ctx->mWfdSyncLock.wait(); in handle_uevent()
182 ctx->mWfdSyncLock.unlock(); in handle_uevent()
184 ctx->mHDMIDisplay->configure(); in handle_uevent()
185 ctx->mHDMIDisplay->activateDisplay(); in handle_uevent()
187 ctx->mDrawLock.lock(); in handle_uevent()
188 updateDisplayInfo(ctx, dpy); in handle_uevent()
189 initCompositionResources(ctx, dpy); in handle_uevent()
190 ctx->dpyAttr[dpy].isPause = false; in handle_uevent()
191 ctx->dpyAttr[dpy].connected = true; in handle_uevent()
192 ctx->dpyAttr[dpy].isConfiguring = true; in handle_uevent()
193 ctx->mDrawLock.unlock(); in handle_uevent()
198 ctx->proc->hotplug(ctx->proc, dpy, EXTERNAL_ONLINE); in handle_uevent()
213 hwc_context_t * ctx = reinterpret_cast<hwc_context_t *>(param); in uevent_loop() local
224 handle_uevent(ctx, udata, len); in uevent_loop()
230 void init_uevent_thread(hwc_context_t* ctx) in init_uevent_thread() argument
236 ret = pthread_create(&uevent_thread, NULL, uevent_loop, (void*) ctx); in init_uevent_thread()