Port-macppc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Netbooting mac mini g4



Hello,

On Wed, 20 Jun 2018 22:28:14 +0000 (UTC)
christos%astron.com@localhost (Christos Zoulas) wrote:

> >Assuming you can boot a -current kernel far enough to ssh into the
> >machine:
> >Please boot a -current kernel with radeonfb and options RADEONFB_DEBUG,
> >this will dump a whole lot of register values into dmesg. Please send me that.
> >This should at least tell me how OF sets up the outputs, and hopefully
> >point out what radeonfb does wrong.
> >
> >That said, I've been running -current on my Mini 2 for ages, if there
> >are new troubles I'd like to know.  
> 
> There you go,

Thanks!


> [    1.000000] RADEON_FP_GEN_CNTL = 000301cd

Hmm, internal TMDS is active, plugged into CRTC1, nothing weird.
And all we ever do to that register is turn the transmitter off and
back on.
That's what it's supposed to look like, and what we're expecting.

> [    1.000000] RADEON_FP2_GEN_CNTL = 00000008

And the external TMDS is turned off, we turn it on at some point when
unblanking everything else, really shouldn't matter.

> [    1.000000] dot clock: 65000
> [    1.000000] outfreq: 390000
> [    1.000000] post divider: 6 (mask 60000)
> [    1.000000] feedback divider: 173
> [    1.000000] refdiv 0000000c
> [    1.000000] div0 000600ad
> [    1.000000] div0 000600ad

We also end up with the exact same PLL settings OF uses.
Leaves the question what in cthulhu's name turns display output off,
doesn't seem to be the output wiring since we don't actually change it.

Does your monitor complain about anything before turning black?

I wonder if the chip freaks out when we enable the external TMDS when
it's hooked to the same CRTC as the internal one.

Here's a *very* crude patch that should prevent radeonfb from ever
unblanking the external TMDS output:
Index: radeonfb.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/radeonfb.c,v
retrieving revision 1.98
diff -u -w -r1.98 radeonfb.c
--- radeonfb.c  16 Jun 2018 01:25:23 -0000      1.98
+++ radeonfb.c  20 Jun 2018 23:15:48 -0000
@@ -2477,7 +2477,7 @@
 
        for (i = 0; i < dp->rd_ncrtcs; i++) {
 
-               if (dp->rd_crtcs[i].rc_number) {
+               if (dp->rd_crtcs[i].rc_number == 12) {
                        reg = RADEON_CRTC2_GEN_CNTL;
                        mask = RADEON_CRTC2_DISP_DIS;
                        fpreg = RADEON_FP2_GEN_CNTL;

We should probably not mess with unused outputs to begin with.

have fun
Michael



Home | Main Index | Thread Index | Old Index