summaryrefslogtreecommitdiff
path: root/src/radeon_kms.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2015-03-05 18:34:07 +0900
committerMichel Dänzer <michel@daenzer.net>2015-03-17 11:00:17 +0900
commit4a35e2f33d9cdfb608423046391311109f96fb6b (patch)
tree6a831a4f2cf48b22a5509c2ccbbbe541b6dd6245 /src/radeon_kms.c
parent4b8adebb80158bcf81ada83bb88517febe931b12 (diff)
Fold radeon_glamor_flush into radeon_cs_flush_indirect
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_kms.c')
-rw-r--r--src/radeon_kms.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 23c06943..d25d7f53 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -84,12 +84,21 @@ const OptionInfoRec *RADEONOptionsWeak(void) { return RADEONOptions_KMS; }
void radeon_cs_flush_indirect(ScrnInfoPtr pScrn)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
- struct radeon_accel_state *accel_state = info->accel_state;
+ struct radeon_accel_state *accel_state;
int ret;
+#ifdef USE_GLAMOR
+ if (info->use_glamor) {
+ glamor_block_handler(pScrn->pScreen);
+ return;
+ }
+#endif
+
if (!info->cs->cdw)
return;
+ accel_state = info->accel_state;
+
/* release the current VBO so we don't block on mapping it later */
if (info->accel_state->vbo.vb_offset && info->accel_state->vbo.vb_bo) {
radeon_vbo_put(pScrn, &info->accel_state->vbo);
@@ -307,9 +316,6 @@ static void RADEONBlockHandler_KMS(BLOCKHANDLER_ARGS_DECL)
(*pScreen->BlockHandler) (BLOCKHANDLER_ARGS);
pScreen->BlockHandler = RADEONBlockHandler_KMS;
- if (info->use_glamor)
- radeon_glamor_flush(pScrn);
-
radeon_cs_flush_indirect(pScrn);
#ifdef RADEON_PIXMAP_SHARING
radeon_dirty_update(pScreen);
@@ -322,10 +328,8 @@ radeon_flush_callback(CallbackListPtr *list,
{
ScrnInfoPtr pScrn = user_data;
- if (pScrn->vtSema) {
+ if (pScrn->vtSema)
radeon_cs_flush_indirect(pScrn);
- radeon_glamor_flush(pScrn);
- }
}
static Bool RADEONIsFastFBWorking(ScrnInfoPtr pScrn)