Lines Matching refs:dpy
46 int hwc_vsync_control(hwc_context_t* ctx, int dpy, int enable)
50 ioctl(ctx->dpyAttr[dpy].fd, MSMFB_OVERLAY_VSYNC_CTRL,
52 ALOGE("%s: vsync control failed. Dpy=%d, enable=%d : %s",
53 __FUNCTION__, dpy, enable, strerror(errno));
59 static void handle_vsync_event(hwc_context_t* ctx, int dpy, char *data)
67 ALOGD_IF (ctx->vstate.debug, "%s: timestamp %" PRIu64" sent to SF for dpy=%d",
68 __FUNCTION__, timestamp, dpy);
69 ctx->proc->vsync(ctx->proc, dpy, timestamp);
72 static void handle_blank_event(hwc_context_t* ctx, int dpy, char *data)
76 ALOGI("%s: dpy:%d panel power state: %ld", __FUNCTION__, dpy, poweron);
78 ctx->dpyAttr[dpy].isActive = poweron ? true: false;
83 static void handle_thermal_event(hwc_context_t* ctx, int dpy, char *data)
92 ALOGD("%s: dpy:%d thermal_level=%" PRIu64"",__FUNCTION__,dpy,thermalLevel);
100 void (*callback)(hwc_context_t* ctx, int dpy, char *data);
134 for (int dpy = HWC_DISPLAY_PRIMARY; dpy < num_displays; dpy++) {
138 dpy == HWC_DISPLAY_PRIMARY ? 0 :
143 ALOGI("%s: Reading event %zu for dpy %d from %s", __FUNCTION__,
144 ev, dpy, node_path);
145 pfd[dpy][ev].fd = open(node_path, O_RDONLY);
147 if (dpy == HWC_DISPLAY_PRIMARY && pfd[dpy][ev].fd < 0) {
150 ALOGE ("%s:unable to open event node for dpy=%d event=%zu, %s",
151 __FUNCTION__, dpy, ev, strerror(errno));
160 pread(pfd[dpy][ev].fd, vdata , MAX_DATA, 0);
161 if (pfd[dpy][ev].fd >= 0)
162 pfd[dpy][ev].events = POLLPRI | POLLERR;
170 for (int dpy = HWC_DISPLAY_PRIMARY; dpy < num_displays; dpy++) {
172 if (pfd[dpy][ev].revents & POLLPRI) {
173 ssize_t len = pread(pfd[dpy][ev].fd, vdata, MAX_DATA, 0);
178 dpy=%d : %s",
179 __FUNCTION__, ev, dpy, strerror(errno));
182 event_list[ev].callback(ctx, dpy, vdata);
208 for (int dpy = HWC_DISPLAY_PRIMARY; dpy <= HWC_DISPLAY_EXTERNAL; dpy++ ) {
210 if(pfd[dpy][event].fd >= 0)
211 close (pfd[dpy][event].fd);