Lines Matching refs:drmmode

183 //	drmmode_ptr drmmode = drmmode_crtc->drmmode;
190 // drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
197 create_pixmap_for_fbcon(drmmode_ptr drmmode,
205 fbcon = drmModeGetFB(drmmode->fd, fbcon_id);
215 if (ioctl(drmmode->fd, DRM_IOCTL_GEM_FLINK, &flink) < 0) {
221 bo = radeon_bo_open(drmmode->bufmgr, flink.name, 0, 0, 0, 0);
237 void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
262 src = create_pixmap_for_fbcon(drmmode, pScrn, fbcon_id);
322 drmmode_ptr drmmode = drmmode_crtc->drmmode;
350 if (drmmode->fb_id == 0) {
351 ret = drmModeAddFB(drmmode->fd,
356 &drmmode->fb_id);
407 fb_id = drmmode->fb_id;
412 ret = drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
466 drmmode_ptr drmmode = drmmode_crtc->drmmode;
468 drmModeMoveCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, x, y);
490 drmmode_ptr drmmode = drmmode_crtc->drmmode;
492 drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, 0, 64, 64);
500 drmmode_ptr drmmode = drmmode_crtc->drmmode;
503 drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle, 64, 64);
512 drmmode_ptr drmmode = drmmode_crtc->drmmode;
527 RADEON_ALIGN(width, drmmode_get_pitch_align(crtc->scrn, drmmode->cpp, 0)) * drmmode->cpp;
529 base_align = drmmode_get_base_align(crtc->scrn, drmmode->cpp, 0);
532 rotate_bo = radeon_bo_open(drmmode->bufmgr, 0, size, base_align, RADEON_GEM_DOMAIN_VRAM, 0);
538 ret = drmModeAddFB(drmmode->fd, width, height, crtc->scrn->depth,
555 drmmode_ptr drmmode = drmmode_crtc->drmmode;
562 rotate_pitch = RADEON_ALIGN(width, drmmode_get_pitch_align(pScrn, drmmode->cpp, 0)) * drmmode->cpp;
582 drmmode_ptr drmmode = drmmode_crtc->drmmode;
588 drmModeRmFB(drmmode->fd, drmmode_crtc->rotate_fb_id);
602 drmmode_ptr drmmode = drmmode_crtc->drmmode;
604 drmModeCrtcSetGamma(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
652 drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num)
662 drmmode_crtc->mode_crtc = drmModeGetCrtc(drmmode->fd, drmmode->mode_res->crtcs[num]);
663 drmmode_crtc->drmmode = drmmode;
675 drmmode_ptr drmmode = drmmode_output->drmmode;
679 drmmode_output->mode_output = drmModeGetConnector(drmmode->fd, drmmode_output->output_id);
707 drmmode_ptr drmmode = drmmode_output->drmmode;
715 props = drmModeGetProperty(drmmode->fd, koutput->props[i]);
720 drmmode_output->edid_blob = drmModeGetPropertyBlob(drmmode->fd, koutput->prop_values[i]);
772 drmmode_ptr drmmode = drmmode_output->drmmode;
774 drmModeConnectorSetProperty(drmmode->fd, koutput->connector_id,
801 drmmode_ptr drmmode = drmmode_output->drmmode;
811 drmmode_prop = drmModeGetProperty(drmmode->fd, mode_output->props[i]);
888 drmmode_ptr drmmode = drmmode_output->drmmode;
905 drmModeConnectorSetProperty(drmmode->fd, drmmode_output->output_id,
921 drmModeConnectorSetProperty(drmmode->fd, drmmode_output->output_id,
986 drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num, int *num_dvi, int *num_hdmi)
998 koutput = drmModeGetConnector(drmmode->fd, drmmode->mode_res->connectors[num]);
1008 kencoders[i] = drmModeGetEncoder(drmmode->fd, koutput->encoders[i]);
1063 drmmode_output->output_id = drmmode->mode_res->connectors[num];
1066 drmmode_output->drmmode = drmmode;
1083 props = drmModeGetProperty(drmmode->fd, koutput->props[i]);
1132 drmmode_clones_init(ScrnInfoPtr scrn, drmmode_ptr drmmode)
1147 for (k = 0; k < drmmode->mode_res->count_encoders; k++) {
1148 if (drmmode->mode_res->encoders[k] == drmmode_output->mode_encoders[j]->encoder_id)
1257 drmmode_ptr drmmode = drmmode_crtc->drmmode;
1354 old_fb_id = drmmode->fb_id;
1378 ret = drmModeAddFB(drmmode->fd, width, height, scrn->depth,
1381 &drmmode->fb_id);
1418 drmModeRmFB(drmmode->fd, old_fb_id);
1432 drmmode->fb_id = old_fb_id;
1454 drmmode_ptr drmmode = flipdata->drmmode;
1471 drmModeRmFB(drmmode->fd, flipdata->old_fb_id);
1487 drmmode_ptr drmmode = data;
1489 drmHandleEvent(fd, &drmmode->event_context);
1495 drmmode_ptr drmmode = data;
1498 if (err >= 0 && FD_ISSET(drmmode->fd, read_mask)) {
1499 drmHandleEvent(drmmode->fd, &drmmode->event_context);
1504 Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
1512 drmmode->scrn = pScrn;
1513 drmmode->cpp = cpp;
1514 drmmode->mode_res = drmModeGetResources(drmmode->fd);
1515 if (!drmmode->mode_res)
1518 xf86CrtcSetSizeRange(pScrn, 320, 200, drmmode->mode_res->max_width, drmmode->mode_res->max_height);
1519 for (i = 0; i < drmmode->mode_res->count_crtcs; i++)
1521 drmmode_crtc_init(pScrn, drmmode, i);
1523 for (i = 0; i < drmmode->mode_res->count_connectors; i++)
1524 drmmode_output_init(pScrn, drmmode, i, &num_dvi, &num_hdmi);
1527 drmmode_clones_init(pScrn, drmmode);
1531 drmmode->event_context.version = DRM_EVENT_CONTEXT_VERSION;
1532 drmmode->event_context.vblank_handler = drmmode_vblank_handler;
1533 drmmode->event_context.page_flip_handler = drmmode_flip_handler;
1538 void drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
1546 SetNotifyFd(drmmode->fd, drmmode_notify_fd, X_NOTIFY_READ, drmmode);
1548 AddGeneralSocket(drmmode->fd);
1550 drm_wakeup_handler, drmmode);
1556 Bool drmmode_set_bufmgr(ScrnInfoPtr pScrn, drmmode_ptr drmmode, struct radeon_bo_manager *bufmgr)
1558 drmmode->bufmgr = bufmgr;
1564 void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id, struct radeon_bo *bo)
1573 void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y)
1585 Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
1590 drmmode_copy_fb(pScrn, drmmode);
1600 drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
1728 drmmode_ptr drmmode = closure;
1729 ScrnInfoPtr scrn = drmmode->scrn;
1731 dev = udev_monitor_receive_device(drmmode->uevent_monitor);
1740 void drmmode_uevent_init(ScrnInfoPtr scrn, drmmode_ptr drmmode)
1764 drmmode->uevent_handler =
1767 drmmode);
1769 drmmode->uevent_monitor = mon;
1773 void drmmode_uevent_fini(ScrnInfoPtr scrn, drmmode_ptr drmmode)
1776 if (drmmode->uevent_handler) {
1777 struct udev *u = udev_monitor_get_udev(drmmode->uevent_monitor);
1778 xf86RemoveGeneralHandler(drmmode->uevent_handler);
1780 udev_monitor_unref(drmmode->uevent_monitor);
1791 drmmode_ptr drmmode = drmmode_crtc->drmmode;
1816 old_fb_id = drmmode->fb_id;
1817 if (drmModeAddFB(drmmode->fd, scrn->virtualX, height,
1819 new_front->handle, &drmmode->fb_id))
1839 flipdata->drmmode = drmmode;
1863 if (drmModePageFlip(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
1864 drmmode->fb_id, DRM_MODE_PAGE_FLIP_EVENT, flipcarrier)) {
1879 drmModeRmFB(drmmode->fd, drmmode->fb_id);
1880 drmmode->fb_id = old_fb_id;