"SOLVED": Painfully slow X11 after upgrade

Mikhail T. mi+thun at aldan.algebra.com
Fri Dec 12 16:44:12 UTC 2014


This is, what I ended up doing:

 1. Switch from xf86-video-ati to xf86-video-ati-ums
 2. The xf86-video-ati-ums didn't look quite right, so I added the below
    patches to:
     1. (optionally) disable attempts by the driver to limit video-modes
        based "bandwidth" considerations -- I was now able to get the
        1600x1200 screen, which is the native mode of my LCD monitor --
        glxgears (default size) ran at about 100 frames per second
        (compared with 50 fps of unmodified KMS);
     2. disable attempts by the driver to disable DRI based on card's
        memory considerations -- the current formula it uses made no
        sense to me so I changed the code to issue a warning, but
        proceed with DRI anyway -- I now get DRI and the same glxgears
        manages 250 fps.
 3. Patch our xf86-video-ati-ums/Makefile to take advantage of the
    option 2.a. above.

My card is not capable of (hardware) OpenGL -- but it can do direct
rendering...

Maybe, something similar can be done with the KMS radeon driver?

    -mi

-------------- next part --------------
--- src/radeon_driver.c	2012-06-25 04:19:41.000000000 -0400
+++ src/radeon_driver.c	2014-12-12 10:30:55.000000000 -0500
@@ -3665,14 +3665,15 @@
 	if (maxy <= pScrn->virtualY * 3) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-		       "Static buffer allocation failed.  Disabling DRI.\n");
-	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		       "At least %d kB of video memory needed at this "
-		       "resolution and depth.\n",
+		       "resolution (%dx%d) and depth (%d*3). We only have "
+		       "%d/%d (%d)? Will try anyway, disable DRI by hand if "
+		       "you'd rather we didn't\n",
 		       (pScrn->displayWidth * pScrn->virtualY *
-			info->CurrentLayout.pixel_bytes * 3 + 1023) / 1024);
-	    info->directRenderingEnabled = FALSE;
-	} else {
-	    info->directRenderingEnabled = RADEONDRIScreenInit(pScreen);
+			info->CurrentLayout.pixel_bytes * 3 + 1023) / 1024,
+		       pScrn->displayWidth, pScrn->virtualY,
+		       info->CurrentLayout.pixel_bytes, info->FbMapSize/1024,
+		       width_bytes, maxy/1024);
 	}
+	info->directRenderingEnabled = RADEONDRIScreenInit(pScreen);
     }
 
@@ -6056,4 +6057,5 @@
     RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
 
+#ifndef DISABLE_MODE_BANDWIDTH
     /*
      * RN50 has effective maximum mode bandwidth of about 300MiB/s.
@@ -6065,4 +6067,5 @@
 	    return MODE_BANDWIDTH;
     }
+#endif
 
     /* There are problems with double scan mode at high clocks
-------------- next part --------------
--- src/radeon_output.c	2012-06-25 04:19:41.000000000 -0400
+++ src/radeon_output.c	2014-12-12 10:18:36.000000000 -0500
@@ -534,4 +534,5 @@
     RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
 
+#ifndef DISABLE_MODE_BANDWIDTH
     /*
      * RN50 has effective maximum mode bandwidth of about 300MiB/s.
@@ -543,4 +544,5 @@
 	    return MODE_BANDWIDTH;
     }
+#endif
 
     if (radeon_output->active_device & (ATOM_DEVICE_TV_SUPPORT)) {
-------------- next part --------------
Index: Makefile
===================================================================
--- Makefile	(revision 374568)
+++ Makefile	(working copy)
@@ -13,6 +13,10 @@
 XORG_CAT=	driver
 USE_XORG=	xf86driproto xineramaproto xf86miscproto glproto
 
+OPTIONS_DEFINE=	BANDWIDTH
+BANDWIDTH_DESC= Ignore card's presumed bandwidth, when selecting video mode
+BANDWIDTH_CFLAGS=-DDISABLE_MODE_BANDWIDTH
+
 CONFIGURE_ARGS+=--disable-kms
 INSTALL_TARGET=	install-strip
 


More information about the freebsd-x11 mailing list