xf86-video-ati/xf86-video-ati-bug519261-increase-virtual.diff

27 lines
1.1 KiB
Diff
Raw Normal View History

Index: xf86-video-ati-6.13.0/src/radeon_driver.c
===================================================================
--- xf86-video-ati-6.13.0.orig/src/radeon_driver.c
+++ xf86-video-ati-6.13.0/src/radeon_driver.c
@@ -3221,6 +3221,21 @@ Bool RADEONPreInit(ScrnInfoPtr pScrn, in
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;
+ }
+ }
+
if (!xf86InitialConfiguration (pScrn, FALSE))
{
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes.\n");