From 13fd53286bdda2c55683bdb5f63e7d345f6c63ef Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 23 Aug 2007 20:17:51 -0400 Subject: RADEON: set (hopefully) reasonable default max desktop sizes Based on the amount of vram. We really need ttm... --- src/radeon_driver.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/radeon_driver.c') diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 469e7bc3..c6c7845d 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -2772,9 +2772,26 @@ _X_EXPORT Bool RADEONPreInit(ScrnInfoPtr pScrn, int flags) crtc_max_Y = 8192; } } else { - crtc_max_X = 1600; - crtc_max_Y = 1200; + if (pScrn->videoRam < 16384) { + crtc_max_X = 1600; + crtc_max_Y = 1200; + } else if (pScrn->videoRam <= 32768) { + crtc_max_X = 2048; + crtc_max_Y = 1200; + } else if (pScrn->videoRam > 32768) { + if (IS_R300_VARIANT) { + crtc_max_X = 2560; + crtc_max_Y = 2048; + } else { + crtc_max_X = 2048; + crtc_max_Y = 2048; + } + } } + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Max desktop size set to %dx%d\n", + crtc_max_X, crtc_max_Y); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "For a larger or smaller max desktop size, add a Virtual line to your xorg.conf\n"); /*xf86CrtcSetSizeRange (pScrn, 320, 200, info->MaxSurfaceWidth, info->MaxLines);*/ xf86CrtcSetSizeRange (pScrn, 320, 200, crtc_max_X, crtc_max_Y); -- cgit v1.2.3