Lines Matching refs:video
79 struct sna_video *video = port->devPriv.ptr;
81 xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(video->sna->scrn);
92 if (video->bo[pipe] == NULL)
97 if (drmIoctl(video->sna->kgem.fd, LOCAL_IOCTL_MODE_SETPLANE, &s))
98 xf86DrvMsg(video->sna->scrn->scrnIndex, X_ERROR,
101 if (video->bo[pipe])
102 kgem_bo_destroy(&video->sna->kgem, video->bo[pipe]);
103 video->bo[pipe] = NULL;
113 struct sna_video *video = port->devPriv.ptr;
116 video->color_key_changed = ~0;
117 video->color_key = value;
118 RegionEmpty(&video->clip);
122 video->SyncToVblank, !!value));
123 video->SyncToVblank = !!value;
126 video->AlwaysOnTop, !!value));
127 video->color_key_changed = ~0;
128 video->AlwaysOnTop = !!value;
137 struct sna_video *video = port->devPriv.ptr;
140 *value = video->color_key;
142 *value = video->AlwaysOnTop;
144 *value = video->SyncToVblank;
153 struct sna_video *video = port->devPriv.ptr;
154 struct sna *sna = video->sna;
218 struct sna_video *video,
226 /* XXX handle video spanning multiple CRTC */
235 if (video->color_key_changed & (1 << pipe) && video->has_color_key) {
245 __FUNCTION__, video->color_key));
248 set.min_value = video->color_key;
249 set.max_value = video->color_key; /* not used for destkey */
252 if (!video->AlwaysOnTop)
260 video->has_color_key = false;
263 video->color_key_changed &= ~(1 << pipe);
266 if (video->bo[pipe] == frame->bo)
320 X_ERROR, "failed to add fb, unable to update video\n");
354 s.plane_id = video->plane;
356 if (video->bo[pipe]) {
357 kgem_bo_destroy(&sna->kgem, video->bo[pipe]);
358 video->bo[pipe] = NULL;
365 if (video->bo[pipe])
366 kgem_bo_destroy(&sna->kgem, video->bo[pipe]);
367 video->bo[pipe] = kgem_bo_reference(frame->bo);
373 struct sna_video *video = port->devPriv.ptr;
374 struct sna *sna = video->sna;
385 DBG(("%s: always_on_top=%d\n", __FUNCTION__, video->AlwaysOnTop));
386 if (!video->AlwaysOnTop)
419 sna_video_frame_init(video, format->id, width, height, &frame);
426 if (video->bo[pipe]) {
430 if (drmIoctl(video->sna->kgem.fd, LOCAL_IOCTL_MODE_SETPLANE, &s))
431 xf86DrvMsg(video->sna->scrn->scrnIndex, X_ERROR,
433 video->bo[pipe] = NULL;
472 sna_video_frame_set_rotation(video, &frame, rotation);
500 frame.bo = sna_video_buffer(video, &frame);
502 DBG(("%s: failed to allocate video bo\n", __FUNCTION__));
507 if (!sna_video_copy_data(video, &frame, buf)) {
508 DBG(("%s: failed to copy video data\n", __FUNCTION__));
515 if (!sna_video_sprite_show(sna, video, &frame, crtc, &dst)) {
516 DBG(("%s: failed to show video frame\n", __FUNCTION__));
524 sna_video_buffer_fini(video);
530 if (!video->AlwaysOnTop && !RegionEqual(&video->clip, &clip) &&
534 video->color_key,
537 RegionCopy(&video->clip, &clip);
553 struct sna_video *video = port->devPriv.ptr;
557 if (*w > video->sna->mode.max_crtc_width)
558 *w = video->sna->mode.max_crtc_width;
559 if (*h > video->sna->mode.max_crtc_height)
560 *h = video->sna->mode.max_crtc_height;
569 sna_video_frame_init(video, format->id, *w, *h, &frame);
570 sna_video_frame_set_rotation(video, &frame, RR_Rotate_0);
633 struct sna_video *video;
643 video = calloc(1, sizeof(*video));
645 if (video == NULL || port == NULL) {
646 free(video);
700 port->devPriv.ptr = video;
702 video->sna = sna;
703 video->alignment = 64;
704 video->color_key = sna_video_sprite_color_key(sna);
705 video->color_key_changed = ~0;
706 video->has_color_key = true;
707 video->brightness = -19; /* (255/219) * -16 */
708 video->contrast = 75; /* 255/219 * 64 */
709 video->saturation = 146; /* 128/112 * 128 */
710 video->desired_crtc = NULL;
711 video->gamma5 = 0xc0c0c0;
712 video->gamma4 = 0x808080;
713 video->gamma3 = 0x404040;
714 video->gamma2 = 0x202020;
715 video->gamma1 = 0x101010;
716 video->gamma0 = 0x080808;
717 RegionNull(&video->clip);
718 video->SyncToVblank = 1;