9front - general discussion about 9front
 help / color / mirror / Atom feed
* Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
@ 2019-10-02  2:57 covertusername967
  0 siblings, 0 replies; 14+ messages in thread
From: covertusername967 @ 2019-10-02  2:57 UTC (permalink / raw)
  To: 9front

>> i'd try different monitor settings and timings... maybe plug in
>> external vga monitor if there is a port...
> 
> Yes, I agree with some problem in moniter settings.
> 
> I had this kind of regular deformation once.
> As you see on the second image, bright zones are drawing arc shape,
> which means blank timing may have some shift regularly.
> 
> Kenji

Sadly I have no clue how to do low-level programming like this - I'm afraid I'd fry the
chip or monitor. The most i've done with the kernel is add vid/did pairs to the sata
driver... A script kiddie could have done that.

If it helps, I did manage to find some ancient developer documentation on the chipset
itself, though documentation on the whole machine is long gone.

VGA docs: http://download.xskernel.org/docs/controllers/vga/29802601.pdf
Memory controller hub: http://www.clannad.co.uk/datasheets/chipsets/82810memcont.pdf
I/O controller hub: http://www.softelectro.ru/82801aa.pdf
Firmware hub: https://www.dataman.com/media/datasheet/Intel/82802Ax.pdf

When I get home this morning I'll poke around with the registers manually and see what comes
up. 

>> i'd try different monitor settings and timings... maybe plug in
>> external vga monitor if there is a port...

There is no external monitor port, unfortunately. I got the settings I put in vgadb from
xvidtune on linux.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
@ 2019-12-05  5:56 covertusername967
  0 siblings, 0 replies; 14+ messages in thread
From: covertusername967 @ 2019-12-05  5:56 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 823 bytes --]

 From /sys/src/cmd/aux/vga/i81x.c:

	/*	<<TODO>>
		i830 LCD Controller, at i81x->mmio+0x60000
		i81x->lcd[0]: Horizontal Total Reg.		0x60000
		i81x->lcd[1]: Horizontal Blanking Reg.	0x60004
		i81x->lcd[2]: Horizontal Sync Reg. 		0x60008
		i81x->lcd[3]: Vertical Total Reg.		0x6000c
		i81x->lcd[4]: Vertical Blanking Reg.		0x60010
		i81x->lcd[5]: Vertical Sync Reg. 		0x60014
		i81x->lcd[6]: Pixel Pipeline A Sequencer Register Control(SRC,0~7)	0x6001c
		i81x->lcd[7]: BCLRPAT_A	0x60020
	         i81x->lcd[8]: 0
	*/

This matches the LCD registers in the specsheet, but these are never
initialized.  It looks like the LCD part of the driver was simply
never finished...

I'm mostly just putting this here for posterity.  This won't get fixed
if I just sit here and whine about it, and I intend to do something
about that.


[-- Attachment #2: Type: message/rfc822, Size: 3057 bytes --]

From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
Date: Tue, 3 Dec 2019 19:44:26 +0100
Message-ID: <FFEEA8722D5AA0F796D737E1AC3D52F5@felloff.net>

you got a i810 compatible graphics card?

--
cinap

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
@ 2019-12-03 18:44 cinap_lenrek
  0 siblings, 0 replies; 14+ messages in thread
From: cinap_lenrek @ 2019-12-03 18:44 UTC (permalink / raw)
  To: 9front

you got a i810 compatible graphics card?

--
cinap


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
  2019-11-30  7:47 covertusername967
@ 2019-12-03  6:35 ` k0ga
  0 siblings, 0 replies; 14+ messages in thread
From: k0ga @ 2019-12-03  6:35 UTC (permalink / raw)
  To: 9front

I have to comment that I have the same issue.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
@ 2019-11-30  7:47 covertusername967
  2019-12-03  6:35 ` k0ga
  0 siblings, 1 reply; 14+ messages in thread
From: covertusername967 @ 2019-11-30  7:47 UTC (permalink / raw)
  To: 9front

I hope I'm not necroposting by waiting too long, but I only just now found the time to get back to this.

> hi,
> 
> years and years ago (before vga bioss where common) russ wrote a unix app that could dump the registers under x windows. that is probably in the 9fans archives somewhere.
> 
> maybe you could re-awaken that to get a starting point for register settings?
> 
> -Steve

I DID find something in russ's old contrib on 9p.io:

9fs 9pio
/n/9pio/contrib/rsc/vga.tgz

Unfortunately, I was not able to get that windows executable to run (Windows ME probably didn't help much), and I even have issues getting linux to run correctly on this machine, so I haven't tried it there yet.

> On 2 Oct 2019, at 6:19 am, kokamoto@hera.eonet.ne.jp wrote:
> 
>> 
>> 
>> 1024x768x16: http://okturing.com/src/6976/body
> 
> If you exchange your display entry in /lib/vgadb to like:
> ------
> raptop=1024x768
>    clock=65
>    include=1024x768
> ------
> <raptop can be your name of display>
> 
> What will happen?

Sadly, the exact same arc drawing issue happened using those settings.

> By the way, 24 depth is not supported in Plan9.
> If you want it, it should be 32 depth.
> 
> Kenji

Ah, good to know.

> PS. I forgot the result of xvidtune, however, I have faint memory of
> it did not help me...  It was long long ago, and I got too many age now.☺

Well, it was worth a shot... I imagine that xvidtune was more useful in the days of the CRT anyway.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
  2019-10-02  4:18 kokamoto
@ 2019-10-02  7:17 ` Steve Simon
  0 siblings, 0 replies; 14+ messages in thread
From: Steve Simon @ 2019-10-02  7:17 UTC (permalink / raw)
  To: 9front

hi,

years and years ago (before vga bioss where common) russ wrote a unix app that could dump the registers under x windows. that is probably in the 9fans archives somewhere.

maybe you could re-awaken that to get a starting point for register settings?

-Steve


> On 2 Oct 2019, at 6:19 am, kokamoto@hera.eonet.ne.jp wrote:
> 
> 
>> 
>> 1024x768x16: http://okturing.com/src/6976/body
> 
> If you exchange your display entry in /lib/vgadb to like:
> ------
> raptop=1024x768
>    clock=65
>    include=1024x768
> ------
> <raptop can be your name of display>
> 
> What will happen?
> 
> By the way, 24 depth is not supported in Plan9.
> If you want it, it should be 32 depth.
> 
> Kenji
> 
> PS. I forgot the result of xvidtune, however, I have faint memory of
> it did not help me...  It was long long ago, and I got too many age now.☺



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
@ 2019-10-02  4:18 kokamoto
  2019-10-02  7:17 ` Steve Simon
  0 siblings, 1 reply; 14+ messages in thread
From: kokamoto @ 2019-10-02  4:18 UTC (permalink / raw)
  To: 9front

>1024x768x16: http://okturing.com/src/6976/body

If you exchange your display entry in /lib/vgadb to like:
------
raptop=1024x768
	clock=65
	include=1024x768
------
<raptop can be your name of display>

What will happen?

By the way, 24 depth is not supported in Plan9.
If you want it, it should be 32 depth.

Kenji

PS. I forgot the result of xvidtune, however, I have faint memory of
it did not help me...  It was long long ago, and I got too many age now.☺



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
@ 2019-10-02  0:17 kokamoto
  0 siblings, 0 replies; 14+ messages in thread
From: kokamoto @ 2019-10-02  0:17 UTC (permalink / raw)
  To: 9front

> i'd try different monitor settings and timings... maybe plug in
> external vga monitor if there is a port...

Yes, I agree with some problem in moniter settings.

I had this kind of regular deformation once.
As you see on the second image, bright zones are drawing arc shape,
which means blank timing may have some shift regularly.

Kenji



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
@ 2019-10-02  0:08 cinap_lenrek
  0 siblings, 0 replies; 14+ messages in thread
From: cinap_lenrek @ 2019-10-02  0:08 UTC (permalink / raw)
  To: 9front

for first url, i get a 404... but second one looks spectacular.

i dont know this hardware and have no documentation. but mr.
okomoto might be able to help you there.

i'd try different monitor settings and timings... maybe plug in
external vga monitor if there is a port...

without vesa bios, its hard to get a reference how all the registers
should be programmed. (aux/vga can dump the registers without
loading a mode).

anyway, the mode setting is done from userspace aux/vga:

/sys/src/cmd/aux/vga/i81x.c

good luck.

--
cinap


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
@ 2019-10-01 23:31 covertusername967
  0 siblings, 0 replies; 14+ messages in thread
From: covertusername967 @ 2019-10-01 23:31 UTC (permalink / raw)
  To: 9front

> thy this out:
> 
> http://code.9front.org/hg/plan9front/rev/c308afa89cfc
> 
> --
> cinap

Thank you so much!

It no longer panics, but now the display is acting weird.
I took two pictures, first one is here: https://i.imgur.com/IuD3Ov.jpg
Second one: https://i.imgur.com/0vu8e35.jpg



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
@ 2019-10-01 23:02 cinap_lenrek
  0 siblings, 0 replies; 14+ messages in thread
From: cinap_lenrek @ 2019-10-01 23:02 UTC (permalink / raw)
  To: 9front

thy this out:

http://code.9front.org/hg/plan9front/rev/c308afa89cfc

--
cinap


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
@ 2019-10-01 15:45 cinap_lenrek
  0 siblings, 0 replies; 14+ messages in thread
From: cinap_lenrek @ 2019-10-01 15:45 UTC (permalink / raw)
  To: 9front

the i81x driver appears to not take big pages into account (probably
the driver predates the page size extension implementation). the
offending code is here in i81xenable() in /sys/src/9/pc/vgai81x.c:

	/*
	 * allocate space for the cursor data in system memory.
	 * must be uncached.
	 */
	cursor = (ulong)xspanalloc(BY2PG, BY2PG, 0);
	mach0 = MACHP(0);
	pte = mmuwalk(mach0->pdb, cursor, 2, 0);
	if(pte == nil)
		panic("i81x cursor mmuwalk");
	*pte |= PTEUNCACHED;
	scr->storage = cursor;

xspanalloc() allocates memory in the kernel address space, which gets
mapped with 4MB pages, not 4K pages.

so the later attempt to manipulate the 4K pte to set the uncached bit
fails (mmuwalk panics as theres no 4K pte).

the proper way would be to write a function to uncache a kernel memory
span that splits the 4MB mapping.

for now, try to just comment out the 4 lines in i81xenable():

//	pte = mmuwalk(mach0->pdb, cursor, 2, 0);
//	if(pte == nil)
//		panic("i81x cursor mmuwalk");
//	*pte |= PTEUNCACHED;

--
cinap


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
@ 2019-10-01 12:21 covertusername967
  0 siblings, 0 replies; 14+ messages in thread
From: covertusername967 @ 2019-10-01 12:21 UTC (permalink / raw)
  To: 9front

>> I expected a 1024x768x24 framebuffer to become visible.
> 
> How about 1024x768x16 or 1024x768x8?
> 
> Kenji

I just tried it with those color depths and got very similar panic screens.

1024x768x16: http://okturing.com/src/6976/body

1024x768x8: http://okturing.com/src/6977/body



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [9front] Kernel panic when setting screen resolution on machine with i810 chipset
@ 2019-10-01  2:09 kokamoto
  0 siblings, 0 replies; 14+ messages in thread
From: kokamoto @ 2019-10-01  2:09 UTC (permalink / raw)
  To: 9front

> I expected a 1024x768x24 framebuffer to become visible.

How about 1024x768x16 or 1024x768x8?

Kenji



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-12-05  5:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02  2:57 [9front] Kernel panic when setting screen resolution on machine with i810 chipset covertusername967
  -- strict thread matches above, loose matches on Subject: below --
2019-12-05  5:56 covertusername967
2019-12-03 18:44 cinap_lenrek
2019-11-30  7:47 covertusername967
2019-12-03  6:35 ` k0ga
2019-10-02  4:18 kokamoto
2019-10-02  7:17 ` Steve Simon
2019-10-02  0:17 kokamoto
2019-10-02  0:08 cinap_lenrek
2019-10-01 23:31 covertusername967
2019-10-01 23:02 cinap_lenrek
2019-10-01 15:45 cinap_lenrek
2019-10-01 12:21 covertusername967
2019-10-01  2:09 kokamoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).