summaryrefslogtreecommitdiff
path: root/src/intel_uxa.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-03-10 09:10:16 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-03-15 12:43:11 +0000
commitbd8fafe0c48df7f138459f590a0e9e8d0c3267b7 (patch)
tree586b5ddf2c736d146a108d3d692f6814a39425e9 /src/intel_uxa.c
parent64ccc6698def517fc37e9ba3c41715626df0e3ca (diff)
uxa: Kill the complicated in-flight tracking
Reference leak hunting. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_uxa.c')
-rw-r--r--src/intel_uxa.c52
1 files changed, 3 insertions, 49 deletions
diff --git a/src/intel_uxa.c b/src/intel_uxa.c
index ed4f3753..7fb5a965 100644
--- a/src/intel_uxa.c
+++ b/src/intel_uxa.c
@@ -641,16 +641,9 @@ void intel_set_pixmap_bo(PixmapPtr pixmap, dri_bo * bo)
if (priv->bo == bo)
return;
- if (list_is_empty(&priv->batch)) {
- dri_bo_unreference(priv->bo);
- } else if (!drm_intel_bo_is_reusable(priv->bo)) {
- dri_bo_unreference(priv->bo);
- list_del(&priv->batch);
- list_del(&priv->flush);
- } else {
- list_add(&priv->in_flight, &intel->in_flight);
- priv = NULL;
- }
+ dri_bo_unreference(priv->bo);
+ list_del(&priv->batch);
+ list_del(&priv->flush);
if (intel->render_current_dest == pixmap)
intel->render_current_dest = NULL;
@@ -1088,45 +1081,6 @@ intel_uxa_create_pixmap(ScreenPtr screen, int w, int h, int depth,
if (size > intel->max_bo_size || stride >= KB(32))
goto fallback_pixmap;
- /* Perform a preliminary search for an in-flight bo */
- if (usage != UXA_CREATE_PIXMAP_FOR_MAP) {
- int aligned_h;
-
- if (tiling == I915_TILING_X)
- aligned_h = ALIGN(h, 8);
- else if (tiling == I915_TILING_Y)
- aligned_h = ALIGN(h, 32);
- else
- aligned_h = ALIGN(h, 2);
-
- list_for_each_entry(priv, &intel->in_flight, in_flight) {
- if (priv->tiling != tiling)
- continue;
-
- if (tiling == I915_TILING_NONE) {
- if (priv->bo->size < size)
- continue;
-
- priv->stride = stride;
- } else {
- if (priv->stride < stride ||
- priv->bo->size < priv->stride * aligned_h)
- continue;
-
- stride = priv->stride;
- }
-
- list_del(&priv->in_flight);
- intel_set_pixmap_private(pixmap, priv);
-
- screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, stride, NULL);
-
- if (!intel_glamor_create_textured_pixmap(pixmap))
- goto fallback_glamor;
- return pixmap;
- }
- }
-
priv = calloc(1, sizeof (struct intel_pixmap));
if (priv == NULL)
goto fallback_pixmap;