summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-05-01 11:51:13 -0700
committerKeith Packard <keithp@keithp.com>2009-05-01 11:55:13 -0700
commit11a853bd8e5d907fe7f5bd907453bcdac9032861 (patch)
tree94de67b77cb8a8d4d3d60edbd5bcc0841da9f8a2
parented492131c13715b73c14d328d0668120acb58b40 (diff)
Hold reference to video binding table until all rects are painted.
The optimization of unreferencing the binding table when the relocation is posted causes the object to be dereferenced for each box in the clip list, causing general chaos in the buffer manager. It's easier to just hold a reference to the object until all of the boxes are painted and then drop it. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--src/i965_video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/i965_video.c b/src/i965_video.c
index a1f577ff..d4590279 100644
--- a/src/i965_video.c
+++ b/src/i965_video.c
@@ -791,7 +791,6 @@ i965_emit_video_setup(ScrnInfoPtr pScrn, drm_intel_bo *bind_bo, int n_src_surf)
OUT_BATCH(0); /* sf */
/* Only the PS uses the binding table */
OUT_RELOC(bind_bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
- drm_intel_bo_unreference(bind_bo);
/* Blend constant color (magenta is fun) */
OUT_BATCH(BRW_3DSTATE_CONSTANT_COLOR | 3);
@@ -1158,6 +1157,9 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
i965_post_draw_debug(pScrn);
}
+ /* release reference once we're finished */
+ drm_intel_bo_unreference(bind_bo);
+
#if WATCH_STATS
i830_dump_error_state(pScrn);
#endif