~ubuntu-branches/ubuntu/raring/xserver-xorg-video-intel/raring

« back to all changes in this revision

Viewing changes to src/sna/sna_blt.c

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2012-09-29 16:45:35 UTC
  • mfrom: (1.4.24)
  • Revision ID: package-import@ubuntu.com-20120929164535-g15mwstkty0de7ki
Tags: 2:2.20.9-0ubuntu1
* Merge from unrelease debian git.
  - fixes racy UXA pageflip code (LP: #966744)
* Drop dont-run-intel-mode-fini-before-preinit.diff, upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1614
1614
        assert(src->devPrivate.ptr);
1615
1615
 
1616
1616
        if (op->dst.bo) {
 
1617
                assert(op->dst.bo == sna_pixmap(op->dst.pixmap)->gpu_bo);
1617
1618
                if (alpha_fixup) {
1618
1619
                        op->u.blt.pixel = alpha_fixup;
1619
1620
                        op->blt   = blt_put_composite_with_alpha;
1871
1872
                }
1872
1873
        } else {
1873
1874
put:
1874
 
                if (!tmp->dst.bo) {
1875
 
                        RegionRec region;
1876
 
 
1877
 
                        region.extents = dst_box;
1878
 
                        region.data = NULL;
1879
 
 
1880
 
                        if (!sna_drawable_move_region_to_cpu(dst->pDrawable, &region,
1881
 
                                                        MOVE_INPLACE_HINT | MOVE_WRITE))
1882
 
                                return false;
1883
 
                } else {
1884
 
                        if (tmp->dst.bo == sna_pixmap(tmp->dst.pixmap)->cpu_bo) {
 
1875
                if (tmp->dst.bo) {
 
1876
                        struct sna_pixmap *priv = sna_pixmap(tmp->dst.pixmap);
 
1877
                        if (tmp->dst.bo == priv->cpu_bo) {
1885
1878
                                assert(kgem_bo_is_busy(tmp->dst.bo));
1886
1879
                                tmp->dst.bo = sna_drawable_use_bo(dst->pDrawable,
1887
1880
                                                                  FORCE_GPU | PREFER_GPU,
1888
1881
                                                                  &dst_box,
1889
1882
                                                                  &tmp->damage);
 
1883
                                if (tmp->dst.bo == priv->cpu_bo) {
 
1884
                                        DBG(("%s: forcing the stall to overwrite a busy CPU bo\n", __FUNCTION__));
 
1885
                                        tmp->dst.bo = NULL;
 
1886
                                }
1890
1887
                        }
1891
1888
                }
 
1889
 
 
1890
                if (tmp->dst.bo == NULL) {
 
1891
                        RegionRec region;
 
1892
 
 
1893
                        region.extents = dst_box;
 
1894
                        region.data = NULL;
 
1895
 
 
1896
                        if (!sna_drawable_move_region_to_cpu(dst->pDrawable, &region,
 
1897
                                                        MOVE_INPLACE_HINT | MOVE_READ | MOVE_WRITE))
 
1898
                                return false;
 
1899
                }
 
1900
 
1892
1901
                ret = prepare_blt_put(sna, tmp, alpha_fixup);
1893
1902
        }
1894
1903