From 86c367be517e992aabc1bcfea2a2dde1a1ae520c Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Fri, 25 Sep 2009 13:03:44 -0400 Subject: r600: fix bo accounting for Xv fixes Xv after changes in: 8f80e37eed3ec028718b4e71bbb9b598847fd94e Signed-off-by: Alex Deucher --- src/r600_textured_videofuncs.c | 10 ++++++++++ src/radeon_textured_video.c | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/r600_textured_videofuncs.c b/src/r600_textured_videofuncs.c index b6f7b399..c9df2840 100644 --- a/src/r600_textured_videofuncs.c +++ b/src/r600_textured_videofuncs.c @@ -227,6 +227,16 @@ R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) accel_state->src_bo[0] = pPriv->src_bo; accel_state->src_bo[1] = NULL; accel_state->dst_bo = radeon_get_pixmap_bo(pPixmap); + + radeon_cs_space_reset_bos(info->cs); + radeon_cs_space_add_persistent_bo(info->cs, accel_state->shaders_bo, + RADEON_GEM_DOMAIN_VRAM, 0); + radeon_cs_space_add_persistent_bo(info->cs, accel_state->src_bo[0], + RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); + radeon_cs_space_add_persistent_bo(info->cs, accel_state->dst_bo, + RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); + if (radeon_cs_space_check(info->cs)) + return; } else #endif { diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c index 932759bb..b708f52f 100644 --- a/src/radeon_textured_video.c +++ b/src/radeon_textured_video.c @@ -458,8 +458,10 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn, pPriv->w = width; pPriv->h = height; +#if defined(XF86DRM_MODE) if (info->cs) radeon_bo_unmap(pPriv->src_bo); +#endif #ifdef XF86DRI if (info->directRenderingEnabled) { if (IS_R600_3D) -- cgit v1.2.3