[Intel-gfx] [PATCH 17/18] XvMC: kill the pinned batchbuffer in the ddx code

Daniel Vetter daniel.vetter at ffwll.ch
Tue Mar 2 21:53:27 CET 2010


It's been unused for quite a while.

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 src/i830_hwmc.c |   36 ------------------------------------
 src/i830_hwmc.h |    8 --------
 src/i915_hwmc.c |    8 --------
 src/i965_hwmc.c |    1 -
 4 files changed, 0 insertions(+), 53 deletions(-)

diff --git a/src/i830_hwmc.c b/src/i830_hwmc.c
index e60bbb2..3533426 100644
--- a/src/i830_hwmc.c
+++ b/src/i830_hwmc.c
@@ -139,39 +139,3 @@ Bool intel_xvmc_screen_init(ScreenPtr pScreen)
 			       INTEL_XVMC_PATCHLEVEL);
 	return TRUE;
 }
-
-Bool intel_xvmc_init_batch(ScrnInfoPtr scrn)
-{
-	intel_screen_private *intel = intel_get_screen_private(scrn);
-	int size = KB(64);
-
-	if (!i830_allocate_xvmc_buffer(scrn, "[XvMC] batch buffer",
-				       &(xvmc_driver->batch), size,
-				       0))
-		return FALSE;
-
-	if (drmAddMap(intel->drmSubFD,
-		      (drm_handle_t) (xvmc_driver->batch->bo->offset +
-				      intel->LinearAddr),
-		      xvmc_driver->batch->bo->size, DRM_AGP, 0,
-		      &xvmc_driver->batch_handle) < 0) {
-		xf86DrvMsg(scrn->scrnIndex, X_ERROR,
-			   "[drm] drmAddMap(batchbuffer_handle) failed!\n");
-		return FALSE;
-	}
-	return TRUE;
-}
-
-void intel_xvmc_fini_batch(ScrnInfoPtr scrn)
-{
-	intel_screen_private *intel = intel_get_screen_private(scrn);
-
-	if (xvmc_driver->batch_handle) {
-		drmRmMap(intel->drmSubFD, xvmc_driver->batch_handle);
-		xvmc_driver->batch_handle = 0;
-	}
-	if (xvmc_driver->batch) {
-		i830_free_xvmc_buffer(scrn, xvmc_driver->batch);
-		xvmc_driver->batch = NULL;
-	}
-}
diff --git a/src/i830_hwmc.h b/src/i830_hwmc.h
index 0b512b4..fcb54d4 100644
--- a/src/i830_hwmc.h
+++ b/src/i830_hwmc.h
@@ -64,8 +64,6 @@ struct hwmc_buffer {
 
 struct _intel_xvmc_common {
 	unsigned int type;
-	struct hwmc_buffer batchbuffer;
-	unsigned int kernel_exec_fencing:1;
 };
 
 /* Intel private XvMC command to DDX driver */
@@ -87,9 +85,6 @@ struct intel_xvmc_driver {
 	char *name;
 	XF86MCAdaptorPtr adaptor;
 	unsigned int flag;
-	i830_memory *batch;
-	drm_handle_t batch_handle;
-
 	/* more items for xvmv surface manage? */
 	 Bool(*init) (ScrnInfoPtr, XF86VideoAdaptorPtr);
 	void (*fini) (ScrnInfoPtr);
@@ -105,9 +100,6 @@ extern Bool intel_xvmc_probe(ScrnInfoPtr);
 extern Bool intel_xvmc_driver_init(ScreenPtr, XF86VideoAdaptorPtr);
 extern Bool intel_xvmc_screen_init(ScreenPtr);
 extern void intel_xvmc_finish(ScrnInfoPtr);
-extern int intel_xvmc_put_image_size(ScrnInfoPtr);
-extern Bool intel_xvmc_init_batch(ScrnInfoPtr);
-extern void intel_xvmc_fini_batch(ScrnInfoPtr);
 #endif
 
 #endif
diff --git a/src/i915_hwmc.c b/src/i915_hwmc.c
index 6943a07..3097e92 100644
--- a/src/i915_hwmc.c
+++ b/src/i915_hwmc.c
@@ -284,13 +284,6 @@ static Bool i915_xvmc_init(ScrnInfoPtr scrn, XF86VideoAdaptorPtr XvAdapt)
 		return FALSE;
 	}
 	xvmc_driver->devPrivate = (void *)pXvMC;
-	if (!intel_xvmc_init_batch(scrn)) {
-		xf86DrvMsg(scrn->scrnIndex, X_WARNING,
-			   "[XvMC] fail to init batch buffer\n");
-		xfree(pXvMC);
-		return FALSE;
-	}
-
 	/* set up wrappers */
 	pXvMC->savePutImage = XvAdapt->PutImage;
 	XvAdapt->PutImage = i915_xvmc_put_image;
@@ -299,7 +292,6 @@ static Bool i915_xvmc_init(ScrnInfoPtr scrn, XF86VideoAdaptorPtr XvAdapt)
 
 static void i915_xvmc_fini(ScrnInfoPtr scrn)
 {
-	intel_xvmc_fini_batch(scrn);
 	xfree(xvmc_driver->devPrivate);
 }
 
diff --git a/src/i965_hwmc.c b/src/i965_hwmc.c
index 1a5d4de..682107a 100644
--- a/src/i965_hwmc.c
+++ b/src/i965_hwmc.c
@@ -72,7 +72,6 @@ static int create_context(ScrnInfoPtr scrn,
 	private_context->is_g4x = IS_G4X(intel);
 	private_context->is_965_q = IS_965_Q(intel);
 	private_context->is_igdng = IS_IGDNG(intel);
-	private_context->comm.kernel_exec_fencing = 1;
 	private_context->comm.type = xvmc_driver->flag;
 
 	*num_privates = sizeof(*private_context) / sizeof(CARD32);
-- 
1.6.6.1




More information about the Intel-gfx mailing list