Subject: Re: radeonfb: black screen
To: None <port-macppc@netbsd.org>
From: None <khym@azeotrope.org>
List: port-macppc
Date: 07/22/2007 23:38:49
On Sun, Jul 22, 2007 at 03:33:28AM -0400, Michael Lorenz wrote:
> Fundamental misunderstanding - the preferred mode is what the monitor 
> reports as its favourite video mode.

Yeah, I understood that; I was just saying that I'd prefer another mode
if possible :)

> Could you please mail me pcictl dump output for both radeons?

"Both" radeons? I only have one...

PCI configuration registers:
  Common header:
    0x00: 0x51441002 0x02b00087 0x03000000 0x0000ff08

    Vendor Name: ATI Technologies (0x1002)
    Device Name: Radeon QD (0x5144)
    Command register: 0x0087
      I/O space accesses: on
      Memory space accesses: on
      Bus mastering: on
      Special cycles: off
      MWI transactions: off
      Palette snooping: off
      Parity error checking: off
      Address/data stepping: on
      System error (SERR): off
      Fast back-to-back transactions: off
      Interrupt disable: off
    Status register: 0x02b0
      Capability List support: on
      66 MHz capable: on
      User Definable Features (UDF) support: off
      Fast back-to-back capable: on
      Data parity error detected: off
      DEVSEL timing: medium (0x1)
      Slave signaled Target Abort: off
      Master received Target Abort: off
      Master received Master Abort: off
      Asserted System Error (SERR): off
      Parity error detected: off
    Class Name: display (0x03)
    Subclass Name: VGA (0x00)
    Interface: 0x00
    Revision ID: 0x00
    BIST: 0x00
    Header Type: 0x00 (0x00)
    Latency Timer: 0xff
    Cache Line Size: 0x08

  Type 0 ("normal" device) header:
    0x10: 0x98000008 0x00000401 0x90080000 0x00000000
    0x20: 0x00000000 0x00000000 0x00000000 0x09081002
    0x30: 0x90000001 0x00000058 0x00000000 0x00080130

    Base address register at 0x10
      type: 32-bit prefetchable memory
      base: 0x98000000, not sized
    Base address register at 0x14
      type: i/o
      base: 0x00000400, not sized
    Base address register at 0x18
      type: 32-bit nonprefetchable memory
      base: 0x90080000, not sized
    Base address register at 0x1c
      not implemented(?)
    Base address register at 0x20
      not implemented(?)
    Base address register at 0x24
      not implemented(?)
    Cardbus CIS Pointer: 0x00000000
    Subsystem vendor ID: 0x1002
    Subsystem ID: 0x0908
    Expansion ROM Base Address: 0x90000001
    Capability list pointer: 0x58
    Reserved @ 0x38: 0x00000000
    Maximum Latency: 0x00
    Minimum Grant: 0x08
    Interrupt pin: 0x01 (pin A)
    Interrupt line: 0x30

  Capability register at 0x58
    type: 0x02 (AGP, rev. 2.0)
  Capability register at 0x50
    type: 0x01 (Power Management, rev. 1.0)

  Device-dependent header:
    0x40: 0x00000000 0x00000000 0x00000000 0x09081002
    0x50: 0x06020001 0x00000000 0x00205002 0x2f000203
    0x60: 0x00000200 0x00000000 0x00000000 0x00000000
    0x70: 0x00000000 0x00000000 0x00000000 0x00000000
    0x80: 0x00000000 0x00000000 0x00000000 0x00000000
    0x90: 0x00000000 0x00000000 0x00000000 0x00000000
    0xa0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xb0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xc0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xd0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xe0: 0x00000000 0x00000000 0x00000000 0x00000000
    0xf0: 0x00000000 0x00000000 0x00000000 0x00000000

> And - any chance to try a different monitor? Either radeonfb fails to 
> setup this particular video mode properly or there's a problem with 
> this particular radeon variant.

OK, I tried a ViewSonic VX715 LCD, and it works! The monitor's information
panel says H Freq: 60.08kHz, V Freq: 56.36Hz, Pixel Clock: 101.42MHz,
Resolution: 1280x1024. However, the screen often blanks out for 3 or 4
seconds. I'm not sure what triggers it, but perhaps scrolling? Running
rain(6) or worms(6) doesn't do it, but paging through a file with less(1)
often will.

BTW, I'm using the 15-pin VGA connector on the Radeon and the monitor,
since I don't have an ADC to DVI adapter. The Apple Studio Display had
been connected to the ADC. dmesg with the ViewSonic attached follows:

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 4.99.24 (GREYFOX) #16: Sat Jul 21 19:21:25 CDT 2007
	khym@cheetah.azeotrope.org:/usr/obj.macppc/sys/arch/macppc/compile/GREYFOX
total memory = 832 MB
avail memory = 800 MB
timecounter: Timecounters tick every 10.000 msec
init_interrupt: found OpenPIC @ pa 0x80040000, 0x80040000
mainbus0 (root)
cpu0 at mainbus0: 7400 (Revision 0.9), ID 0 (primary)
cpu0: HID0 8094c0a4<EMCP,DOZE,DPM,EIEC,ICE,DCE,SGE,BTIC,BHT>, powersave: 1
cpu0: 500.00 MHz, no-parity 1MB WB L2 cache (PB SRAM) at 2:1 ratio
cpu1 at mainbus0: ID 1
cpu1: processor off-line; multiprocessor support not present in kernel
uninorth0 at mainbus0
pci0 at uninorth0 bus 0
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 11 function 0
pchb0: Apple Computer UniNorth AGP Interface (rev. 0x00)
radeonfb0 at pci0 dev 16 function 0: ATI Technologies Radeon QD
radeonfb0: unable to map IO registers!
RADEON_BIOS_4_SCRATCH = 00000000
RADEON_FP_GEN_CNTL = 00030048
RADEON_FP2_GEN_CNTL = 00000000
RADEON_TMDS_CNTL = 01000000
RADEON_TMDS_TRANSMITTER_CNTL = 10000080
RADEON_TMDS_PLL_CNTL = 00000a1b
RADEON_LVDS_GEN_CNTL = 00000000
RADEON_FP_HORZ_STRETCH = 00000000
RADEON_FP_VERT_STRETCH = 00000000
radeonfb0: Video BIOS not present
radeonfb0: No video BIOS, using default clocks
no suitable DFP table present
TMDS_PLL dot clock 12000 pll a1b
TMDS_PLL dot clock -1 pll a3f
TMDS_PLL dot clock 0 pll 0
TMDS_PLL dot clock 0 pll 0
radeonfb0: refclk = 27.000 MHz, refdiv = 12 minpll = 125000, maxpll = 350000
No connector info in BIOS!
Port #0:
    conn = 4
    ddc = 2
    dac = 0
    tmds = 0
radeonfb0: using static EDID
max_dotclock according to supported modes: 135000
Vendor: [VSC] ViewSonic
Product: [4319] VX715
Serial number: P210506C1839
Manufactured 2005 Week 6
EDID Version 1.3
EDID Comment: 
Video Input: e
	Analog
	-0.7, 0.3V
	Seperate syncs
	Composite sync
	Sync on green
Gamma: 2.20
Max Size: 34 cm x 27 cm
Features: 2e
	DPMS active-off
	RGB
	Standard color space
	Preferred timing
Chroma Info:
	Red X: 0.636
	Red Y: 0.636
	Grn X: 0.309
	Grn Y: 0.582
	Blu X: 0.142
	Blu Y: 0.099
	Wht X: 0.313
	Wht Y: 0.329
Range:
	Horizontal: 30 - 82 kHz
	Vertical: 50 - 85 Hz
	Max Dot Clock: 140 MHz
Video modes:
	1280x1024 @ 75Hz
	1024x768 @ 75Hz
	1024x768 @ 70Hz
	1024x768 @ 60Hz
	800x600 @ 75Hz
	800x600 @ 72Hz
	800x600 @ 60Hz
	800x600 @ 56Hz
	640x480 @ 75Hz
	640x480 @ 73Hz
	640x480 @ 60Hz
	1280x1024 @ 60Hz
	1152x864 @ 75Hz
	1024x768 @ 85Hz
	800x600 @ 85Hz
	640x480 @ 85Hz
	1280x1024 @ 60Hz
Preferred mode: 1280x1024 @ 60Hz
Port #1:
    conn = 2
    ddc = 3
    dac = 0
    tmds = 1
radeonfb0: using static EDID
max_dotclock according to supported modes: 135000
Vendor: [VSC] ViewSonic
Product: [4319] VX715
Serial number: P210506C1839
Manufactured 2005 Week 6
EDID Version 1.3
EDID Comment: 
Video Input: e
	Analog
	-0.7, 0.3V
	Seperate syncs
	Composite sync
	Sync on green
Gamma: 2.20
Max Size: 34 cm x 27 cm
Features: 2e
	DPMS active-off
	RGB
	Standard color space
	Preferred timing
Chroma Info:
	Red X: 0.636
	Red Y: 0.636
	Grn X: 0.309
	Grn Y: 0.582
	Blu X: 0.142
	Blu Y: 0.099
	Wht X: 0.313
	Wht Y: 0.329
Range:
	Horizontal: 30 - 82 kHz
	Vertical: 50 - 85 Hz
	Max Dot Clock: 140 MHz
Video modes:
	1280x1024 @ 75Hz
	1024x768 @ 75Hz
	1024x768 @ 70Hz
	1024x768 @ 60Hz
	800x600 @ 75Hz
	800x600 @ 72Hz
	800x600 @ 60Hz
	800x600 @ 56Hz
	640x480 @ 75Hz
	640x480 @ 73Hz
	640x480 @ 60Hz
	1280x1024 @ 60Hz
	1152x864 @ 75Hz
	1024x768 @ 85Hz
	800x600 @ 85Hz
	640x480 @ 85Hz
	1280x1024 @ 60Hz
Preferred mode: 1280x1024 @ 60Hz
aperbase = 2550136832
RADEON_MC_FB_LOCATION = 9bff9800
RADEON_MC_AGP_LOCATION = 9bff9c00
RADEON_DAC_CNTL2 = 00000000
RADEON_DAC_CNTL2 = 00000000
RADEON_DISP_HW_DEBUG = 00000000
RADEON_DAC_CNTL = ff000102
RADEON_TV_DAC_CNTL = 00000000
radeonfb0: 64 MB aperture at 0x98000000, 512 KB registers at 0x90080000
radeonfb0: display 0: initial virtual resolution 1280x1024 at 32 bpp
radeonfb0: port 0: physical 1280x1024 60Hz
fpbtr = 0xd4c34000
init engine
init screen called, existing 1
CRTC_GEN_CNTL = 03000600
RADEON_CRTC_EXT_CNTL = 00000048
CRTC_H_TOTAL_DISP = 009f00d2
FP_H_TOTAL_DISP = 009f00d2
CRTC_H_SYNC_STRT_WID = 000e0530
FP_H_SYNC_STRT_WID = 000e0530
CRTC_V_TOTAL_DISP = 03ff0429
FP_V_TOTAL_DISP = 03ff0429
CRTC_V_SYNC_STRT_WID = 00030400
FP_V_SYNC_STRT_WID = 00030400
dot clock: 108000
outfreq: 216000
post divider: 2 (mask 10000)
feedback divider: 96
RADEON_PPLL_REF_DIV = 0000000c
RADEON_PPLL_CNTL = 0000a430
RADEON_CRTC_MORE_CNTL = 00000000
RADEON_CRTC_EXT_CNTL = 00000048
RADEON_CRTC_GEN_CNTL = 03000600
RADEON_CLOCK_CNTL_INDEX = 00000000
wsdisplay0 at radeonfb0 kbdmux 1: console (fb, vt100 emulation)
wsmux1: connecting to wsdisplay0
RADEON_FP_GEN_CNTL = 000300cc
RADEON_FP2_GEN_CNTL = 00000000
direct rendering for radeonfb0 unsupported
[...]
-- 
Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: khym@azeotrope.org |  they raise a paw / the bat, the cat /
FurryMUCK: Dahan         |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 31 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++