Don't disable page flipping completely with SW cursor

Submitted by Michel Dänzer on July 18, 2019, 4:19 p.m.

Details

Message ID 20190718161943.19562-1-michel@daenzer.net
State Accepted
Commit c7ed12cb2ea76999351d7cb87877224bdc0664f0
Headers show
Series "Don't disable page flipping completely with SW cursor" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Michel Dänzer July 18, 2019, 4:19 p.m.
From: Michel Dänzer <michel.daenzer@amd.com>

Even with SW cursor, page flipping can be used while no X cursor is
visible.

Occurred to me in the context of xorg/xserver#828.
(Ported from amdgpu commit 87f41ace4920fd2069794211683659eb25b025a6)

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 src/radeon_kms.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index ff4f8dcf6..777fc14ee 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -1917,19 +1917,15 @@  Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
 
     if (!pScrn->is_gpu) {
 	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 (sw_cursor || info->shadow_primary) {
+	    if (info->shadow_primary) {
 		xf86DrvMsg(pScrn->scrnIndex,
 			   info->allowPageFlip ? X_WARNING : X_DEFAULT,
 			   "KMS Pageflipping: disabled%s\n",
 			   info->allowPageFlip ?
-			   (sw_cursor ? " because of SWcursor" :
-			    " because of ShadowPrimary") : "");
+			   " because of ShadowPrimary" : "");
 		info->allowPageFlip = FALSE;
 	    } else {
 		xf86DrvMsg(pScrn->scrnIndex, X_INFO,