Lines Matching refs:CRTC
74 struct crtc {
75 drmModeCrtc *crtc;
106 struct crtc *crtcs;
375 struct crtc *_crtc = &dev->resources->crtcs[i];
376 drmModeCrtc *crtc = _crtc->crtc;
377 if (!crtc)
381 crtc->crtc_id,
382 crtc->buffer_id,
383 crtc->x, crtc->y,
384 crtc->width, crtc->height);
385 dump_mode(&crtc->mode);
492 free_properties(res, res, crtc);
494 free_resource(res, res, crtc, Crtc);
556 get_resource(res, res, crtc, Crtc);
596 get_properties(res, res, crtc, CRTC);
600 res->crtcs[i].mode = &res->crtcs[i].crtc->mode;
628 drmModeCrtc *crtc = dev->resources->crtcs[i].crtc;
629 if (crtc && crtc->crtc_id == id)
688 * can bind it with a free crtc.
700 struct crtc *crtc;
709 uint32_t crtc_id; /* the id of CRTC to bind to */
749 static struct crtc *pipe_find_crtc(struct device *dev, struct pipe_arg *pipe)
785 /* Return the first possible and active CRTC if one exists, or the first
786 * possible CRTC otherwise.
814 /* If the CRTC ID was specified, get the corresponding CRTC. Otherwise
815 * locate a CRTC that can be attached to all the connectors.
819 struct crtc *crtc = &dev->resources->crtcs[i];
821 if (pipe->crtc_id == crtc->crtc->crtc_id) {
822 pipe->crtc = crtc;
827 pipe->crtc = pipe_find_crtc(dev, pipe);
830 if (!pipe->crtc) {
831 fprintf(stderr, "failed to find CRTC for pipe\n");
836 pipe->crtc->mode = mode;
877 find_object(dev->resources, res, crtc, CRTC);
933 drmModePageFlip(fd, pipe->crtc->crtc->crtc_id, new_fb_id,
967 struct crtc *crtc = NULL;
971 /* Find an unused plane which can be connected to our CRTC. Find the
972 * CRTC index first, then iterate over available planes.
976 crtc = &dev->resources->crtcs[i];
982 if (!crtc) {
983 fprintf(stderr, "CRTC %u not found\n", p->crtc_id);
1007 fprintf(stderr, "no unused plane available for CRTC %u\n",
1008 crtc->crtc->crtc_id);
1033 crtc_x = (crtc->mode->hdisplay - crtc_w) / 2;
1034 crtc_y = (crtc->mode->vdisplay - crtc_h) / 2;
1041 if (drmModeSetPlane(dev->fd, plane_id, crtc->crtc->crtc_id, p->fb_id,
1049 ovr->crtc_id = crtc->crtc->crtc_id;
1121 printf("crtc %d\n", pipe->crtc->crtc->crtc_id);
1123 ret = drmModeSetCrtc(dev->fd, pipe->crtc->crtc->crtc_id, fb_id,
1181 pipe->crtc->crtc->crtc_id,
1185 fprintf(stderr, "failed to init cursor for CRTC[%u]\n",
1231 ret = drmModePageFlip(dev->fd, pipe->crtc->crtc->crtc_id,