~ubuntu-branches/debian/jessie/xserver-xorg-video-intel/jessie

« back to all changes in this revision

Viewing changes to src/sna/sna_video.c

  • Committer: Package Import Robot
  • Author(s): Julien Cristau
  • Date: 2012-05-26 12:38:07 UTC
  • mfrom: (26.1.14 sid)
  • Revision ID: package-import@ubuntu.com-20120526123807-esybcmtb8h417v2r
Tags: 2:2.19.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
 
84
84
        for (i = 0; i < ARRAY_SIZE(video->old_buf); i++) {
85
85
                if (video->old_buf[i]) {
 
86
                        if (video->old_buf[i]->unique_id)
 
87
                                drmModeRmFB(sna->kgem.fd,
 
88
                                                video->old_buf[i]->unique_id);
86
89
                        kgem_bo_destroy(&sna->kgem, video->old_buf[i]);
87
90
                        video->old_buf[i] = NULL;
88
91
                }
89
92
        }
90
93
 
91
94
        if (video->buf) {
 
95
                if (video->buf->unique_id)
 
96
                        drmModeRmFB(sna->kgem.fd, video->buf->unique_id);
92
97
                kgem_bo_destroy(&sna->kgem, video->buf);
93
98
                video->buf = NULL;
94
99
        }
104
109
                sna_video_free_buffers(sna, video);
105
110
 
106
111
        if (video->buf == NULL)
107
 
                video->buf = kgem_create_linear(&sna->kgem, frame->size);
 
112
                video->buf = kgem_create_linear(&sna->kgem, frame->size,
 
113
                                                CREATE_GTT_MAP);
108
114
 
109
115
        return video->buf;
110
116
}
439
445
        if (frame->bo == NULL)
440
446
                return FALSE;
441
447
 
 
448
        DBG(("%s: handle=%d, size=%dx%d, rotation=%d\n",
 
449
             __FUNCTION__, frame->bo->handle, frame->width, frame->height,
 
450
             video->rotation));
 
451
        DBG(("%s: top=%d, left=%d\n", __FUNCTION__, frame->top, frame->left));
 
452
 
442
453
        /* In the common case, we can simply the upload in a single pwrite */
443
454
        if (video->rotation == RR_Rotate_0) {
444
455
                if (is_planar_fourcc(frame->id)) {
471
482
                }
472
483
        }
473
484
 
474
 
        /* copy data */
475
 
        dst = kgem_bo_map(&sna->kgem, frame->bo);
 
485
        /* copy data, must use GTT so that we keep the overlay uncached */
 
486
        dst = kgem_bo_map__gtt(&sna->kgem, frame->bo);
476
487
        if (dst == NULL)
477
488
                return FALSE;
478
489
 
509
520
         * supported hardware.
510
521
         */
511
522
        textured = sna_video_textured_setup(sna, screen);
512
 
        overlay = sna_video_overlay_setup(sna, screen);
 
523
        overlay = sna_video_sprite_setup(sna, screen);
 
524
        if (overlay == NULL)
 
525
                overlay = sna_video_overlay_setup(sna, screen);
513
526
 
514
527
        if (overlay && prefer_overlay)
515
528
                adaptors[num_adaptors++] = overlay;