Trying to use Radeon driver on Apple eMac

Joseph Adams joeyadams3.14159 at gmail.com
Thu Dec 11 02:01:15 PST 2008


I played around with gtf and found that my purportedly 1280x960
monitor can display higher resolutions quite nicely (no missing
pixels, apparently).  Here is a list of the resolutions and refresh
rates I tested:

//These flicker pretty badly
2048x1536 at 45
1920x1440 at 48
1920x1200 at 58
1856x1392 at 50
1792x1344 at 52
//These are tolerable
1600x1200 at 58
1600x1024 at 68
1400x900 at 78
1400x1050 at 67
1360x768 at 92
1366x768 at 92
1280x1024 at 67
1280x960 at 72
1280x800 at 88
1280x768 at 92
1152x864 at 81
1024x768 at 89
800x600 at 112
640x480 at 138
512x384 at 170
//This has noticeable horizontal bars
320x240 at 265

Resolutions with refresh rates below 50 or so flickered noticeably
while resolutions with heights smaller than 480 tended to have
horizontal black bars.  Other than that, I was able to choose just
about any resolution I wanted, but I had to adjust the refresh rate
for the image to appear and not fall over the screen.  I would say the
range of tolerability of these resolutions is probably
512x384...1600x1200.

Here is a new RADEONeMacModes that includes these modes when the
'super' mode is set to nonzero and uses canonical values when 'super'
is set to 0:

static DisplayModePtr RADEONeMacModes(xf86OutputPtr output, int super)
{
	ScrnInfoPtr pScrn = output->scrn;
	DisplayModePtr last=NULL, new=NULL, first=NULL;
	int i, *modep;
	int modecount = super ? 21 : 5;
	static const char *modenames[] = {
		"640x480", "800x600", "1024x768", "1152x864", "1280x960",
		
		"320x240", "512x384", "1280x1024", "1280x768", "1280x800",
"1360x768", "1368x768", "1400x1050",
		"1400x900", "1600x1024", "1600x1200", "1792x1344", "1856x1392",
"1920x1200", "1920x1440", "2048x1536"
	};
	static int modes[] = {
		62120, 640,680,752,864, 480,481,484,521,
		76840, 800,848,936,1072, 600,601,604,640,
		99070, 1024,1088,1200,1376, 768,769,772,809,
		112360, 1152,1224,1352,1552, 864,865,868,905,
		124540, 1280,1368,1504,1728, 960,961,964,1001,
		
		32280, 320, 344, 376, 432, 240, 241, 244, 282,
		49710, 512, 544, 600, 688, 384, 385, 388, 425,
		123190, 1280, 1368, 1504, 1728, 1024, 1025, 1028, 1064,
		128770, 1280, 1368, 1504, 1728, 768, 769, 772, 810,
		128040, 1280, 1368, 1504, 1728, 800, 801, 804, 842,
		137120, 1360, 1456, 1600, 1840, 768, 769, 772, 810,
		137710, 1368, 1464, 1608, 1848, 768, 769, 772, 810,
		138590, 1400, 1496, 1648, 1896, 1050, 1051, 1054, 1091,
		139160, 1400, 1496, 1648, 1896, 900, 901, 904, 941,
		156430, 1600, 1704, 1880, 2160, 1024, 1025, 1028, 1065,
		155470, 1600, 1704, 1880, 2160, 1200, 1201, 1204, 1241,
		174000, 1792, 1912, 2104, 2416, 1344, 1345, 1348, 1385,
		178710, 1856, 1976, 2176, 2496, 1392, 1393, 1396, 1432,
		186570, 1920, 2048, 2256, 2592, 1200, 1201, 1204, 1241,
		184140, 1920, 2048, 2256, 2592, 1440, 1441, 1444, 1480,
		195170, 2048, 2176, 2400, 2752, 1536, 1537, 1540, 1576
	};
	modep = modes;
	
	for (i=0; i<modecount; i++) {
		new = xnfcalloc(1, sizeof (DisplayModeRec));
		if (new) {
			new->name       = xnfalloc(strlen(modenames[i]) + 1);
			strcpy(new->name, modenames[i]);
			new->Clock      = *modep++;
			
			new->HDisplay   = *modep++;
			new->HSyncStart = *modep++;
			new->HSyncEnd   = *modep++;
			new->HTotal     = *modep++;

			new->VDisplay   = *modep++;
			new->VSyncStart = *modep++;
			new->VSyncEnd   = *modep++;
			new->VTotal     = *modep++;
			
			new->Flags      = 0;
			new->type       = M_T_DRIVER;
			if (i==2)
				new->type |= M_T_PREFERRED;
			new->next       = NULL;
			new->prev       = last;
			if (last) last->next = new;
			last = new;
			if (!first) first = new;
			xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Added eMac mode %s\n", modenames[i]);
		}
	}

    return first;
}

Of course, some of these resolutions require a raised Virtual setting.
 Also, the "default modes" that are added when Xorg starts sometimes
conflict with these modes.  For instance, a 1600x1200 at 60 mode
overrides my 1600x1200 at 58.  The former does not fit into the screen
quite as nicely as mine.

These extra modes (particularly the 1280x1024) would be neat to have
available.  You might consider making an emac-hack MacModel for them
:)

By the way, I saw somewhere on the internets that Apple may be
releasing a new eMac at some point.  I don't know if this rumor is
true or not.  It would have an LCD monitor instead of a CRT.  So for
Googlers out there:

Old eMac
CRT eMac
eMac G4
Radeon driver won't work in Linux or Xorg
Graphics won't work in Linux or Xorg
Solution:  Read this mailing list thread starting from the beginning :)



More information about the xorg mailing list