[Intel-gfx] [PATCH] Remove NoAccel support

Keith Packard keithp at keithp.com
Thu Jul 9 03:17:56 CEST 2009


This removes yet another 'debugging' option that hasn't seen real use in a
long time, and wasn't (until today) supported under KMS in any case.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 src/drmmode_display.c |   74 +++++++++++--------------
 src/i830.h            |   15 +----
 src/i830_accel.c      |   11 +---
 src/i830_dri.c        |    5 --
 src/i830_driver.c     |  144 +++++++++---------------------------------------
 src/i830_memory.c     |    8 ++--
 src/i830_uxa.c        |   27 +++-------
 7 files changed, 75 insertions(+), 209 deletions(-)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 6681e7e..2089034 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -329,8 +329,6 @@ drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
 		return NULL;
 	}
 
-	drm_intel_gem_bo_map_gtt(drmmode_crtc->rotate_bo);
-
 	ret = drmModeAddFB(drmmode->fd, width, height, crtc->scrn->depth,
 			   crtc->scrn->bitsPerPixel, rotate_pitch,
 			   drmmode_crtc->rotate_bo->handle,
@@ -341,7 +339,29 @@ drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
 		return NULL;
 	}
 
-	return drmmode_crtc->rotate_bo->virtual;
+	return drmmode_crtc->rotate_bo;
+}
+
+static void
+drmmode_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
+{
+	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+	drmmode_ptr drmmode = drmmode_crtc->drmmode;
+
+	if (rotate_pixmap) {
+		i830_set_pixmap_bo(rotate_pixmap, NULL);
+		FreeScratchPixmapHeader(rotate_pixmap);
+	}
+
+
+	if (data) {
+		/* Be sure to sync acceleration before the memory gets
+		 * unbound. */
+		drmModeRmFB(drmmode->fd, drmmode_crtc->rotate_fb_id);
+		drmmode_crtc->rotate_fb_id = 0;
+		dri_bo_unreference(drmmode_crtc->rotate_bo);
+		drmmode_crtc->rotate_bo = NULL;
+	}
 }
 
 static PixmapPtr
@@ -353,8 +373,11 @@ drmmode_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
 	unsigned long rotate_pitch;
 	PixmapPtr rotate_pixmap;
 
-	if (!data)
+	if (!data) {
 		data = drmmode_crtc_shadow_allocate (crtc, width, height);
+		if (!data)
+			return NULL;
+	}
 
 	rotate_pitch =
 		i830_pad_drawable_width(width, drmmode->cpp) * drmmode->cpp;
@@ -363,43 +386,21 @@ drmmode_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
 					       pScrn->depth,
 					       pScrn->bitsPerPixel,
 					       rotate_pitch,
-					       data);
+					       NULL);
 
 	if (rotate_pixmap == NULL) {
 		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 			   "Couldn't allocate shadow pixmap for rotated CRTC\n");
+		drmmode_crtc_shadow_destroy(crtc, rotate_pixmap, data);
+		return NULL;
 	}
 
-	if (drmmode_crtc->rotate_bo)
-		i830_set_pixmap_bo(rotate_pixmap, drmmode_crtc->rotate_bo);
+	i830_set_pixmap_bo(rotate_pixmap, drmmode_crtc->rotate_bo);
 
 	return rotate_pixmap;
 }
 
 static void
-drmmode_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
-{
-	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
-	drmmode_ptr drmmode = drmmode_crtc->drmmode;
-
-	if (rotate_pixmap) {
-		i830_set_pixmap_bo(rotate_pixmap, NULL);
-		FreeScratchPixmapHeader(rotate_pixmap);
-	}
-
-
-	if (data) {
-		/* Be sure to sync acceleration before the memory gets
-		 * unbound. */
-		drmModeRmFB(drmmode->fd, drmmode_crtc->rotate_fb_id);
-		drmmode_crtc->rotate_fb_id = 0;
-		drm_intel_gem_bo_unmap_gtt(drmmode_crtc->rotate_bo);
-		dri_bo_unreference(drmmode_crtc->rotate_bo);
-		drmmode_crtc->rotate_bo = NULL;
-	}
-}
-
-static void
 drmmode_crtc_gamma_set(xf86CrtcPtr crtc,
 		       CARD16 *red, CARD16 *green, CARD16 *blue, int size)
 {
@@ -1021,7 +1022,6 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 	ScreenPtr   screen = screenInfo.screens[scrn->scrnIndex];
 	uint32_t    old_fb_id;
 	int	    i, pitch, old_width, old_height, old_pitch;
-	pointer	    *data;
 
 	if (scrn->virtualX == width && scrn->virtualY == height)
 		return TRUE;
@@ -1053,21 +1053,11 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 		goto fail;
 
 	i830_set_pixmap_bo(screen->GetScreenPixmap(screen), pI830->front_buffer->bo);
-	if (pI830->accel == ACCEL_UXA)
-		data = NULL;
-	else {
-		drm_intel_gem_bo_map_gtt(pI830->front_buffer->bo);
-		data = pI830->front_buffer->bo->virtual;
-	}
 
 	screen->ModifyPixmapHeader(screen->GetScreenPixmap(screen),
 				   width, height, -1, -1, pitch * pI830->cpp,
-				   data);
+				   NULL);
 
-	/* ick. xf86EnableDisableFBAccess smashes the screen pixmap devPrivate,
-	 * so update the value it uses
-	 */
-	scrn->pixmapPrivate.ptr = data;
 	xf86DrvMsg(scrn->scrnIndex, X_INFO, "New front buffer at 0x%lx\n",
 		   pI830->front_buffer->offset);
 
diff --git a/src/i830.h b/src/i830.h
index dc5e0c8..f7ca687 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -317,12 +317,6 @@ enum backlight_control {
     BCM_KERNEL,
 };
 
-typedef enum accel_method {
-    ACCEL_UNINIT = 0,
-    ACCEL_NONE,
-    ACCEL_UXA
-} accel_method_t;
-
 enum dri_type {
     DRI_DISABLED,
     DRI_NONE,
@@ -431,7 +425,6 @@ typedef struct _I830Rec {
 
    Bool fence_used[FENCE_NEW_NR];
 
-   accel_method_t accel;
    CloseScreenProcPtr CloseScreen;
 
    void (*batch_flush_notify)(ScrnInfoPtr pScrn);
@@ -827,8 +820,7 @@ i830_wait_ring_idle(ScrnInfoPtr pScrn)
 {
    I830Ptr pI830 = I830PTR(pScrn);
 
-   if (pI830->accel != ACCEL_NONE)
-       I830WaitLpRing(pScrn, pI830->ring.mem->size - 8, 0);
+   I830WaitLpRing(pScrn, pI830->ring.mem->size - 8, 0);
 }
 
 static inline int i830_fb_compression_supported(I830Ptr pI830)
@@ -841,10 +833,9 @@ static inline int i830_fb_compression_supported(I830Ptr pI830)
 	return FALSE;
     if (IS_IGDNG(pI830))
 	return FALSE;
-    /* fbc depends on tiled surface. And we don't support tiled
-     * front buffer with unaccelerated.
+    /* fbc depends on tiled surface.
      */
-    if (!pI830->tiling || (IS_I965G(pI830) && pI830->accel == ACCEL_NONE))
+    if (!pI830->tiling)
 	return FALSE;
     /* We have not gotten FBC to work consistently on 965GM. Our best
      * working theory right now is that FBC simply isn't reliable on
diff --git a/src/i830_accel.c b/src/i830_accel.c
index b365e3f..96a7bde 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -136,7 +136,7 @@ I830Sync(ScrnInfoPtr pScrn)
    if (I810_DEBUG & (DEBUG_VERBOSE_ACCEL | DEBUG_VERBOSE_SYNC))
       ErrorF("I830Sync\n");
 
-   if (pI830->accel == ACCEL_NONE || !pScrn->vtSema || !pI830->batch_bo)
+   if (!pScrn->vtSema || !pI830->batch_bo)
        return;
 
    I830EmitFlush(pScrn);
@@ -236,12 +236,5 @@ I830AccelInit(ScreenPtr pScreen)
     if (pI830->directRenderingType >= DRI_DRI2)
 	pI830->accel_pixmap_pitch_alignment = 512;
 
-    switch (pI830->accel) {
-    case ACCEL_UXA:
-	return i830_uxa_init(pScreen);
-    case ACCEL_UNINIT:
-    case ACCEL_NONE:
-	break;
-    }
-    return FALSE;
+    return i830_uxa_init(pScreen);
 }
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 240c519..40d11e4 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -373,11 +373,6 @@ Bool I830DRI2ScreenInit(ScreenPtr pScreen)
     int dri2_minor = 0;
 #endif
 
-    if (pI830->accel != ACCEL_UXA) {
-	xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "DRI2 requires UXA\n");
-	return FALSE;
-    }
-
 #ifdef USE_DRI2_1_1_0
     if (xf86LoaderCheckSymbol("DRI2Version")) {
 	DRI2Version(& dri2_major, & dri2_minor);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 7c6e11f..6faefac 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -598,49 +598,6 @@ I830LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
    }
 }
 
-static void
-i830_update_front_offset(ScrnInfoPtr pScrn)
-{
-   ScreenPtr pScreen = pScrn->pScreen;
-   I830Ptr pI830 = I830PTR(pScrn);
-   int pitch = pScrn->displayWidth * pI830->cpp;
-   pointer data = NULL;
-
-   /* Update buffer locations, which may have changed as a result of
-    * i830_bind_all_memory().
-    */
-   pScrn->fbOffset = pI830->front_buffer->offset;
-
-   if (pI830->starting || pI830->accel == ACCEL_UXA)
-       return;
-
-   /* If we are still in ScreenInit, there is no screen pixmap to be updated
-    * yet.  We'll fix it up at CreateScreenResources.
-    */
-   if (!pI830->have_gem) {
-       data = pI830->FbBase + pScrn->fbOffset; /* default to legacy */
-   } else {
-      dri_bo *bo = pI830->front_buffer->bo;
-
-      if (bo) {
-	  if (pI830->kernel_exec_fencing) {
-	      if (drm_intel_gem_bo_map_gtt(bo))
-		  xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "%s: bo map failed\n",
-			     __FUNCTION__);
-	      data = bo->virtual;
-	  } else {
-	      /* Will already be pinned by bind_all_memory in this case */
-	      drm_intel_gem_bo_start_gtt_access(bo, 1);
-	      data = pI830->FbBase + bo->offset;
-	  }
-      }
-   }
-   if (!pScreen->ModifyPixmapHeader(pScreen->GetScreenPixmap(pScreen),
-				       pScrn->virtualX, pScrn->virtualY, -1, -1,
-				       pitch, data))
-       FatalError("Couldn't adjust screen pixmap\n");
-}
-
 /**
  * Adjust the screen pixmap for the current location of the front buffer.
  * This is done at EnterVT when buffers are bound as long as the resources
@@ -657,10 +614,7 @@ i830CreateScreenResources(ScreenPtr pScreen)
    if (!(*pScreen->CreateScreenResources)(pScreen))
       return FALSE;
 
-   i830_update_front_offset(pScrn);
-
-   if (pI830->accel == ACCEL_UXA)
-      i830_uxa_create_screen_resources(pScreen);
+   i830_uxa_create_screen_resources(pScreen);
 
    return TRUE;
 }
@@ -1262,13 +1216,6 @@ i830_detect_chipset(ScrnInfoPtr pScrn)
     return TRUE;
 }
 
-static const char *accel_name[] = 
-{
-   "unspecified",
-   "no",
-   "UXA",
-};
-
 static Bool
 I830LoadSyms(ScrnInfoPtr pScrn)
 {
@@ -1352,29 +1299,15 @@ I830PreInitCrtcConfig(ScrnInfoPtr pScrn)
 }
 
 static void
-I830AccelMethodSelect(ScrnInfoPtr pScrn)
+I830CheckDriOption(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
-    MessageType from = X_PROBED;
-
-    if (xf86ReturnOptValBool(pI830->Options, OPTION_NOACCEL, FALSE)) {
-	pI830->accel = ACCEL_NONE;
-	xf86DrvMsg(pScrn->scrnIndex, from, "Acceleration disabled\n");
-    } else {
-       pI830->accel = ACCEL_UXA;
-	xf86DrvMsg(pScrn->scrnIndex, from, "Using %s for acceleration\n",
-		   accel_name[pI830->accel]);
-    }
 
     pI830->directRenderingType = DRI_NONE;
     if (!xf86ReturnOptValBool(pI830->Options, OPTION_DRI, TRUE))
 	pI830->directRenderingType = DRI_DISABLED;
 
-    if (pI830->accel == ACCEL_NONE) {
-	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "DRI is disabled because it "
-		"needs 2D acceleration.\n");
-	pI830->directRenderingType = DRI_DISABLED;
-    } else if (pScrn->depth != 16 && pScrn->depth != 24) {
+    if (pScrn->depth != 16 && pScrn->depth != 24) {
 	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "DRI is disabled because it "
 		"runs only at depths 16 and 24.\n");
 	pI830->directRenderingType = DRI_DISABLED;
@@ -1387,8 +1320,6 @@ I830AccelMethodInit(ScrnInfoPtr pScrn)
     I830Ptr pI830 = I830PTR(pScrn);
     int i, num_pipe;
 
-    I830AccelMethodSelect(pScrn);
-
     I830MapMMIO(pScrn);
 
     if (pI830->debug_modes) {
@@ -1507,8 +1438,6 @@ I830DrmModeInit(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
 
-    pI830->accel = ACCEL_UXA;
-
     if (drmmode_pre_init(pScrn, pI830->drmSubFD, pI830->cpp) == FALSE) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		   "Kernel modesetting setup failed\n");
@@ -1661,10 +1590,11 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
    if (!i830_detect_chipset(pScrn))
        return FALSE;
 
+   I830CheckDriOption(pScrn);
+
    if (pI830->use_drm_mode) {
        if (!I830DrmModeInit(pScrn))
 	   return FALSE;
-       I830AccelMethodSelect(pScrn);
    } else {
        if (i830_bios_init(pScrn))
 	   xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
@@ -1734,18 +1664,16 @@ i830_stop_ring(ScrnInfoPtr pScrn, Bool flush)
    DPRINTF(PFX, "ResetState: flush is %s\n", BOOLTOSTRING(flush));
 
    /* Flush the ring buffer (if enabled), then disable it. */
-   if (pI830->accel != ACCEL_NONE) {
-      temp = INREG(LP_RING + RING_LEN);
-      if (temp & RING_VALID) {
-	 i830_refresh_ring(pScrn);
-	 i830_wait_ring_idle(pScrn);
-      }
-
-      OUTREG(LP_RING + RING_LEN, 0);
-      OUTREG(LP_RING + RING_HEAD, 0);
-      OUTREG(LP_RING + RING_TAIL, 0);
-      OUTREG(LP_RING + RING_START, 0);
+   temp = INREG(LP_RING + RING_LEN);
+   if (temp & RING_VALID) {
+      i830_refresh_ring(pScrn);
+      i830_wait_ring_idle(pScrn);
    }
+
+   OUTREG(LP_RING + RING_LEN, 0);
+   OUTREG(LP_RING + RING_HEAD, 0);
+   OUTREG(LP_RING + RING_TAIL, 0);
+   OUTREG(LP_RING + RING_START, 0);
 }
 
 static void
@@ -1756,9 +1684,6 @@ i830_start_ring(ScrnInfoPtr pScrn)
 
    DPRINTF(PFX, "SetRingRegs\n");
 
-   if (pI830->accel == ACCEL_NONE)
-      return;
-
    OUTREG(LP_RING + RING_LEN, 0);
    OUTREG(LP_RING + RING_TAIL, 0);
    OUTREG(LP_RING + RING_HEAD, 0);
@@ -2255,9 +2180,6 @@ IntelEmitInvarientState(ScrnInfoPtr pScrn)
 {
    I830Ptr pI830 = I830PTR(pScrn);
 
-   if (pI830->accel == ACCEL_NONE)
-      return;
-
    /* If we've emitted our state since the last clobber by another client,
     * skip it.
     */
@@ -2288,13 +2210,13 @@ I830BlockHandler(int i,
     pI830->BlockHandler = pScreen->BlockHandler;
     pScreen->BlockHandler = I830BlockHandler;
 
-    if (pScrn->vtSema && pI830->accel != ACCEL_NONE) {
+    if (pScrn->vtSema) {
        Bool flushed = FALSE;
        /* Emit a flush of the rendering cache, or on the 965 and beyond
 	* rendering results may not hit the framebuffer until significantly
 	* later.
 	*/
-       if (pI830->accel != ACCEL_NONE && (pI830->need_mi_flush || pI830->batch_used))
+       if (pI830->need_mi_flush || pI830->batch_used)
        {
 	  flushed = TRUE;
 	  I830EmitFlush(pScrn);
@@ -2310,8 +2232,7 @@ I830BlockHandler(int i,
        pI830->need_mi_flush = FALSE;
     }
 
-    if (pI830->accel == ACCEL_UXA)
-	i830_uxa_block_handler (pScreen);
+    i830_uxa_block_handler (pScreen);
 
     I830VideoBlockHandler(i, blockData, pTimeout, pReadmask);
 }
@@ -2780,18 +2701,11 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    if (!miSetPixmapDepths())
       return FALSE;
 
-   if (pI830->accel == ACCEL_NONE) {
-      xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Xv is disabled because it "
-		 "needs 2D acceleration.\n");
-      pI830->XvEnabled = FALSE;
-   }
-
-   if (pI830->accel != ACCEL_NONE && !pI830->use_drm_mode) {
+   if (!pI830->use_drm_mode) {
       if (!pI830->have_gem && pI830->ring.mem->size == 0) {
-	  xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-		     "Disabling acceleration because the ring buffer "
-		      "allocation failed.\n");
-	   pI830->accel = ACCEL_NONE;
+	 xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		    "Ring buffer allocation failed.\n");
+	 return FALSE;
       }
    }
 
@@ -2838,11 +2752,10 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 
    xf86DiDGAInit (pScreen, pI830->LinearAddr + pScrn->fbOffset);
 
-   if (pI830->accel != ACCEL_NONE) {
-      if (!I830AccelInit(pScreen)) {
-	 xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-		    "Hardware acceleration initialization failed\n");
-      }
+   if (!I830AccelInit(pScreen)) {
+      xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+		 "Hardware acceleration initialization failed\n");
+      return FALSE;
    }
 
    if (IS_I965G(pI830))
@@ -3037,7 +2950,7 @@ I830LeaveVT(int scrnIndex, int flags)
 	 FatalError("DRM_I915_LEAVEVT failed: %s\n", strerror(ret));
    }
 
-   if (pI830->accel == ACCEL_UXA && IS_I965G(pI830))
+   if (IS_I965G(pI830))
       gen4_render_state_cleanup(pScrn);
 
    ret = drmDropMaster(pI830->drmSubFD);
@@ -3122,12 +3035,9 @@ I830EnterVT(int scrnIndex, int flags)
 
    i830_describe_allocations(pScrn, 1, "");
 
-   /* Update the screen pixmap in case the buffer moved */
-   i830_update_front_offset(pScrn);
-
    intel_batch_init(pScrn);
 
-   if (pI830->accel == ACCEL_UXA && IS_I965G(pI830))
+   if (IS_I965G(pI830))
       gen4_render_state_init(pScrn);
 
    if (!pI830->use_drm_mode) {
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 2393689..1fc1319 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -202,9 +202,9 @@ i830_bind_memory(ScrnInfoPtr pScrn, i830_memory *mem)
     if (mem == NULL || mem->bound)
 	return TRUE;
 
+    if (pI830->use_drm_mode)
+        return TRUE;
     if (pI830->have_gem && mem->bo != NULL) {
-	if (pI830->use_drm_mode && pI830->accel != ACCEL_NONE)
-	    return TRUE;
 
 	if (dri_bo_pin(mem->bo, mem->alignment) != 0) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -413,7 +413,7 @@ i830_allocator_init(ScrnInfoPtr pScrn, unsigned long size)
      * being held after DRIScreenInit, rather than after DRIFinishScreenInit.
      */
 
-    if (pI830->accel == ACCEL_UXA && !pI830->use_drm_mode) {
+    if (!pI830->use_drm_mode) {
 	int mmsize;
 
 	/* Take over all of the graphics aperture minus enough to for
@@ -960,7 +960,7 @@ i830_allocate_ringbuffer(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
 
-    if (pI830->accel == ACCEL_NONE || pI830->have_gem || pI830->ring.mem != NULL)
+    if (pI830->have_gem || pI830->ring.mem != NULL)
 	return TRUE;
 
     /* We don't have any mechanism in the DRM yet to alert it that we've moved
diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index ef7ac84..75142ed 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -452,30 +452,19 @@ i830_transform_is_affine (PictTransformPtr t)
 dri_bo *
 i830_get_pixmap_bo(PixmapPtr pixmap)
 {
-    ScreenPtr screen = pixmap->drawable.pScreen;
-    ScrnInfoPtr scrn = xf86Screens[screen->myNum];
-    I830Ptr i830 = I830PTR(scrn);
-
-    if (i830->accel == ACCEL_UXA)
-	return dixLookupPrivate(&pixmap->devPrivates, &uxa_pixmap_index);
-    else
-	return NULL;
+    return dixLookupPrivate(&pixmap->devPrivates, &uxa_pixmap_index);
 }
 
 void
 i830_set_pixmap_bo(PixmapPtr pixmap, dri_bo *bo)
 {
-    ScrnInfoPtr pScrn = xf86Screens[pixmap->drawable.pScreen->myNum];
-    I830Ptr i830 = I830PTR(pScrn);
     dri_bo  *old_bo = i830_get_pixmap_bo (pixmap);
 
     if (old_bo)
 	dri_bo_unreference (old_bo);
-    if (i830->accel == ACCEL_UXA) {
-	if (bo != NULL)
-	    dri_bo_reference(bo);
-	dixSetPrivate(&pixmap->devPrivates, &uxa_pixmap_index, bo);
-    }
+    if (bo != NULL)
+	dri_bo_reference(bo);
+    dixSetPrivate(&pixmap->devPrivates, &uxa_pixmap_index, bo);
 }
 
 static void
@@ -698,10 +687,9 @@ i830_uxa_init (ScreenPtr pScreen)
 	return FALSE;
 
     i830->uxa_driver = uxa_driver_alloc();
-    if (i830->uxa_driver == NULL) {
-	i830->accel = ACCEL_NONE;
+    if (i830->uxa_driver == NULL)
 	return FALSE;
-    }
+
     memset(i830->uxa_driver, 0, sizeof(*i830->uxa_driver));
 
     i830->bufferOffset = 0;
@@ -743,10 +731,9 @@ i830_uxa_init (ScreenPtr pScreen)
     i830->uxa_driver->pixmap_is_offscreen = i830_uxa_pixmap_is_offscreen;
 
     if(!uxa_driver_init(pScreen, i830->uxa_driver)) {
-	xf86DrvMsg(scrn->scrnIndex, X_INFO,
+	xf86DrvMsg(scrn->scrnIndex, X_ERROR,
 		   "UXA initialization failed\n");
 	xfree(i830->uxa_driver);
-	i830->accel = ACCEL_NONE;
 	return FALSE;
     }
 
-- 
1.6.3.3




More information about the Intel-gfx mailing list