3dfx kernel patch
Ani Joshi
ajoshi at shell.unixbox.com
Tue Apr 3 03:05:35 EST 2001
On Tue, 3 Apr 2001, Kaoru Fukui wrote:
> >video=tdfx:
>
> The name is worng,It's tdfxfb.
> But I don't have the card.
No, the name is correct. Arguments for the tdfxfb driver use
"video=tdfx:...."
The attatched patch will fix the "mirrored" text, but you *must* boot with
"video=tdfx:noaccel" as this patch doesn't have the character endian
swapping.
ani
-------------- next part --------------
--- tdfxfb.c.orig Mon Apr 2 03:09:14 2001
+++ tdfxfb.c Mon Apr 2 03:18:48 2001
@@ -279,6 +279,7 @@
unsigned long clip1max;
unsigned long srcbase;
unsigned long dstbase;
+ unsigned long miscinit0;
};
struct tdfxfb_par {
@@ -921,6 +922,7 @@
tdfx_outl(VIDDESKSTART, reg->startaddr);
tdfx_outl(VIDPROCCFG, reg->vidcfg);
tdfx_outl(VGAINIT1, reg->vgainit1);
+ tdfx_outl(MISCINIT0, reg->miscinit0);
banshee_make_room(8);
tdfx_outl(SRCBASE, reg->srcbase);
@@ -1411,6 +1413,26 @@
reg.screensize = par->width | (par->height << 12);
reg.vidcfg &= ~VIDCFG_HALF_MODE;
+
+ reg.miscinit0 = tdfx_inl(MISCINIT0);
+
+#if defined(__BIG_ENDIAN)
+ switch (par->bpp) {
+ case 8:
+ reg.miscinit0 &= ~(1 << 30);
+ reg.miscinit0 &= ~(1 << 31);
+ break;
+ case 16:
+ reg.miscinit0 |= (1 << 30);
+ reg.miscinit0 |= (1 << 31);
+ break;
+ case 24:
+ case 32:
+ reg.miscinit0 |= (1 << 30);
+ reg.miscinit0 &= ~(1 << 31);
+ break;
+ }
+#endif
do_write_regs(®);
More information about the Linuxppc-dev
mailing list