Lines Matching refs:dpy
38 int hwc_vsync_control(hwc_context_t* ctx, int dpy, int enable)
42 ioctl(ctx->dpyAttr[dpy].fd, MSMFB_OVERLAY_VSYNC_CTRL,
44 ALOGE("%s: vsync control failed. Dpy=%d, enable=%d : %s",
45 __FUNCTION__, dpy, enable, strerror(errno));
86 for (int dpy = HWC_DISPLAY_PRIMARY; dpy < num_displays; dpy++) {
89 dpy == HWC_DISPLAY_PRIMARY ? 0 :
91 ALOGI("%s: Reading vsync for dpy=%d from %s", __FUNCTION__, dpy,
93 fb_fd[dpy] = open(vsync_node_path, O_RDONLY);
95 if (fb_fd[dpy] < 0) {
98 ALOGE ("%s:not able to open vsync node for dpy=%d, %s",
99 __FUNCTION__, dpy, strerror(errno));
100 if (dpy == HWC_DISPLAY_PRIMARY) {
106 pread(fb_fd[dpy], vdata , MAX_DATA, 0);
108 pfd[dpy].fd = fb_fd[dpy];
109 if (pfd[dpy].fd >= 0)
110 pfd[dpy].events = POLLPRI | POLLERR;
117 for (int dpy = HWC_DISPLAY_PRIMARY; dpy < num_displays; dpy++) {
118 if (pfd[dpy].revents & POLLPRI) {
119 int len = pread(pfd[dpy].fd, vdata, MAX_DATA, 0);
123 ALOGE ("%s: Unable to read vsync for dpy=%d : %s",
124 __FUNCTION__, dpy, strerror(errno));
129 timestamp[dpy] = strtoull(vdata + strlen("VSYNC="),
134 "%s: timestamp %llu sent to SF for dpy=%d",
135 __FUNCTION__, timestamp[dpy], dpy);
136 ctx->proc->vsync(ctx->proc, dpy, timestamp[dpy]);
163 for (int dpy = HWC_DISPLAY_PRIMARY; dpy <= HWC_DISPLAY_EXTERNAL; dpy++ ) {
164 if(fb_fd[dpy] >= 0)
165 close (fb_fd[dpy]);