summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-08-25 18:37:15 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-08-25 18:37:15 -0400
commitbba51187055932ecd466f5f817428d6c773747b9 (patch)
tree6fdb433d2b816e86219b3605c9a0a1df82c1e48b
parent599adfc1f5e6d708be7ad30f4871de3046775727 (diff)
R6xx/r7xx: unmap vb bo when done
-rw-r--r--src/r600_exa.c15
-rw-r--r--src/r600_state.h9
-rw-r--r--src/r600_textured_videofuncs.c5
3 files changed, 26 insertions, 3 deletions
diff --git a/src/r600_exa.c b/src/r600_exa.c
index 1d7802a9..09eb6ee5 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -352,6 +352,11 @@ R600DoneSolid(PixmapPtr pPix)
CLEAR (draw_conf);
CLEAR (vtx_res);
+#ifdef XF86DRM_MODE
+ if (info->cs)
+ radeon_bo_unmap(accel_state->vb_bo);
+#endif
+
if (accel_state->vb_index == 0) {
R600IBDiscard(pScrn, accel_state->ib);
r600_vb_discard(pScrn);
@@ -614,6 +619,11 @@ R600DoCopy(ScrnInfoPtr pScrn)
CLEAR (draw_conf);
CLEAR (vtx_res);
+#ifdef XF86DRM_MODE
+ if (info->cs)
+ radeon_bo_unmap(accel_state->vb_bo);
+#endif
+
if (accel_state->vb_index == 0) {
R600IBDiscard(pScrn, accel_state->ib);
r600_vb_discard(pScrn);
@@ -1883,6 +1893,11 @@ static void R600DoneComposite(PixmapPtr pDst)
CLEAR (draw_conf);
CLEAR (vtx_res);
+#ifdef XF86DRM_MODE
+ if (info->cs)
+ radeon_bo_unmap(accel_state->vb_bo);
+#endif
+
if (accel_state->vb_index == 0) {
R600IBDiscard(pScrn, accel_state->ib);
r600_vb_discard(pScrn);
diff --git a/src/r600_state.h b/src/r600_state.h
index 6ca88cf4..cb039d49 100644
--- a/src/r600_state.h
+++ b/src/r600_state.h
@@ -188,9 +188,12 @@ do { \
radeon_cs_end(info->cs, __FILE__, __func__, __LINE__); \
} while(0)
#define RELOC_BATCH(bo, rd, wd) \
-do { \
- if (info->cs) \
- OUT_RING_RELOC((bo), (rd), (wd)); \
+do { \
+ if (info->cs) { \
+ int _ret; \
+ _ret = radeon_cs_write_reloc(info->cs, (bo), (rd), (wd), 0); \
+ if (_ret) ErrorF("reloc emit failure %d (%s %d)\n", _ret, __func__, __LINE__); \
+ } \
} while(0)
#define E32(ib, dword) \
do { \
diff --git a/src/r600_textured_videofuncs.c b/src/r600_textured_videofuncs.c
index 631a40cc..10d6f4f8 100644
--- a/src/r600_textured_videofuncs.c
+++ b/src/r600_textured_videofuncs.c
@@ -65,6 +65,11 @@ R600DoneTexturedVideo(ScrnInfoPtr pScrn)
CLEAR (draw_conf);
CLEAR (vtx_res);
+#ifdef XF86DRM_MODE
+ if (info->cs)
+ radeon_bo_unmap(accel_state->vb_bo);
+#endif
+
if (accel_state->vb_index == 0) {
R600IBDiscard(pScrn, accel_state->ib);
r600_vb_discard(pScrn);