From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta01.eonet.ne.jp ([203.140.81.21]) by ur; Sat Jul 23 02:19:56 EDT 2016 Received: from titan.jitaku.localdomain (182-164-118-125f1.osk3.eonet.ne.jp [182.164.118.125]) by mailmsa12.mozu.eo.k-opti.ad.jp with ESMTP id u6N6JmTQ029198 for <9front@9front.org>; Sat, 23 Jul 2016 15:19:48 +0900 To: 9front@9front.org Subject: Re: [9front] core-i3 and vesa mode Date: Sat, 23 Jul 2016 15:19:48 +0900 From: kokamoto@hera.eonet.ne.jp Message-ID: <0701ad20b29c2f1a0c1fd3ddde1b55b7@titan.jitaku.localdomain> In-Reply-To: References: <5f68f72652be52d00525bdb2ccca5844@titan.jitaku.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: advanced rich-client scripting-based interface > I'm now trying to make use of sandy-bridge machine, and > met annoying one. My temporal report. I see scrambled screen, one time moving parallel horizontal color band, or colored scatterring dotts one. In any case, I can open terminal, and can commands in it. I have to guss the mouse point and the shape of rio terminal, though :-) For example, I can do aux/vga -m igfx -l 1024x768x32 (now 1280x1024x32), and see the screen was changed. In addition, I can see a kind of broad shadow of moving mouse, when I move it. Based on the above observations, I think only the screen is not suitable, just like a timing error, such as horizontal blank etc. However I think those values from the port reading are correct, like: (at 1280x1024x32 resolution) rmmio 00060000 69704ff HTOTAL_A 69704ff: total size=1687, active size=1279 rmmio 00060004 69704ff HBLANK_A 69704ff: horizontal blank end=1687, start=1279 rmmio 000e0008 59f052f PCH_TRANS_HSYNC_A 59f052f: hsync end=1439, start=1327 rmmio 000e000c 42903ff PCH_TRANS_VTOTAL_A 42903ff: Vtotal=1065, Vactive size=1023 rmmio 000e0010 42903ff PCH_TRANS_VBLANK_A 42903ff: vblank end=1065, start=1023 rmmio 000e0014 4030400 PCH_TRANS_VSYNC_A 4030400: vsync end=1027, start=1024 If you have some comments, please make me know. Kenji ----from here------ I made changes like: 1) /sys/src/9/pc/vgaigfx.c (1-A) in stolenmb() switch(p->did){ case 0x0166: /* Ivy Bridge */ case 0x0102: /* Core-5 Sandy Bridge */ (1-B) in igfxcurregs() case 0x2a42: /* X200 */ case 0x2a02: /* CF-R7 */ case 0x0102: /* Core-i5 Sndy Bridge */ if(pipe > 1) 2) /sys/src/cmd/aux/vga/igfx.c (2-A) in snarfpipe() /* display port control */ p->fdi->dpctl = snarfreg(igfx, o + 0x300); /* TRANS_DP_CTL[AB..] // p->fdi->rxctl = snarfreg(igfx, o + 0x1000c); /* FDI_RX[AB..]_CTL */ p->fdi->rxctl = snarfreg(igfx, o + 0x1000C); /* FDI_RX[AB..]_CTL */ <=== here /* cursor plane */ switch(igfx->type){ // case TypeSNB: <=== deleted case TypeIVB: p->cur->cntr = snarfreg(igfx, 0x70080 + x*0x1000); p->cur->base = snarfreg(igfx, 0x70084 + x*0x1000); p->cur->pos = snarfreg(igfx, 0x70088 + x*0x1000); break; case TypeSNB: <==== added p->cur->cntr = snarfreg(igfx, 0x70080 + x*0x40); /* cursol control */ p->cur->base = snarfreg(igfx, 0x70084 + x*0x40); /* cursol base address */ p->cur->pos = snarfreg(igfx, 0x70088 + x*0x40); /* Cursol Position */ break; case TypeG45: (2-B) in devtype() switch(igfx->pci->did){ case 0x0166: /* 3rd Gen Core - ThinkPad X230 */ return TypeIVB; case 0x0102: /* Dell Optiplex 790 */ <=== added case 0x0126: /* Thinkpad X220 */ return TypeSNB; (2-C) in inittrans() t->vs.v = (m->vre - 1)<<16 | (m->vrs - 1); t->hb.v = t->ht.v; // t->hb.v = (m->ehb - 1)<<16 | (m->shb - 1); <=== changed, but no change t->vb.v = t->vt.v; (2-D) in init() switch(port){ default: Badport: error("%s: display #%d not supported\n", ctlr->name, port+1); break; case PortVGA: if(igfx->type == TypeG45) <=== from here x = (igfx->adpa.v >> 30) & 1; /* pipe select o/1 */ if(igfx->type == TypeSNB || igfx->type == TypeIVB) /* K.Okamoto */ x = (igfx->adpa.v >> 29) & 3; /* transcoder A or B or C */ <==== to here igfx->adpa.v |= (1<<31); /* ADPA enable */ if(igfx->type == TypeG45){ /* set DPMS VSYNC, HSYNC */ .... case PortLCD: if(igfx->type == TypeG45) <=== from here x = (igfx->lvds.v >> 30) & 1; /* pipe select o/1 */ if(igfx->type == TypeSNB || igfx->type == TypeIVB) x = (igfx->lvds.v >> 29) & 3; /* transcoder A or B or C */ <=== to here igfx->lvds.v |= (1<<31); (2-E) in enablepipe() if(p->fdi->rxctl.a != 0){ .... sleep(5); p->fdi->txctl.v &= ~(7<<8 | 1); /* clear auto training bits */ p->fdi->txctl.v &= ~(1<<31); /* disable p->fdi->rxctl.v |= (1<<14); /* enable pll */ // p->fdi->txctl.v |= (1<<14); <==== here loadreg(igfx, p->fdi->txctl); sleep(5); } ---- to here--------