[Intel-gfx] [PATCH 09/14] Remove I830_XV ifdef.

Eric Anholt eric at anholt.net
Wed Apr 22 01:13:31 CEST 2009


The developers of the driver don't ever run or test without XV.  Don't do it.
---
 src/Makefile.am   |    3 +--
 src/i830.h        |    6 ------
 src/i830_driver.c |   13 -------------
 src/i830_memory.c |    4 ----
 4 files changed, 1 insertions(+), 25 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index c4b9ab0..221b669 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,8 +31,7 @@ SUBDIRS = xvmc bios_reader ch7017 ch7xxx ivch sil164 tfp410 $(REGDUMPER)
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
 
 AM_CFLAGS = @WARN_CFLAGS@ @XORG_CFLAGS@ @DRM_CFLAGS@ @DRI_CFLAGS@ \
-	@PCIACCESS_CFLAGS@ -I$(top_srcdir)/uxa \
-	-DI830_XV
+	@PCIACCESS_CFLAGS@ -I$(top_srcdir)/uxa
 
 intel_drv_la_LTLIBRARIES = intel_drv.la
 intel_drv_la_LDFLAGS = -module -avoid-version
diff --git a/src/i830.h b/src/i830.h
index 38cdb77..cdd2c3d 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -390,10 +390,8 @@ typedef struct _I830Rec {
    /** Ending batch_used that was verified by i830_start_batch_atomic() */
    int batch_atomic_limit;
 
-#ifdef I830_XV
    /* For Xvideo */
    i830_memory *overlay_regs;
-#endif
 #ifdef INTEL_XVMC
    /* For XvMC */
    Bool XvMCEnabled;
@@ -454,7 +452,6 @@ typedef struct _I830Rec {
    Bool XvEnabled;			/* Xv enabled for this generation. */
    Bool XvPreferOverlay;
 
-#ifdef I830_XV
    int colorKey;
    XF86VideoAdaptorPtr adaptor;
    ScreenBlockHandlerProcPtr BlockHandler;
@@ -470,7 +467,6 @@ typedef struct _I830Rec {
       drm_intel_bo *gen4_sampler_bo;
       drm_intel_bo *gen4_sip_kernel_bo;
    } video;
-#endif
 
    /* Render accel state */
    float scale_units[2][2];
@@ -670,10 +666,8 @@ i830_crtc_set_cursor_colors (xf86CrtcPtr crtc, int bg, int fg);
 extern void i830_refresh_ring(ScrnInfoPtr pScrn);
 extern void I830EmitFlush(ScrnInfoPtr pScrn);
 
-#ifdef I830_XV
 extern void I830InitVideo(ScreenPtr pScreen);
 extern void i830_crtc_dpms_video(xf86CrtcPtr crtc, Bool on);
-#endif
 
 int
 i830_crtc_pipe (xf86CrtcPtr crtc);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index ec8f036..16dbed0 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1667,7 +1667,6 @@ I830XvInit(ScrnInfoPtr pScrn)
 
    pI830->XvPreferOverlay = xf86ReturnOptValBool(pI830->Options, OPTION_PREFER_OVERLAY, FALSE);
 
-#ifdef I830_XV
     if (xf86GetOptValInteger(pI830->Options, OPTION_VIDEO_KEY,
 			     &(pI830->colorKey))) {
 	from = X_CONFIG;
@@ -1683,7 +1682,6 @@ I830XvInit(ScrnInfoPtr pScrn)
     }
     xf86DrvMsg(pScrn->scrnIndex, from, "video overlay key set to 0x%x\n",
 	       pI830->colorKey);
-#endif
 }
 
 /**
@@ -2824,14 +2822,11 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    pI830->last_3d = LAST_3D_OTHER;
    pI830->overlayOn = FALSE;
 
-#ifdef I830_XV
     /*
      * Set this so that the overlay allocation is factored in when
      * appropriate.
      */
     pI830->XvEnabled = TRUE;
-#endif
-
 
    /* Need MMIO mapped to do GTT lookups during memory allocation. */
    if (!pI830->use_drm_mode)
@@ -2857,15 +2852,11 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    if (!miSetPixmapDepths())
       return FALSE;
 
-#ifdef I830_XV
    if (pI830->accel == ACCEL_NONE) {
       xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Xv is disabled because it "
 		 "needs 2D acceleration.\n");
       pI830->XvEnabled = FALSE;
    }
-#else
-   pI830->XvEnabled = FALSE;
-#endif
 
    if (pI830->accel != ACCEL_NONE && !pI830->use_drm_mode) {
       if (pI830->memory_manager == NULL && pI830->ring.mem->size == 0) {
@@ -2986,7 +2977,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 
    xf86DPMSInit(pScreen, xf86DPMSSet, 0);
 
-#ifdef I830_XV
 #ifdef INTEL_XVMC
     pI830->XvMCEnabled = FALSE;
     from =  xf86GetOptValBool(pI830->Options, OPTION_XVMC,
@@ -2997,7 +2987,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    /* Init video */
    if (pI830->XvEnabled)
       I830InitVideo(pScreen);
-#endif
 
    /* Setup 3D engine, needed for rotation too */
    IntelEmitInvarientState(pScrn);
@@ -3320,9 +3309,7 @@ I830CloseScreen(int scrnIndex, ScreenPtr pScreen)
 
    i830_allocator_fini(pScrn);
 
-#ifdef I830_XV
    i965_free_video(pScrn);
-#endif
 
    dri_bufmgr_destroy(pI830->bufmgr);
    pI830->bufmgr = NULL;
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 0cb9e0d..ec95baa 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -999,7 +999,6 @@ i830_allocate_ringbuffer(ScrnInfoPtr pScrn)
     return TRUE;
 }
 
-#ifdef I830_XV
 /**
  * Allocate space for overlay registers.
  */
@@ -1037,7 +1036,6 @@ i830_allocate_overlay(ScrnInfoPtr pScrn)
 
     return TRUE;
 }
-#endif
 
 static Bool
 IsTileable(ScrnInfoPtr pScrn, int pitch)
@@ -1311,10 +1309,8 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
 	}
     }
 
-#ifdef I830_XV
     if (!pI830->use_drm_mode)
 	i830_allocate_overlay(pScrn);
-#endif
 
     pI830->front_buffer = i830_allocate_framebuffer(pScrn);
     if (pI830->front_buffer == NULL)
-- 
1.6.2.2




More information about the Intel-gfx mailing list