diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-28 13:57:09 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-12-28 13:57:09 +0000 |
commit | a5583165da0d2ae5eb1e5a2e11ee6e245d4b5aa4 (patch) | |
tree | 1ccce41d9bdaf5fb57e59de541bb5e7e67e14927 /uxa | |
parent | 337635ab97bbfc9b4455eadb63214783bb90bb2b (diff) |
uxa: Remove concept of global FB ownership made obsolete by GEM and KMS
With the introduction of GEM, we can continue to submit batch buffers
irrespective of ownership of the console, so do so.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa')
-rw-r--r-- | uxa/uxa-accel.c | 12 | ||||
-rw-r--r-- | uxa/uxa-glyphs.c | 1 | ||||
-rw-r--r-- | uxa/uxa-priv.h | 3 | ||||
-rw-r--r-- | uxa/uxa-render.c | 12 | ||||
-rw-r--r-- | uxa/uxa.c | 19 |
5 files changed, 11 insertions, 36 deletions
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c index 00948b78..53ff24cf 100644 --- a/uxa/uxa-accel.c +++ b/uxa/uxa-accel.c @@ -65,7 +65,7 @@ uxa_fill_spans(DrawablePtr pDrawable, GCPtr pGC, int n, return; } - if (uxa_screen->swappedOut || uxa_screen->force_fallback) + if (uxa_screen->force_fallback) goto fallback; if (pGC->fillStyle != FillSolid) @@ -133,7 +133,7 @@ uxa_do_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, if (format != ZPixmap || bpp < 8) return FALSE; - if (uxa_screen->swappedOut || uxa_screen->force_fallback) + if (uxa_screen->force_fallback) return FALSE; if (!uxa_screen->info->put_image) @@ -392,7 +392,7 @@ uxa_copy_n_to_n(DrawablePtr pSrcDrawable, return; } - if (uxa_screen->swappedOut || uxa_screen->force_fallback) + if (uxa_screen->force_fallback) goto fallback; pSrcPixmap = uxa_get_drawable_pixmap(pSrcDrawable); @@ -541,7 +541,7 @@ uxa_copy_area(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, { uxa_screen_t *uxa_screen = uxa_get_screen(pDstDrawable->pScreen); - if (uxa_screen->swappedOut || uxa_screen->force_fallback) { + if (uxa_screen->force_fallback) { return uxa_check_copy_area(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, dstx, dsty); @@ -742,7 +742,7 @@ uxa_poly_fill_rect(DrawablePtr pDrawable, if (!REGION_NUM_RECTS(pReg)) goto out; - if (uxa_screen->swappedOut || uxa_screen->force_fallback) + if (uxa_screen->force_fallback) goto fallback; pPixmap = uxa_get_offscreen_pixmap (pDrawable, &xoff, &yoff); @@ -1108,7 +1108,7 @@ uxa_get_image(DrawablePtr pDrawable, int x, int y, int w, int h, return; } - if (uxa_screen->swappedOut || uxa_screen->force_fallback) + if (uxa_screen->force_fallback) goto fallback; pPix = uxa_get_offscreen_pixmap(pDrawable, &xoff, &yoff); diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c index 8e412fd7..6172f2f6 100644 --- a/uxa/uxa-glyphs.c +++ b/uxa/uxa-glyphs.c @@ -1085,7 +1085,6 @@ uxa_glyphs(CARD8 op, } if (!uxa_screen->info->prepare_composite || - uxa_screen->swappedOut || uxa_screen->force_fallback || !uxa_drawable_is_offscreen(pDst->pDrawable) || pDst->alphaMap || pSrc->alphaMap || diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h index d6d857f1..0de45f5f 100644 --- a/uxa/uxa-priv.h +++ b/uxa/uxa-priv.h @@ -134,9 +134,6 @@ typedef struct { Bool force_fallback; Bool fallback_debug; - Bool swappedOut; - unsigned disableFbCount; - unsigned offScreenCounter; uxa_glyph_cache_t glyphCaches[UXA_NUM_GLYPH_CACHE_FORMATS]; Bool glyph_cache_initialized; diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c index 878b0288..877b2869 100644 --- a/uxa/uxa-render.c +++ b/uxa/uxa-render.c @@ -196,10 +196,8 @@ uxa_print_composite_fallback(const char *func, CARD8 op, " op %s, \n" " src %s, \n" " mask %s, \n" - " dst %s, \n" - " screen %s\n", - func, op_to_string (op), srcdesc, maskdesc, dstdesc, - uxa_screen->swappedOut ? "swapped out" : "normal"); + " dst %s, \n", + func, op_to_string (op), srcdesc, maskdesc, dstdesc); } Bool uxa_op_reads_destination(CARD8 op) @@ -1581,7 +1579,7 @@ uxa_composite(CARD8 op, return; } - if (uxa_screen->swappedOut || uxa_screen->force_fallback) + if (uxa_screen->force_fallback) goto fallback; if (!uxa_drawable_is_offscreen(pDst->pDrawable)) @@ -1939,7 +1937,7 @@ uxa_trapezoids(CARD8 op, PicturePtr src, PicturePtr dst, return; } - if (uxa_screen->swappedOut || uxa_screen->force_fallback) { + if (uxa_screen->force_fallback) { fallback: uxa_check_trapezoids(op, src, dst, maskFormat, xSrc, ySrc, ntrap, traps); return; @@ -2168,7 +2166,7 @@ uxa_triangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, return; } - if (uxa_screen->swappedOut || uxa_screen->force_fallback) { + if (uxa_screen->force_fallback) { fallback: uxa_check_triangles(op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris); @@ -333,21 +333,6 @@ static RegionPtr uxa_bitmap_to_region(PixmapPtr pPix) return ret; } -static void uxa_xorg_enable_disable_fb_access(int index, Bool enable) -{ - ScreenPtr screen = screenInfo.screens[index]; - uxa_screen_t *uxa_screen = uxa_get_screen(screen); - - if (!enable && uxa_screen->disableFbCount++ == 0) - uxa_screen->swappedOut = TRUE; - - if (enable && --uxa_screen->disableFbCount == 0) - uxa_screen->swappedOut = FALSE; - - if (uxa_screen->SavedEnableDisableFBAccess) - uxa_screen->SavedEnableDisableFBAccess(index, enable); -} - void uxa_set_fallback_debug(ScreenPtr screen, Bool enable) { uxa_screen_t *uxa_screen = uxa_get_screen(screen); @@ -453,7 +438,6 @@ uxa_driver_t *uxa_driver_alloc(void) Bool uxa_driver_init(ScreenPtr screen, uxa_driver_t * uxa_driver) { uxa_screen_t *uxa_screen; - ScrnInfoPtr scrn = xf86Screens[screen->myNum]; if (!uxa_driver) return FALSE; @@ -533,9 +517,6 @@ Bool uxa_driver_init(ScreenPtr screen, uxa_driver_t * uxa_driver) uxa_screen->SavedBitmapToRegion = screen->BitmapToRegion; screen->BitmapToRegion = uxa_bitmap_to_region; - uxa_screen->SavedEnableDisableFBAccess = scrn->EnableDisableFBAccess; - scrn->EnableDisableFBAccess = uxa_xorg_enable_disable_fb_access; - #ifdef RENDER { PictureScreenPtr ps = GetPictureScreenIfSet(screen); |