diff options
author | Eric Anholt <eric@anholt.net> | 2009-04-17 15:11:12 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-04-27 17:05:59 -0700 |
commit | 96df22740b2cdc4f82a4a36c0f77663105d9337e (patch) | |
tree | f8017b83ab78a0719b3f2ae2e813e6ae6ee8dd81 /src | |
parent | fa81ae1637bfd7b73b43355b78c88a9b84c0393c (diff) |
unifdef I830_USE_UXA.
We only have on acceleration architecture now, and you can always build it
if you're building the driver.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/i830.h | 8 | ||||
-rw-r--r-- | src/i830_accel.c | 6 | ||||
-rw-r--r-- | src/i830_batchbuffer.h | 4 | ||||
-rw-r--r-- | src/i830_driver.c | 33 | ||||
-rw-r--r-- | src/i830_exa.c | 16 |
6 files changed, 11 insertions, 58 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index d4b9c8ac..c4b9ab01 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_UXA + -DI830_XV intel_drv_la_LTLIBRARIES = intel_drv.la intel_drv_la_LDFLAGS = -module -avoid-version @@ -73,19 +73,15 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "intel_bufmgr.h" #include "i915_drm.h" -#ifdef I830_USE_UXA #include "uxa.h" Bool i830_uxa_init(ScreenPtr pScreen); void i830_uxa_create_screen_resources(ScreenPtr pScreen); void i830_uxa_block_handler (ScreenPtr pScreen); Bool i830_get_aperture_space(ScrnInfoPtr pScrn, drm_intel_bo **bo_table, int num_bos); -#endif -#if defined(I830_USE_UXA) dri_bo *i830_get_pixmap_bo (PixmapPtr pixmap); void i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo *bo); -#endif typedef struct _I830OutputRec I830OutputRec, *I830OutputPtr; @@ -444,14 +440,10 @@ typedef struct _I830Rec { void (*batch_flush_notify)(ScrnInfoPtr pScrn); -#ifdef I830_USE_UXA uxa_driver_t *uxa_driver; Bool need_flush; -#endif Bool need_sync; -#if defined(I830_USE_UXA) PixmapPtr pSrcPixmap; -#endif int accel_pixmap_pitch_alignment; int accel_pixmap_offset_alignment; int accel_max_x; diff --git a/src/i830_accel.c b/src/i830_accel.c index b185ab17..c2f30a8b 100644 --- a/src/i830_accel.c +++ b/src/i830_accel.c @@ -124,9 +124,7 @@ 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_UXA - pI830->uxa_driver = NULL; -#endif + pI830->uxa_driver = NULL; FatalError("lockup\n"); } @@ -283,9 +281,7 @@ I830AccelInit(ScreenPtr pScreen) switch (pI830->accel) { case ACCEL_UXA: -#ifdef I830_USE_UXA return i830_uxa_init(pScreen); -#endif case ACCEL_UNINIT: case ACCEL_NONE: break; diff --git a/src/i830_batchbuffer.h b/src/i830_batchbuffer.h index f16023df..d0114176 100644 --- a/src/i830_batchbuffer.h +++ b/src/i830_batchbuffer.h @@ -100,18 +100,14 @@ intel_batch_emit_reloc_pixmap(I830Ptr pI830, PixmapPtr pPixmap, uint32_t read_domains, uint32_t write_domain, uint32_t delta) { -#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 if (bo) { intel_batch_emit_reloc(pI830, bo, read_domains, write_domain, delta); return; } -#endif offset = intel_get_pixmap_offset(pPixmap); *(uint32_t *)(pI830->batch_ptr + pI830->batch_used) = offset + delta; pI830->batch_used += 4; diff --git a/src/i830_driver.c b/src/i830_driver.c index 5fa76ca5..a044b725 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -840,10 +840,9 @@ i830CreateScreenResources(ScreenPtr pScreen) i830_update_front_offset(pScrn); -#ifdef I830_USE_UXA if (pI830->accel == ACCEL_UXA) i830_uxa_create_screen_resources(pScreen); -#endif + return TRUE; } @@ -2456,10 +2455,8 @@ I830BlockHandler(int i, pI830->need_mi_flush = FALSE; } -#ifdef I830_USE_UXA if (pI830->accel == ACCEL_UXA) i830_uxa_block_handler (pScreen); -#endif I830VideoBlockHandler(i, blockData, pTimeout, pReadmask); } @@ -3328,13 +3325,11 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen) vgaHWUnmapMem(pScrn); } -#ifdef I830_USE_UXA if (pI830->uxa_driver) { uxa_driver_fini (pScreen); xfree (pI830->uxa_driver); pI830->uxa_driver = NULL; } -#endif if (pI830->front_buffer) { i830_set_pixmap_bo(pScreen->GetScreenPixmap(pScreen), NULL); i830_free_memory(pScrn, pI830->front_buffer); @@ -3472,17 +3467,9 @@ i830WaitSync(ScrnInfoPtr pScrn) { I830Ptr pI830 = I830PTR(pScrn); - switch (pI830->accel) { -#ifdef I830_USE_UXA - case ACCEL_UXA: - if (pI830->uxa_driver && pI830->need_sync) { - pI830->need_sync = FALSE; - I830Sync(pScrn); - } - break; -#endif - default: - break; + if (pI830->uxa_driver && pI830->need_sync) { + pI830->need_sync = FALSE; + I830Sync(pScrn); } } @@ -3491,16 +3478,8 @@ i830MarkSync(ScrnInfoPtr pScrn) { I830Ptr pI830 = I830PTR(pScrn); - switch (pI830->accel) { -#ifdef I830_USE_UXA - case ACCEL_UXA: - if (pI830->uxa_driver) - pI830->need_sync = TRUE; - break; -#endif - default: - break; - } + if (pI830->uxa_driver) + pI830->need_sync = TRUE; } void diff --git a/src/i830_exa.c b/src/i830_exa.c index cf393422..3ec36571 100644 --- a/src/i830_exa.c +++ b/src/i830_exa.c @@ -79,9 +79,7 @@ const int I830PatternROP[16] = ROP_1 }; -#ifdef I830_USE_UXA static int uxa_pixmap_index; -#endif /** * Returns whether a given pixmap is tiled or not. @@ -455,13 +453,10 @@ i830_get_pixmap_bo(PixmapPtr pixmap) ScrnInfoPtr scrn = xf86Screens[screen->myNum]; I830Ptr i830 = I830PTR(scrn); -#ifdef I830_USE_UXA - if (i830->accel == ACCEL_UXA) { + if (i830->accel == ACCEL_UXA) return dixLookupPrivate(&pixmap->devPrivates, &uxa_pixmap_index); - } -#endif - - return NULL; + else + return NULL; } void @@ -473,17 +468,13 @@ i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo *bo) if (old_bo) dri_bo_unreference (old_bo); -#if I830_USE_UXA if (i830->accel == ACCEL_UXA) { if (bo != NULL) dri_bo_reference(bo); dixSetPrivate(&pixmap->devPrivates, &uxa_pixmap_index, bo); } -#endif } -#if defined(I830_USE_UXA) - static void i830_uxa_set_pixmap_bo (PixmapPtr pixmap, dri_bo *bo) { @@ -736,4 +727,3 @@ i830_uxa_init (ScreenPtr pScreen) return TRUE; } -#endif /* I830_USE_UXA */ |