9front - general discussion about 9front
 help / color / mirror / Atom feed
From: unobe@cpan.org
To: 9front@9front.org
Subject: Re: [9front] aux/vga -p intermittent edid reporting
Date: Mon, 26 Apr 2021 22:39:17 -0700	[thread overview]
Message-ID: <44B4B98AE91B67B66EAAB14070915321@smtp.pobox.com> (raw)
In-Reply-To: <050993C291A0D8B0008D9A4DAE2DA4DA@felloff.net>

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

Quoth cinap_lenrek@felloff.net:
> > But back to the main issue: is edid supposed to be consistently
> > reported, or is this expected?
> 
> no, this is not expected. this hints at some issue with the i2c
> controller code that is supposed to read the edid over the aux
> channel.
> 

Thanks cinap.

> the fix would be to fix that code so it read edid consistently.

I have no idea how to do that.  I see auxctl and auxdat in
/sys/src/cmd/aux/vga/igfx.c so assume that's where I should start, and
refer to the manuals to figure things out.  I see things like:

	/* hack: slow down a bit */

in /sys/src/cmd/aux/vga/igfx.c:/^dpauxio .

> on some intel cards, the i2c stuff doesnt work at all. in this
> case, you can copy the monitor information into vgadb and tell
> it to use that info directly, skipping the i2c part.

It looks to me like the edid fetching is not very stable in igfx.c, so
might be giving some wrong values, or misapplying the values provided.
I've concluded this because I've used the returned edid values in
/lib/vgadb, and it produces a scrambled (illegible) screen.

cpu% tail /lib/vgadb
	lcd=1

#
# Apple MacBook Pro early 2011
#
mbp2011=1280x800
	clock=72.5
	shb=1328 ehb=1360 ht=1423
	vrs=803 vre=809 vt=846
	hsync=- vsync=-

cpu% cat /dev/vgactl
type igfx
size 1280x800x32 x8r8g8b8
tilt none
hwgc soft
hwaccel off
hwblank on
addr p 0x90000000 v 0xffffff0090000000 size 0x4000000
softscreen on
cpu% aux/vga -m mbp2011 -l 1280x800
aux/vga: main: mbp2011@1280x800 not in /lib/vgadb
cpu% aux/vga -m mbp2011 -l 1280x800
aux/vga: main: mbp2011@1280x800 not in /lib/vgadb
cpu% ""
	 cpu% aux/vga -m mbp2011 -l 1280x800
aux/vga: main: mbp2011@1280x800 not in /lib/vgadb
cpu% ""
	 cpu% aux/vga -m mbp2011 -l 1280x800
aux/vga: main: mbp2011@1280x800 not in /lib/vgadb
cpu% ""
	 cpu% aux/vga -m mbp2011 -l 1280x800
aux/vga: main: mbp2011@1280x800 not in /lib/vgadb
cpu% ""
	 cpu% aux/vga -m mbp2011 -l 1280x800
aux/vga: main: mbp2011@1280x800 not in /lib/vgadb
cpu% ""
	 cpu% aux/vga -m mbp2011 -l 1280x800
cpu% ss

As seen above, when the info is finally loaded from /lib/vgadb (1 in
19 odds, or so), there is no error from aux/vga.  Ss is just a
screenshot command:
cpu% cat /bin/ss
#!/bin/rc
cat /dev/screen | topng > /tmp/screenshot.png

It does not reflect the visual scrambing of the screen: the screenshot
looks as my screen *should* look, but does not.

Regardless, I've read enough of the aux/vga/igfx.c code to realize I
need to learn more before I try to address the issues I'm
experiencing.

[-- Attachment #2: screenshot.png --]
[-- Type: image/png, Size: 21046 bytes --]

  reply	other threads:[~2021-04-28  9:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 22:16 unobe
2021-04-24 16:07 ` cinap_lenrek
2021-04-27  5:39   ` unobe [this message]
2021-04-27  9:19     ` cinap_lenrek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44B4B98AE91B67B66EAAB14070915321@smtp.pobox.com \
    --to=unobe@cpan.org \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).