summaryrefslogtreecommitdiff
path: root/uxa/uxa.c
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@linux.intel.com>2011-11-16 15:04:37 +0800
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-16 23:57:57 +0000
commitc4c2eb1fae2518578a56a278afeaec66d544439d (patch)
treeb3118085c66789139858286d98e522b7ffb1252e /uxa/uxa.c
parentac7df2919b92c9fe47c6745975e1848932f989e8 (diff)
uxa/glamor: Introduce additional access modes to wrap glamor acceleration
Integrate glamor acceleration into UXA framework. Add necessary flushing at the following points: 1. Flush UXA batch buffer before call into glamor. 2. Flush GL operations after return from a glamor function. 3. The point we need to flush UXA batch buffer, we also need to flush GL operations, for example, in intel_flush_callback and couple of places in intel_display.c. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa/uxa.c')
-rw-r--r--uxa/uxa.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/uxa/uxa.c b/uxa/uxa.c
index 856a0ce5..5a3c0bef 100644
--- a/uxa/uxa.c
+++ b/uxa/uxa.c
@@ -160,7 +160,7 @@ Bool uxa_prepare_access(DrawablePtr pDrawable, uxa_access_t access)
*
* It deals with calling the driver's finish_access() only if necessary.
*/
-void uxa_finish_access(DrawablePtr pDrawable)
+void uxa_finish_access(DrawablePtr pDrawable, uxa_access_t access)
{
ScreenPtr pScreen = pDrawable->pScreen;
uxa_screen_t *uxa_screen = uxa_get_screen(pScreen);
@@ -173,7 +173,7 @@ void uxa_finish_access(DrawablePtr pDrawable)
if (!uxa_pixmap_is_offscreen(pPixmap))
return;
- (*uxa_screen->info->finish_access) (pPixmap);
+ (*uxa_screen->info->finish_access) (pPixmap, access);
}
/**
@@ -217,7 +217,7 @@ uxa_validate_gc(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
fb24_32ReformatTile(pOldTile,
pDrawable->
bitsPerPixel);
- uxa_finish_access(&pOldTile->drawable);
+ uxa_finish_access(&pOldTile->drawable, UXA_ACCESS_RO);
}
}
if (pNewTile) {
@@ -235,7 +235,7 @@ uxa_validate_gc(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
if (uxa_prepare_access
(&pGC->tile.pixmap->drawable, UXA_ACCESS_RW)) {
fbPadPixmap(pGC->tile.pixmap);
- uxa_finish_access(&pGC->tile.pixmap->drawable);
+ uxa_finish_access(&pGC->tile.pixmap->drawable, UXA_ACCESS_RW);
}
}
/* Mask out the GCTile change notification, now that we've
@@ -250,7 +250,7 @@ uxa_validate_gc(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
*/
if (uxa_prepare_access(&pGC->stipple->drawable, UXA_ACCESS_RW)) {
fbValidateGC(pGC, changes, pDrawable);
- uxa_finish_access(&pGC->stipple->drawable);
+ uxa_finish_access(&pGC->stipple->drawable, UXA_ACCESS_RW);
}
} else {
fbValidateGC(pGC, changes, pDrawable);
@@ -296,7 +296,7 @@ Bool uxa_prepare_access_window(WindowPtr pWin)
(&pWin->border.pixmap->drawable, UXA_ACCESS_RO)) {
if (pWin->backgroundState == BackgroundPixmap)
uxa_finish_access(&pWin->background.pixmap->
- drawable);
+ drawable, UXA_ACCESS_RO);
return FALSE;
}
}
@@ -306,10 +306,10 @@ Bool uxa_prepare_access_window(WindowPtr pWin)
void uxa_finish_access_window(WindowPtr pWin)
{
if (pWin->backgroundState == BackgroundPixmap)
- uxa_finish_access(&pWin->background.pixmap->drawable);
+ uxa_finish_access(&pWin->background.pixmap->drawable, UXA_ACCESS_RO);
if (pWin->borderIsPixel == FALSE)
- uxa_finish_access(&pWin->border.pixmap->drawable);
+ uxa_finish_access(&pWin->border.pixmap->drawable, UXA_ACCESS_RO);
}
static Bool uxa_change_window_attributes(WindowPtr pWin, unsigned long mask)
@@ -329,7 +329,7 @@ static RegionPtr uxa_bitmap_to_region(PixmapPtr pPix)
if (!uxa_prepare_access(&pPix->drawable, UXA_ACCESS_RO))
return NULL;
ret = fbPixmapToRegion(pPix);
- uxa_finish_access(&pPix->drawable);
+ uxa_finish_access(&pPix->drawable, UXA_ACCESS_RO);
return ret;
}