summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-11-24 15:38:47 +1000
committerDave Airlie <airlied@redhat.com>2009-11-24 15:38:47 +1000
commitba76acc76e0d0a51a1c488e4d5494a71e155a05b (patch)
tree814874038ee733b04b4c962b5b88620105ed4d83 /src
parent3c527d752d3cced219c6113acb932511b16e35fb (diff)
radeon/kms: drop special r600 indirect flush
This just merges it with the main kms cs flush
Diffstat (limited to 'src')
-rw-r--r--src/r6xx_accel.c27
-rw-r--r--src/radeon_kms.c6
2 files changed, 8 insertions, 25 deletions
diff --git a/src/r6xx_accel.c b/src/r6xx_accel.c
index dd74d468..a89bfb3f 100644
--- a/src/r6xx_accel.c
+++ b/src/r6xx_accel.c
@@ -39,29 +39,6 @@
#include "radeon_drm.h"
-#if defined(XF86DRM_MODE)
-void r600_cs_flush_indirect(ScrnInfoPtr pScrn)
-{
- RADEONInfoPtr info = RADEONPTR(pScrn);
- int ret;
-
- if (!info->cs->cdw)
- return;
-
- if (info->accel_state->vb_ptr) {
- radeon_bo_unmap(info->accel_state->vb_bo);
- info->accel_state->vb_ptr = NULL;
- }
-
- radeon_cs_emit(info->cs);
- radeon_cs_erase(info->cs);
-
- ret = radeon_cs_space_check(info->cs);
- if (ret)
- ErrorF("space check failed in flush\n");
-}
-#endif
-
/* Flush the indirect buffer to the kernel for submission to the card */
void R600CPFlushIndirect(ScrnInfoPtr pScrn, drmBufPtr ib)
{
@@ -72,7 +49,7 @@ void R600CPFlushIndirect(ScrnInfoPtr pScrn, drmBufPtr ib)
#if defined(XF86DRM_MODE)
if (info->cs) {
- r600_cs_flush_indirect(pScrn);
+ radeon_cs_flush_indirect(pScrn);
return;
}
#endif
@@ -111,7 +88,7 @@ void R600IBDiscard(ScrnInfoPtr pScrn, drmBufPtr ib)
info->accel_state->vb_ptr = NULL;
}
if (CS_FULL(info->cs)) {
- r600_cs_flush_indirect(pScrn);
+ radeon_cs_flush_indirect(pScrn);
return;
}
radeon_cs_erase(info->cs);
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index f149e0cc..cafc3298 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -78,6 +78,12 @@ void radeon_cs_flush_indirect(ScrnInfoPtr pScrn)
if (!info->cs->cdw)
return;
+
+ if (info->accel_state->vb_ptr) {
+ radeon_bo_unmap(info->accel_state->vb_bo);
+ info->accel_state->vb_ptr = NULL;
+ }
+
radeon_cs_emit(info->cs);
radeon_cs_erase(info->cs);