Subject: Re: mac start up
From: Takashi Oe (toe@unlserve.unl.edu)
Date: Thu Jul 20 2000 - 08:10:04 MDT
On Wed, 19 Jul 2000, Martin Costabel wrote:
> I can confirm this: I have only 1MB of VRAM, and with 16bit color the
> best I can get under both MacOS and Linux is 800x600 at 60 Hz, which is
> rather flickery. Under MOL in console mode, I get the same resolution at
> 70 Hz which is much more pleasant.
Is yours valkyriefb? If so, you can use the same clock parameter
calculation code as in controlfb (patch posted at linuxppc-dev). I don't
know what the maximum dot clock for those hardwares are, but I bet it's
possible to get ~100 Hz vertical refresh rate. It is certainly the case
for control. YMMV.
The code below calculates the parameters for control/valkyrie hardware.
You can either hardcode the numbers you get into *.h or change the
relavant *var_to_par() in *.c.
#define CONTROL_PIXCLOCK_BASE 256016
static int calc_clock_params(unsigned long clk, unsigned char *param)
{
unsigned long p0, p1, p2, k, l, m, n, min;
p2 = ((clk << 4) < CONTROL_PIXCLOCK_BASE)? 3: 2;
l = clk << p2;
p0 = 0;
p1 = 0;
for (k = 1, min = l; k < 32; k++) {
unsigned long rem;
m = CONTROL_PIXCLOCK_BASE * k;
n = m / l;
rem = m % l;
if (n && (n < 128) && rem < min) {
p0 = k;
p1 = n;
min = rem;
}
}
if (!p0 || !p1)
return 1;
param[0] = p0;
param[1] = p1;
param[2] = p2;
return 0;
}
Takashi Oe
This archive was generated by hypermail 2a24 : Thu Jul 20 2000 - 08:13:52 MDT