summaryrefslogtreecommitdiff
path: root/src/radeon_kms.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-03-09 18:28:47 +0900
committerMichel Dänzer <michel@daenzer.net>2016-03-23 16:52:59 +0900
commit7f3d0780ca65a90117c2a61362dbc0899bd9c0b0 (patch)
tree11674b05095f2afb217926f6955627260c3b67db /src/radeon_kms.c
parent3de480e83c0a1824838d662d6d67c9fe85277298 (diff)
Don't try DRI2/Present flipping while the HW cursor can't be used
Flipping doesn't interact correctly with SW cursor: A flip makes the SW cursor disappear. It will only appear again when the cursor is moved, but it will be surrounded by corruption, because the SW cursor code will restore stale screen contents at the old cursor location before drawing the cursor at the new location. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_kms.c')
-rw-r--r--src/radeon_kms.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 8048c95f..d89c3760 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -1285,15 +1285,18 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "TearFree enabled\n");
if (info->dri2.pKernelDRMVersion->version_minor >= 8) {
+ Bool sw_cursor = xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE);
+
info->allowPageFlip = xf86ReturnOptValBool(info->Options,
OPTION_PAGE_FLIP, TRUE);
- if (info->tear_free || info->shadow_primary) {
+ if (sw_cursor || info->tear_free || info->shadow_primary) {
xf86DrvMsg(pScrn->scrnIndex,
info->allowPageFlip ? X_WARNING : X_DEFAULT,
"KMS Pageflipping: disabled%s\n",
info->allowPageFlip ?
- " because of ShadowPrimary/TearFree" : "");
+ (sw_cursor ? " because of SWcursor" :
+ " because of ShadowPrimary/TearFree") : "");
info->allowPageFlip = FALSE;
} else {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,