summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-04-17 14:01:47 -0700
committerEric Anholt <eric@anholt.net>2009-04-27 17:05:59 -0700
commitfa81ae1637bfd7b73b43355b78c88a9b84c0393c (patch)
tree72c4dadcc3d93d4ad47905ef4b40e665c7dacafb
parent1b10745a2528622a32271f64c35fcdb7b7154d11 (diff)
Remove EXA support.
UXA has completely replaced EXA at this point. UXA is the same rendering core as EXA, but relying on kernel memory management or a fake bufmgr instead of trying to manage memory in the X Server.
-rw-r--r--man/intel.man8
-rw-r--r--src/Makefile.am2
-rw-r--r--src/drmmode_display.c24
-rw-r--r--src/i830.h28
-rw-r--r--src/i830_accel.c25
-rw-r--r--src/i830_batchbuffer.h4
-rw-r--r--src/i830_driver.c113
-rw-r--r--src/i830_exa.c315
-rw-r--r--src/i830_memory.c42
-rw-r--r--src/i830_video.c12
10 files changed, 17 insertions, 556 deletions
diff --git a/man/intel.man b/man/intel.man
index 3e74bc2d..05aa6789 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -146,14 +146,6 @@ have options for selecting adaptors.
.IP
Default: Textured video adaptor is preferred.
.TP
-.BI "Option \*qAccelMethod\*q \*q" string \*q
-Choose acceleration architecture, either "UXA" or "EXA".
-EXA is a simple acceleration architecture designed for systems without
-kernel memory management, while UXA is designed to take advantage of the
-capabilities of kernel memory management.
-.IP
-Default: "UXA" if kernel-modesetting is available, "EXA" otherwise.
-.TP
.BI "Option \*qModeDebug\*q \*q" boolean \*q
Enable printing of additional debugging information about modesetting to
the server log.
diff --git a/src/Makefile.am b/src/Makefile.am
index 64012691..d4b9c8ac 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -32,7 +32,7 @@ SUBDIRS = xvmc bios_reader ch7017 ch7xxx ivch sil164 tfp410 $(REGDUMPER)
AM_CFLAGS = @WARN_CFLAGS@ @XORG_CFLAGS@ @DRM_CFLAGS@ @DRI_CFLAGS@ \
@PCIACCESS_CFLAGS@ -I$(top_srcdir)/uxa \
- -DI830_XV -DI830_USE_EXA -DI830_USE_UXA
+ -DI830_XV -DI830_USE_UXA
intel_drv_la_LTLIBRARIES = intel_drv.la
intel_drv_la_LDFLAGS = -module -avoid-version
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index b081a7b3..8f682d50 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -926,28 +926,4 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
return TRUE;
}
-Bool drmmode_is_rotate_pixmap(ScrnInfoPtr pScrn, pointer pPixData, dri_bo **bo)
-{
- return FALSE;
-
-#if 0
- xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR (pScrn);
- int i;
-
- for (i = 0; i < config->num_crtc; i++) {
- xf86CrtcPtr crtc = config->crtc[i];
- drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
-
- if (!drmmode_crtc->rotate_bo)
- continue;
-
- if (drmmode_crtc->rotate_bo->virtual == pPixData) {
- *bo = drmmode_crtc->rotate_bo;
- return TRUE;
- }
- }
- return FALSE;
-#endif
-}
-
#endif
diff --git a/src/i830.h b/src/i830.h
index 9f5dd3ab..314fd58f 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -73,11 +73,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "intel_bufmgr.h"
#include "i915_drm.h"
-#ifdef I830_USE_EXA
-#include "exa.h"
-Bool I830EXAInit(ScreenPtr pScreen);
-#endif
-
#ifdef I830_USE_UXA
#include "uxa.h"
Bool i830_uxa_init(ScreenPtr pScreen);
@@ -87,7 +82,7 @@ Bool i830_get_aperture_space(ScrnInfoPtr pScrn, drm_intel_bo **bo_table,
int num_bos);
#endif
-#if defined(I830_USE_UXA) || defined(I830_USE_EXA)
+#if defined(I830_USE_UXA)
dri_bo *i830_get_pixmap_bo (PixmapPtr pixmap);
void i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo *bo);
#endif
@@ -333,7 +328,6 @@ enum backlight_control {
typedef enum accel_method {
ACCEL_UNINIT = 0,
ACCEL_NONE,
- ACCEL_EXA,
ACCEL_UXA
} accel_method_t;
@@ -373,9 +367,6 @@ typedef struct _I830Rec {
/* separate small buffers for kernels that support this */
i830_memory *cursor_mem_classic[2];
i830_memory *cursor_mem_argb[2];
-#ifdef I830_USE_EXA
- i830_memory *exa_offscreen;
-#endif
i830_memory *fake_bufmgr_mem;
/* Regions allocated either from the above pools, or from agpgart. */
@@ -453,15 +444,12 @@ typedef struct _I830Rec {
void (*batch_flush_notify)(ScrnInfoPtr pScrn);
-#ifdef I830_USE_EXA
- ExaDriverPtr EXADriverPtr;
-#endif
#ifdef I830_USE_UXA
uxa_driver_t *uxa_driver;
Bool need_flush;
#endif
Bool need_sync;
-#if defined(I830_USE_EXA) || defined(I830_USE_UXA)
+#if defined(I830_USE_UXA)
PixmapPtr pSrcPixmap;
#endif
int accel_pixmap_pitch_alignment;
@@ -496,12 +484,12 @@ typedef struct _I830Rec {
} video;
#endif
- /* EXA render state */
+ /* Render accel state */
float scale_units[2][2];
/** Transform pointers for src/mask, or NULL if identity */
PictTransform *transform[2];
float coord_adjust;
- /* i915 EXA render state */
+ /* i915 render accel state */
uint32_t mapstate[6];
uint32_t samplerstate[6];
@@ -653,10 +641,6 @@ typedef struct _I830Rec {
unsigned long intel_get_pixmap_offset(PixmapPtr pPix);
unsigned long intel_get_pixmap_pitch(PixmapPtr pPix);
-struct i830_exa_pixmap_priv {
- dri_bo *bo;
-};
-
/* Batchbuffer support macros and functions */
#include "i830_batchbuffer.h"
@@ -719,8 +703,6 @@ void I830DRI2CloseScreen(ScreenPtr pScreen);
#ifdef XF86DRM_MODE
extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp);
-extern Bool drmmode_is_rotate_pixmap(ScrnInfoPtr pScrn, pointer pPixData,
- dri_bo **bo);
#endif
extern Bool I830AccelInit(ScreenPtr pScreen);
@@ -889,7 +871,7 @@ static inline int i830_fb_compression_supported(I830Ptr pI830)
do { \
if (I830PTR(pScrn)->fallback_debug) { \
xf86DrvMsg(pScrn->scrnIndex, X_INFO, \
- "EXA fallback: " s "\n", ##arg); \
+ "fallback: " s "\n", ##arg); \
} \
return FALSE; \
} while(0)
diff --git a/src/i830_accel.c b/src/i830_accel.c
index a3772c50..b185ab17 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -66,28 +66,16 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
unsigned long
intel_get_pixmap_offset(PixmapPtr pPix)
{
-#if defined(I830_USE_EXA) || defined(I830_USE_UXA)
ScreenPtr pScreen = pPix->drawable.pScreen;
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
I830Ptr pI830 = I830PTR(pScrn);
- if (pI830->accel == ACCEL_EXA)
- return exaGetPixmapOffset(pPix);
-#endif
return (unsigned long)pPix->devPrivate.ptr - (unsigned long)pI830->FbBase;
}
unsigned long
intel_get_pixmap_pitch(PixmapPtr pPix)
{
-#ifdef I830_USE_EXA
- ScreenPtr pScreen = pPix->drawable.pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- I830Ptr pI830 = I830PTR(pScrn);
-
- if (pI830->accel == ACCEL_EXA)
- return exaGetPixmapPitch(pPix);
-#endif
return (unsigned long)pPix->devKind;
}
@@ -136,9 +124,6 @@ I830WaitLpRing(ScrnInfoPtr pScrn, int n, int timeout_millis)
else
i830_dump_error_state(pScrn);
ErrorF("space: %d wanted %d\n", ring->space, n);
-#ifdef I830_USE_EXA
- pI830->EXADriverPtr = NULL;
-#endif
#ifdef I830_USE_UXA
pI830->uxa_driver = NULL;
#endif
@@ -279,7 +264,7 @@ I830AccelInit(ScreenPtr pScreen)
*
* For the tiled issues, the only tiled buffer we draw to should be
* the front, which will have an appropriate pitch/offset already set up,
- * so EXA doesn't need to worry.
+ * so UXA doesn't need to worry.
*/
if (IS_I965G(pI830)) {
pI830->accel_pixmap_offset_alignment = 4 * 2;
@@ -300,14 +285,6 @@ I830AccelInit(ScreenPtr pScreen)
case ACCEL_UXA:
#ifdef I830_USE_UXA
return i830_uxa_init(pScreen);
-#else
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "UXA not built in, falling back to EXA.\n");
- return I830EXAInit(pScreen);
-#endif
-#ifdef I830_USE_EXA
- case ACCEL_EXA:
- return I830EXAInit(pScreen);
#endif
case ACCEL_UNINIT:
case ACCEL_NONE:
diff --git a/src/i830_batchbuffer.h b/src/i830_batchbuffer.h
index a72786e5..f16023df 100644
--- a/src/i830_batchbuffer.h
+++ b/src/i830_batchbuffer.h
@@ -100,13 +100,13 @@ intel_batch_emit_reloc_pixmap(I830Ptr pI830, PixmapPtr pPixmap,
uint32_t read_domains, uint32_t write_domain,
uint32_t delta)
{
-#if I830_USE_UXA || I830_USE_EXA
+#if I830_USE_UXA
dri_bo *bo = i830_get_pixmap_bo(pPixmap);
#endif
uint32_t offset;
assert(pI830->batch_ptr != NULL);
assert(intel_batch_space(pI830) >= 4);
-#if I830_USE_UXA || I830_USE_EXA
+#if I830_USE_UXA
if (bo) {
intel_batch_emit_reloc(pI830, bo, read_domains, write_domain, delta);
return;
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 93bb0eae..5fa76ca5 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -213,18 +213,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <xf86drmMode.h>
#endif
-#ifdef I830_USE_EXA
-static const char *I830exaSymbols[] = {
- "exaGetVersion",
- "exaDriverInit",
- "exaDriverFini",
- "exaOffscreenAlloc",
- "exaOffscreenFree",
- "exaWaitSync",
- NULL
-};
-#endif
-
#define BIT(x) (1 << (x))
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define NB_OF(x) (sizeof (x) / sizeof (*x))
@@ -297,7 +285,6 @@ static PciChipsets I830PciChipsets[] = {
*/
typedef enum {
- OPTION_ACCELMETHOD,
OPTION_NOACCEL,
OPTION_DRI,
OPTION_VIDEO_KEY,
@@ -316,7 +303,6 @@ typedef enum {
} I830Opts;
static OptionInfoRec I830Options[] = {
- {OPTION_ACCELMETHOD, "AccelMethod", OPTV_ANYSTR, {0}, FALSE},
{OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE},
{OPTION_DRI, "DRI", OPTV_BOOLEAN, {0}, TRUE},
{OPTION_COLOR_KEY, "ColorKey", OPTV_INTEGER, {0}, FALSE},
@@ -1471,7 +1457,6 @@ static const char *accel_name[] =
{
"unspecified",
"no",
- "EXA",
"UXA",
};
@@ -1564,34 +1549,12 @@ I830AccelMethodInit(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
MessageType from = X_PROBED;
- char *s;
int i, num_pipe;
if (xf86ReturnOptValBool(pI830->Options, OPTION_NOACCEL, FALSE)) {
pI830->accel = ACCEL_NONE;
- }
-
- if (!(pI830->accel == ACCEL_NONE)) {
-#ifdef I830_USE_UXA
- pI830->accel = ACCEL_UXA;
-#endif
-#ifdef I830_USE_EXA
- pI830->accel = ACCEL_EXA;
-#endif
-#if I830_USE_EXA + I830_USE_UXA >= 2
- from = X_DEFAULT;
- if ((s = (char *)xf86GetOptValString(pI830->Options,
- OPTION_ACCELMETHOD))) {
- if (!xf86NameCmp(s, "EXA")) {
- from = X_CONFIG;
- pI830->accel = ACCEL_EXA;
- }
- else if (!xf86NameCmp(s, "UXA")) {
- from = X_CONFIG;
- pI830->accel = ACCEL_UXA;
- }
- }
-#endif
+ } else {
+ pI830->accel = ACCEL_UXA;
xf86DrvMsg(pScrn->scrnIndex, from, "Using %s for acceleration\n",
accel_name[pI830->accel]);
}
@@ -1669,25 +1632,10 @@ I830DrmModeInit(ScrnInfoPtr pScrn)
#ifdef XF86DRM_MODE
I830Ptr pI830 = I830PTR(pScrn);
char *bus_id;
- char *s;
int ret;
- /* Default to UXA but allow override */
pI830->accel = ACCEL_UXA;
-
- if ((s = (char *)xf86GetOptValString(pI830->Options, OPTION_ACCELMETHOD))) {
- if (xf86NameCmp(s, "UXA"))
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "kernel mode setting active,overridding accelmethod and using UXA\n");
- }
-
- pI830->can_resize = FALSE;
- if (pI830->accel == ACCEL_UXA)
- pI830->can_resize = TRUE;
-
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Resizable framebuffer: %s (%d %d)\n",
- pI830->can_resize ? "available" : "not available",
- pI830->directRenderingType, pI830->accel);
+ pI830->can_resize = TRUE;
bus_id = DRICreatePCIBusID(pI830->PciInfo);
@@ -1894,33 +1842,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
xf86LoaderReqSymLists(I810fbSymbols, NULL);
- switch (pI830->accel) {
-#ifdef I830_USE_EXA
- case ACCEL_EXA: {
- XF86ModReqInfo req;
- int errmaj, errmin;
-
- memset(&req, 0, sizeof(req));
- req.majorversion = 2;
-#if EXA_VERSION_MINOR >= 2
- req.minorversion = 2;
-#else
- req.minorversion = 1;
-#endif
- if (!LoadSubModule(pScrn->module, "exa", NULL, NULL, NULL, &req,
- &errmaj, &errmin)) {
- LoaderErrorMsg(NULL, "exa", errmaj, errmin);
- PreInitCleanup(pScrn);
- return FALSE;
- }
- xf86LoaderReqSymLists(I830exaSymbols, NULL);
- break;
- }
-#endif
- default:
- break;
- }
-
if (!pI830->use_drm_mode) {
i830CompareRegsToSnapshot(pScrn, "After PreInit");
@@ -3235,7 +3156,7 @@ I830LeaveVT(int scrnIndex, int flags)
FatalError("DRM_I915_LEAVEVT failed: %s\n", strerror(ret));
}
- if ((pI830->accel == ACCEL_EXA || pI830->accel == ACCEL_UXA) && IS_I965G(pI830))
+ if (pI830->accel == ACCEL_UXA && IS_I965G(pI830))
gen4_render_state_cleanup(pScrn);
ret = drmDropMaster(pI830->drmSubFD);
@@ -3322,8 +3243,7 @@ I830EnterVT(int scrnIndex, int flags)
intel_batch_init(pScrn);
- if ((pI830->accel == ACCEL_EXA || pI830->accel == ACCEL_UXA) &&
- IS_I965G(pI830))
+ if (pI830->accel == ACCEL_UXA && IS_I965G(pI830))
gen4_render_state_init(pScrn);
if (!pI830->use_drm_mode) {
@@ -3408,13 +3328,6 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen)
vgaHWUnmapMem(pScrn);
}
-#ifdef I830_USE_EXA
- if (pI830->EXADriverPtr) {
- exaDriverFini(pScreen);
- xfree(pI830->EXADriverPtr);
- pI830->EXADriverPtr = NULL;
- }
-#endif
#ifdef I830_USE_UXA
if (pI830->uxa_driver) {
uxa_driver_fini (pScreen);
@@ -3560,14 +3473,6 @@ i830WaitSync(ScrnInfoPtr pScrn)
I830Ptr pI830 = I830PTR(pScrn);
switch (pI830->accel) {
-#ifdef I830_USE_EXA
- case ACCEL_EXA:
- if (pI830->EXADriverPtr) {
- ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
- exaWaitSync(pScreen);
- }
- break;
-#endif
#ifdef I830_USE_UXA
case ACCEL_UXA:
if (pI830->uxa_driver && pI830->need_sync) {
@@ -3587,14 +3492,6 @@ i830MarkSync(ScrnInfoPtr pScrn)
I830Ptr pI830 = I830PTR(pScrn);
switch (pI830->accel) {
-#ifdef I830_USE_EXA
- case ACCEL_EXA:
- if (pI830->EXADriverPtr) {
- ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
- exaMarkSync(pScreen);
- }
- break;
-#endif
#ifdef I830_USE_UXA
case ACCEL_UXA:
if (pI830->uxa_driver)
diff --git a/src/i830_exa.c b/src/i830_exa.c
index e88d260b..cf393422 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -153,39 +153,6 @@ i830_pixmap_pitch_is_aligned(PixmapPtr pixmap)
return i830_pixmap_pitch(pixmap) % pI830->accel_pixmap_pitch_alignment == 0;
}
-static Bool
-i830_exa_pixmap_is_offscreen(PixmapPtr pPixmap)
-{
- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum];
- I830Ptr pI830 = I830PTR(pScrn);
-
- if ((void *)pPixmap->devPrivate.ptr >= (void *)pI830->FbBase &&
- (void *)pPixmap->devPrivate.ptr <
- (void *)(pI830->FbBase + pI830->FbMapSize))
- {
- return TRUE;
- } else {
- return FALSE;
- }
-}
-
-/**
- * I830EXASync - wait for a command to finish
- * @pScreen: current screen
- * @marker: marker command to wait for
- *
- * Wait for the command specified by @marker to finish, then return. We don't
- * actually do marker waits, though we might in the future. For now, just
- * wait for a full idle.
- */
-static void
-I830EXASync(ScreenPtr pScreen, int marker)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-
- I830Sync(pScrn);
-}
-
/**
* Sets up hardware state for a series of solid fills.
*/
@@ -200,7 +167,7 @@ i830_uxa_prepare_solid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg)
i830_get_pixmap_bo(pPixmap),
};
- if (!EXA_PM_IS_SOLID(&pPixmap->drawable, planemask))
+ if (!UXA_PM_IS_SOLID(&pPixmap->drawable, planemask))
I830FALLBACK("planemask is not solid");
if (pPixmap->drawable.bitsPerPixel == 24)
@@ -295,7 +262,7 @@ i830_uxa_prepare_copy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,
i830_get_pixmap_bo(pDstPixmap),
};
- if (!EXA_PM_IS_SOLID(&pSrcPixmap->drawable, planemask))
+ if (!UXA_PM_IS_SOLID(&pSrcPixmap->drawable, planemask))
I830FALLBACK("planemask is not solid");
if (pDstPixmap->drawable.bitsPerPixel < 8)
@@ -481,265 +448,6 @@ i830_transform_is_affine (PictTransformPtr t)
return t->matrix[2][0] == 0 && t->matrix[2][1] == 0;
}
-#ifdef XF86DRM_MODE
-
-static void *
-I830EXACreatePixmap(ScreenPtr screen, int size, int align)
-{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
- I830Ptr i830 = I830PTR(scrn);
- struct i830_exa_pixmap_priv *new_priv;
-
- new_priv = xcalloc(1, sizeof(struct i830_exa_pixmap_priv));
- if (!new_priv)
- return NULL;
-
- if (size == 0)
- return new_priv;
-
- new_priv->bo = dri_bo_alloc(i830->bufmgr, "pixmap", size,
- i830->accel_pixmap_offset_alignment);
- if (!new_priv->bo) {
- xfree(new_priv);
- return NULL;
- }
-
- return new_priv;
-}
-
-static void
-I830EXADestroyPixmap(ScreenPtr pScreen, void *driverPriv)
-{
- struct i830_exa_pixmap_priv *priv = driverPriv;
-
- if (priv->bo)
- dri_bo_unreference(priv->bo);
- xfree(priv);
-}
-
-static Bool I830EXAPixmapIsOffscreen(PixmapPtr pPix)
-{
- struct i830_exa_pixmap_priv *driver_priv = exaGetPixmapDriverPrivate(pPix);
-
- if (driver_priv && driver_priv->bo)
- return TRUE;
-
- return FALSE;
-}
-
-static Bool I830EXAPrepareAccess(PixmapPtr pPix, int index)
-{
- ScreenPtr screen = pPix->drawable.pScreen;
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
- I830Ptr i830 = I830PTR(scrn);
- struct i830_exa_pixmap_priv *driver_priv = exaGetPixmapDriverPrivate(pPix);
-
- if (!driver_priv) {
- xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: no driver private?\n",
- __FUNCTION__);
- return FALSE;
- }
-
- if (!driver_priv->bo) {
- xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: no buffer object?\n",
- __FUNCTION__);
- return TRUE;
- }
-
- intel_batch_flush(scrn, FALSE);
- if (i830->need_sync) {
- I830Sync(scrn);
- i830->need_sync = FALSE;
- }
- if (drm_intel_gem_bo_map_gtt(driver_priv->bo)) {
- xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: bo map failed\n",
- __FUNCTION__);
- return FALSE;
- }
- pPix->devPrivate.ptr = driver_priv->bo->virtual;
-
- return TRUE;
-}
-
-static void I830EXAFinishAccess(PixmapPtr pPix, int index)
-{
- ScreenPtr screen = pPix->drawable.pScreen;
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
- I830Ptr i830 = I830PTR(scrn);
- struct i830_exa_pixmap_priv *driver_priv = exaGetPixmapDriverPrivate(pPix);
-
- if (!driver_priv) {
- xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: no driver private?\n",
- __FUNCTION__);
- return;
- }
-
- if (!driver_priv->bo) {
- xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: no buffer object?\n",
- __FUNCTION__);
- return;
- }
-
- dri_bo_unmap(driver_priv->bo);
- pPix->devPrivate.ptr = NULL;
- if (driver_priv->bo == i830->front_buffer->bo)
- i830->need_flush = TRUE;
-}
-
-static Bool I830EXAModifyPixmapHeader(PixmapPtr pPix, int width, int height,
- int depth, int bitsPerPixel, int devKind,
- pointer pPixData)
-{
- ScreenPtr pScreen = pPix->drawable.pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- I830Ptr pI830 = I830PTR(pScrn);
- struct i830_exa_pixmap_priv *driver_priv = exaGetPixmapDriverPrivate(pPix);
-
- if (!driver_priv)
- return FALSE;
-
- if (pI830->use_drm_mode &&
- drmmode_is_rotate_pixmap(pScrn, pPixData, &driver_priv->bo)) {
- /* this is a rotate pixmap */
- dri_bo_unmap(driver_priv->bo);
- dri_bo_reference(driver_priv->bo);
- miModifyPixmapHeader(pPix, width, height, depth,
- bitsPerPixel, devKind, NULL);
- }
-
- if (pPixData == pI830->FbBase + pScrn->fbOffset) {
- if (driver_priv->bo)
- dri_bo_unreference(driver_priv->bo);
- driver_priv->bo =
- intel_bo_gem_create_from_name(pI830->bufmgr, "front",
- pI830->front_buffer->gem_name);
- if (!driver_priv->bo)
- return FALSE;
-
- miModifyPixmapHeader(pPix, width, height, depth,
- bitsPerPixel, devKind, NULL);
-
- return TRUE;
- }
- return FALSE;
-}
-
-#endif /* XF86DRM_MODE */
-
-Bool
-I830EXAInit(ScreenPtr pScreen)
-{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- I830Ptr pI830 = I830PTR(pScrn);
-
- pI830->EXADriverPtr = exaDriverAlloc();
- if (pI830->EXADriverPtr == NULL) {
- pI830->accel = ACCEL_NONE;
- return FALSE;
- }
- memset(pI830->EXADriverPtr, 0, sizeof(*pI830->EXADriverPtr));
-
- pI830->bufferOffset = 0;
- pI830->EXADriverPtr->exa_major = 2;
- /* If compiled against EXA 2.2, require 2.2 so we can use the
- * PixmapIsOffscreen hook.
- */
-#if EXA_VERSION_MINOR >= 2
- pI830->EXADriverPtr->exa_minor = 2;
-#else
- pI830->EXADriverPtr->exa_minor = 1;
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "EXA compatibility mode. Output rotation rendering "
- "performance may suffer\n");
-#endif
- if (!pI830->use_drm_mode) {
- pI830->EXADriverPtr->memoryBase = pI830->FbBase;
- if (pI830->exa_offscreen) {
- pI830->EXADriverPtr->offScreenBase = pI830->exa_offscreen->offset;
- pI830->EXADriverPtr->memorySize = pI830->exa_offscreen->offset +
- pI830->exa_offscreen->size;
- } else {
- pI830->EXADriverPtr->offScreenBase = pI830->FbMapSize;
- pI830->EXADriverPtr->memorySize = pI830->FbMapSize;
- }
- pI830->EXADriverPtr->flags = EXA_OFFSCREEN_PIXMAPS;
- } else {
-#ifdef XF86DRM_MODE
- pI830->EXADriverPtr->flags = EXA_OFFSCREEN_PIXMAPS | EXA_HANDLES_PIXMAPS;
- pI830->EXADriverPtr->PrepareAccess = I830EXAPrepareAccess;
- pI830->EXADriverPtr->FinishAccess = I830EXAFinishAccess;
-#if EXA_VERSION_MINOR >= 4
- pI830->EXADriverPtr->CreatePixmap = I830EXACreatePixmap;
- pI830->EXADriverPtr->DestroyPixmap = I830EXADestroyPixmap;
- pI830->EXADriverPtr->PixmapIsOffscreen = I830EXAPixmapIsOffscreen;
- pI830->EXADriverPtr->ModifyPixmapHeader = I830EXAModifyPixmapHeader;
-#endif
-#endif /* XF86DRM_MODE */
- }
-
- DPRINTF(PFX, "EXA Mem: memoryBase 0x%x, end 0x%x, offscreen base 0x%x, "
- "memorySize 0x%x\n",
- pI830->EXADriverPtr->memoryBase,
- pI830->EXADriverPtr->memoryBase + pI830->EXADriverPtr->memorySize,
- pI830->EXADriverPtr->offScreenBase,
- pI830->EXADriverPtr->memorySize);
-
- pI830->EXADriverPtr->pixmapOffsetAlign = pI830->accel_pixmap_offset_alignment;
- pI830->EXADriverPtr->pixmapPitchAlign = pI830->accel_pixmap_pitch_alignment;
- pI830->EXADriverPtr->maxX = pI830->accel_max_x;
- pI830->EXADriverPtr->maxY = pI830->accel_max_y;
-
- /* Sync */
- pI830->EXADriverPtr->WaitMarker = I830EXASync;
-
- /* Solid fill */
- pI830->EXADriverPtr->PrepareSolid = i830_uxa_prepare_solid;
- pI830->EXADriverPtr->Solid = i830_uxa_solid;
- pI830->EXADriverPtr->DoneSolid = i830_uxa_done_solid;
-
- /* Copy */
- pI830->EXADriverPtr->PrepareCopy = i830_uxa_prepare_copy;
- pI830->EXADriverPtr->Copy = i830_uxa_copy;
- pI830->EXADriverPtr->DoneCopy = i830_uxa_done_copy;
-
- /* Composite */
- if (!IS_I9XX(pI830)) {
- pI830->EXADriverPtr->CheckComposite = i830_check_composite;
- pI830->EXADriverPtr->PrepareComposite = i830_prepare_composite;
- pI830->EXADriverPtr->Composite = i830_composite;
- pI830->EXADriverPtr->DoneComposite = i830_done_composite;
- } else if (IS_I915G(pI830) || IS_I915GM(pI830) ||
- IS_I945G(pI830) || IS_I945GM(pI830) || IS_G33CLASS(pI830))
- {
- pI830->EXADriverPtr->CheckComposite = i915_check_composite;
- pI830->EXADriverPtr->PrepareComposite = i915_prepare_composite;
- pI830->EXADriverPtr->Composite = i915_composite;
- pI830->EXADriverPtr->DoneComposite = i830_done_composite;
- } else {
- pI830->EXADriverPtr->CheckComposite = i965_check_composite;
- pI830->EXADriverPtr->PrepareComposite = i965_prepare_composite;
- pI830->EXADriverPtr->Composite = i965_composite;
- pI830->EXADriverPtr->DoneComposite = i830_done_composite;
- }
-#if EXA_VERSION_MINOR >= 2
- if (!pI830->use_drm_mode)
- pI830->EXADriverPtr->PixmapIsOffscreen = i830_exa_pixmap_is_offscreen;
-#endif
-
- if(!exaDriverInit(pScreen, pI830->EXADriverPtr)) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "EXA initialization failed; trying older version\n");
- pI830->EXADriverPtr->exa_minor = 0;
- if(!exaDriverInit(pScreen, pI830->EXADriverPtr)) {
- xfree(pI830->EXADriverPtr);
- pI830->accel = ACCEL_NONE;
- return FALSE;
- }
- }
-
- return TRUE;
-}
-
dri_bo *
i830_get_pixmap_bo(PixmapPtr pixmap)
{
@@ -752,13 +460,6 @@ i830_get_pixmap_bo(PixmapPtr pixmap)
return dixLookupPrivate(&pixmap->devPrivates, &uxa_pixmap_index);
}
#endif
-#ifdef XF86DRM_MODE
- if (i830->accel == ACCEL_EXA) {
- struct i830_exa_pixmap_priv *driver_priv =
- exaGetPixmapDriverPrivate(pixmap);
- return driver_priv ? driver_priv->bo : NULL;
- }
-#endif
return NULL;
}
@@ -779,18 +480,8 @@ i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo *bo)
dixSetPrivate(&pixmap->devPrivates, &uxa_pixmap_index, bo);
}
#endif
-#ifdef XF86DRM_MODE
- if (i830->accel == ACCEL_EXA) {
- struct i830_exa_pixmap_priv *driver_priv =
- exaGetPixmapDriverPrivate(pixmap);
- if (driver_priv) {
- if (bo != NULL)
- dri_bo_reference(bo);
- driver_priv->bo = bo;
- }
- }
-#endif
}
+
#if defined(I830_USE_UXA)
static void
diff --git a/src/i830_memory.c b/src/i830_memory.c
index c46541cf..dae8cf93 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -70,10 +70,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* - Compatibility texture pool (optional, more is always better)
* - New texture pool (optional, more is always better. aperture allocation
* only)
- * - EXA offscreen pool (more is always better)
- *
- * We also want to be able to resize the front/back/depth buffers, and then
- * resize the EXA and texture memory pools appropriately.
*
* The user may request a specific amount of memory to be used
* (pI830->pEnt->videoRam != 0), in which case allocations have to fit within
@@ -366,7 +362,6 @@ i830_reset_allocations(ScrnInfoPtr pScrn)
pI830->cursor_mem_argb[p] = NULL;
}
pI830->front_buffer = NULL;
- pI830->exa_offscreen = NULL;
pI830->overlay_regs = NULL;
pI830->power_context = NULL;
pI830->ring.mem = NULL;
@@ -451,11 +446,6 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size)
*/
mmsize = size;
- /* EXA area is fixed. */
- if (pI830->accel == ACCEL_EXA) {
- mmsize -= ROUND_TO_PAGE(3 * pScrn->displayWidth * pI830->cpp *
- pScrn->virtualY);
- }
/* Overlay and cursors, if physical, need to be allocated outside
* of the kernel memory manager.
*/
@@ -1292,8 +1282,6 @@ Bool
i830_allocate_2d_memory(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
- unsigned int pitch = pScrn->displayWidth * pI830->cpp;
- long size;
if (!pI830->use_drm_mode) {
if (!xf86AgpGARTSupported() || !xf86AcquireGART(pScrn->scrnIndex)) {
@@ -1339,36 +1327,6 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
if (pI830->front_buffer == NULL)
return FALSE;
-#ifdef I830_USE_EXA
- if (pI830->accel == ACCEL_EXA && !pI830->use_drm_mode) {
- if (pI830->exa_offscreen == NULL) {
- /* Default EXA to having 3 screens worth of offscreen memory space
- * (for pixmaps).
- *
- * XXX: It would be nice to auto-size it larger if the user
- * specified a larger size, or to fit along with texture and FB
- * memory if a low videoRam is specified.
- */
- size = 3 * pitch * pScrn->virtualY;
- size = ROUND_TO_PAGE(size);
-
- /* EXA has no way to tell it that the offscreen memory manager has
- * moved its base and all the contents with it, so we have to have
- * it locked in place for the whole driver instance.
- */
- pI830->exa_offscreen =
- i830_allocate_memory(pScrn, "exa offscreen",
- size, PITCH_NONE, 1, NEED_LIFETIME_FIXED,
- TILE_NONE);
- if (pI830->exa_offscreen == NULL) {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Failed to allocate EXA offscreen memory.\n");
- return FALSE;
- }
- }
- }
-#endif /* I830_USE_EXA */
-
return TRUE;
}
diff --git a/src/i830_video.c b/src/i830_video.c
index 210f8db5..d07fb657 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -138,11 +138,6 @@ static Atom xvSyncToVblank;
#define OVERLAY_DEBUG if (0) ErrorF
#endif
-/* Oops, I never exported this function in EXA. I meant to. */
-#ifndef exaMoveInPixmap
-void exaMoveInPixmap (PixmapPtr pPixmap);
-#endif
-
/*
* OCMD - Overlay Command Register
*/
@@ -2479,13 +2474,6 @@ I830PutImage(ScrnInfoPtr pScrn,
pPixmap = (PixmapPtr)pDraw;
}
-#ifdef I830_USE_EXA
- if (pPriv->textured && pI830->accel == ACCEL_EXA) {
- /* Force the pixmap into framebuffer so we can draw to it. */
- exaMoveInPixmap(pPixmap);
- }
-#endif
-
if (!pPriv->textured) {
i830_display_video(pScrn, crtc, destId, width, height, dstPitch,
x1, y1, x2, y2, &dstBox, src_w, src_h,