File xf86-video-ati-bug519261-increase-virtual.diff of Package xorg-x11-driver-video
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 67fb9b7..15c49b4 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -3053,6 +3053,20 @@ Bool RADEONPreInit(ScrnInfoPtr pScrn, int flags)
if (!RADEONPreInitControllers(pScrn))
goto fail;
+ /* Unless we're able to shrink/enlarge FB on the fly (GEM etc.), allocate
+ * large enough (TM) virtual size */
+ if (!pScrn->display->virtualX || !pScrn->display->virtualY) {
+ /* Have at least enough space for double buffering and z Buffer + some textures */
+ if (2 * 1920*1920 * (pScrn->bitsPerPixel/8) <= pScrn->videoRam / 4 * 1024) {
+ /* Fits on 128MB and up */
+ pScrn->display->virtualX = 2 * 1920;
+ pScrn->display->virtualY = 1920;
+ } else if (2 * 1680*1280 * (pScrn->bitsPerPixel/8) <= pScrn->videoRam / 4 * 1024) {
+ /* Fits on 64MB and up */
+ pScrn->display->virtualX = 2 * 1680;
+ pScrn->display->virtualY = 1280;
+ }
+ }
ErrorF("before xf86InitialConfiguration\n");