From mboxrd@z Thu Jan 1 00:00:00 1970 From: splite@purdue.edu To: 9fans@cse.psu.edu Subject: Re: [9fans] Yet another VGA issue (CT65550) Message-ID: <20030506093624.A25826@sigint.cs.purdue.edu> References: <20030505200810.GC5035@swordfish> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030505200810.GC5035@swordfish>; from mgushee@havenrock.com on Mon, May 05, 2003 at 02:08:10PM -0600 Date: Tue, 6 May 2003 09:36:24 -0500 Topicbox-Message-UUID: 9f6acd68-eacb-11e9-9e20-41e7f4b1d025 On Mon, May 05, 2003 at 02:08:10PM -0600, Matt Gushee wrote: > > Well, I have wanted to try out Plan9 for some time, and finally decided > to take the plunge. I have installed the distribution on my old Toshiba > Satellite Pro 420CDS, which has a Chips & Tech 65550 video card. I have Dunno if this will help you, but here are the changes I made to a 3rd Ed. system to get video working on an old Toshiba (Libretto, I think) with a CT65550 (HiQV32) chipset in VLB mode. (Sorry for the format; I don't have a Plan 9 machine running at the moment. I can make the full source files available, if that would be more useful.) diff hiqvideo.c.orig hiqvideo.c 50a51,52 > enum {DUNNO, CT65550, CT65554, CT69000}; > int model=DUNNO; 55,58c57,86 < if((p = pcimatch(nil, 0x102C, 0)) == nil) < error("%s: not found\n", ctlr->name); < switch(p->did){ < case 0x00C0: /* 69000 HiQVideo */ --- > if((p = pcimatch(nil, 0x102C, 0))){ > switch(p->did){ > case 0x00C0: /* 69000 HiQVideo */ > model=CT69000; > break; > case 0x00E0: /* 65550 HiQV32 */ > model=CT65550; > break; > case 0x00E4: /* 65554 HiQV64 */ > model=CT65554; > break; > default: > error("%s: PCI DID %4.4uX unsupported\n", > ctlr->name, p->did); > } > } > else{ > switch(hiqvideoxi(Xrx, 0x02)){ > case 0xE0: > case 0xE4: > model=CT65550; > print("%s: found CT65550 in VLB mode\n", ctlr->name); > break; > default: > error("%s: not found\n", ctlr->name); > } > } > hqv->pci = p; > switch(model){ > case CT69000: 62,63c90,91 < case 0x00E0: /* 65550 HiQV32 */ < case 0x00E4: /* 65554 HiQV32 */ --- > case CT65550: > case CT65554: 67,69d94 < default: < error("%s: DID %4.4uX unsupported\n", < ctlr->name, p->did); 71d95 < hqv->pci = p; 84,85c108,109 < switch(hqv->pci->did){ < case 0x00C0: /* 69000 HiQVideo */ --- > switch(model){ > case CT69000: /* 69000 HiQVideo */ 89,90c113,114 < case 0x00E0: /* 65550 HiQV32 */ < case 0x00E4: /* 65554 HiQV32 */ --- > case CT65550: /* 65550 HiQV32 */ > case CT65554: /* 65554 HiQV64 */ diff vgahiqvideo.c.orig vgahiqvideo.c 15a16,17 > Pos102 = 0x102, /* Global Enable */ > Vse = 0x3C3, /* Video Subsystem Enable */ 53c55 < case 0x00E4: /* 65554 HiQV32 */ --- > case 0x00E4: /* 65554 HiQV64 */ 60a63,72 > else{ /* check for 65550 in VLB mode */ > switch(hiqvideoxi(Xrx, 0x02)){ > case 0xE0: > case 0xE4: > *size = *align = 8*1024*1024; > break; > default: > break; > } > } 80a93,100 > if (aperture && !p){ /* set aperature by hand if in VLB mode */ > int v; > v = hiqvideoxi(Xrx, 0x0A); > hiqvideoxo(Xrx, 0x0A, v | 0x02); > hiqvideoxo(Xrx, 0x20, 0x00); > hiqvideoxo(Xrx, 0x05, (aperture>>16) & 0xFF); > hiqvideoxo(Xrx, 0x06, (aperture>>24) & 0xFF); > } 103c123 < case 0x00E4: /* 65554 HiQV32 */ --- > case 0x00E4: /* 65554 HiQV64 */ 104a125,128 > case 0: > vmsize = 1*1024*1024; > break; > case 1: 105a130,144 > vmsize = 2*1024*1024; > break; > } > break; > default: > return; > } > size = p->mem[0].size; > align = 0; > } > else{ /* maybe in VLB mode? */ > switch(hiqvideoxi(Xrx, 0x02)){ > case 0xE0: > case 0xE4: > switch((hiqvideoxi(Xrx, 0x43)>>1) & 0x03){ 109a149 > default: 112a153 > size = align = 8*1024*1024; 118,119d158 < else < return; 121,122d159 < size = p->mem[0].size; < align = 0;