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:51:13 -0700
commitabe80eadbed67b7c67b12183a2d552cee9d5cc50 (patch)
tree570f4e874b66bbbe108f407940ebe1eaf97ea919
parent983a5276fc2fdcd91f48b1e768e1740679f392da (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