[Intel-gfx] [PATCH] XvMC: hook up bo passthrough for i915 class hw

Daniel Vetter daniel.vetter at ffwll.ch
Wed Dec 2 12:28:52 CET 2009


-	/* drop the newly displaying buffer right away */
 	drm_intel_bo_disable_reuse(adaptor_priv->buf);
-	drm_intel_bo_unreference(adaptor_priv->buf);
+	if (adaptor_priv->old_buf2)
+		drm_intel_bo_unreference(adaptor_priv->old_buf2);
+
+	adaptor_priv->old_buf2 = adaptor_priv->old_buf;
+	adaptor_priv->old_buf = adaptor_priv->buf;
 	adaptor_priv->buf = NULL;
 
 	if (ret != 0) {
diff --git a/src/i830_video.h b/src/i830_video.h
index a2beae0..69887a5 100644
--- a/src/i830_video.h
+++ b/src/i830_video.h
@@ -52,6 +52,8 @@ typedef struct {
 	Time freeTime;
 	/** YUV data buffers */
 	drm_intel_bo *buf;
+	drm_intel_bo *old_buf;
+	drm_intel_bo *old_buf2;
 
 	Bool textured;
 	Rotation rotation;	/* should remove intel->rotation later */



More information about the Intel-gfx mailing list