RE: radeon RV730 in iMac troubleshooting

2023-12-06 Thread Josh Moyer
.mrg. wrote:
>ah, i am reminded of this channge that went in recently:
>   https://mail-index.netbsd.org/source-changes/2023/11/06/msg148463.html
>can you try a -current snapshot and see if it works less badly?

Yes.  I tried -current at HEAD/202311170650Z and still saw the black screen at 
init(8) time. :(

>> I hacked kern/init_main.c to panic on line 739 before the display goes dark 
>> and the last two dmesgs are:
>> 
>> pci_mem_find: void region (dev/pci/pci_map.c)
>
> hmm, this one happens when the mapping size is 0.  can you post the
> output of "pcictl pciN dump -d 0", for whatever "radeon0 at pciN"
>  matches the dmesg logs, for a boot that disabled radeon0.

Under 10.0_RC1, I ran and saw the following:

meadow# pcictl pci1 dump -d 0
PCI configuration registers:
  Common header:
0x00: 0x94881002 0x0017 0x0300 0x00800040

Vendor Name: ATI Technologies (0x1002)
Device Name: Mobility Radeon HD 4670 (0x9488)
Command register: 0x0007
  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: off
  System error (SERR): off
  Fast back-to-back transactions: off
  Interrupt disable: off
Status register: 0x0010
  Immediate Readiness: off
  Interrupt status: inactive
  Capability List support: on
  66 MHz capable: off
  User Definable Features (UDF) support: off
  Fast back-to-back capable: off
  Data parity error detected: off
  DEVSEL timing: fast (0x0)
  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+multifunction (0x80)
Latency Timer: 0x00
Cache Line Size: 256bytes (0x40)

  Type 0 ("normal" device) header:
0x10: 0xc00c 0x 0xd0420004 0x
0x20: 0x2001 0x 0x 0x00b6106b
0x30: 0xd041 0x0050 0x 0x0100

Base address register at 0x10
  type: 64-bit prefetchable memory
  base: 0xc000
Base address register at 0x18
  type: 64-bit nonprefetchable memory
  base: 0xd042
Base address register at 0x20
  type: I/O
  base: 0x2000
Base address register at 0x24
  not implemented
Cardbus CIS Pointer: 0x
Subsystem vendor ID: 0x106b
Subsystem ID: 0x00b6
Expansion ROM Base Address Register: 0xd041
  base: 0xd040
  Expansion ROM Enable: on
  Validation Status: Validation not supported
  Validation Details: 0x0
Capability list pointer: 0x50
Reserved @ 0x38: 0x
Maximum Latency: 0x00
Minimum Grant: 0x00
Interrupt pin: 0x01 (pin A)
Interrupt line: 0x00

  Capability register at 0x50
type: 0x01 (Power Management)
  Capability register at 0x58
type: 0x10 (PCI Express)
  Capability register at 0xa0
type: 0x05 (MSI)

  PCI Power Management Capabilities Register
Capabilities register: 0x0603
  Version: 1.2
  PME# clock: off
  Device specific initialization: off
  3.3V auxiliary current: self-powered
  D1 power management state support: on
  D2 power management state support: on
  PME# support D0: off
  PME# support D1: off
  PME# support D2: off
  PME# support D3 hot: off
  PME# support D3 cold: off
Control/status register: 0x
  Power state: D0
  PCI Express reserved: off
  No soft reset: off
  PME# assertion: disabled
  Data Select: 0
  Data Scale: 0
  PME# status: off
Bridge Support Extensions register: 0x00
  B2/B3 support: off
  Bus Power/Clock Control Enable: off
Data register: 0x00

  PCI Message Signaled Interrupt
Message Control register: 0x0080
  MSI Enabled: off
  Multiple Message Capable: no (1 vector)
  Multiple Message Enabled: off (1 vector)
  64 Bit Address Capable: on
  Per-Vector Masking Capable: off
  Extended Message Data Capable: off
  Extended Message Data Enable: off
Message Address (lower) register: 0x
Message Address (upper) register: 0x
Message Data register: 0x

  PCI Express Capabilities Register
Capability register: 0x0012
  Capability version: 2
  Device type: Legacy PCI Express Endpoint device
  Slot implemented: off
  Interrupt Message Number: 0x00
Device Capabilities Register: 0x012c8fa0
  Max Payload Size Supported: 128 bytes max
  Phantom Functions Supported: not available
  Extended Tag Field Supported: 8bit
  Endpoint L0 Acceptable Latency: 2us - 4us
  Endpoint L1 Acceptable Latency: More than 64us
  Attention Button Present: off
 

re: radeon RV730 in iMac troubleshooting

2023-11-13 Thread matthew green
ah, i am reminded of this channge that went in recently:

   https://mail-index.netbsd.org/source-changes/2023/11/06/msg148463.html

can you try a -current snapshot and see if it works less badly?


.mrg.


re: radeon RV730 in iMac troubleshooting

2023-11-13 Thread matthew green
some random ideas/info about this, no real help yet.

Josh Moyer writes:
> I hacked kern/init_main.c to panic on line 739 before the display goes dark 
> and the last two dmesgs are:
> 
> pci_mem_find: void region (dev/pci/pci_map.c)

hmm, this one happens when the mapping size is 0.  can you post the
output of "pcictl pciN dump -d 0", for whatever "radeon0 at pciN"
matches the dmesg logs, for a boot that disabled radeon0.

> radeon0: map 5 failed (could not find corresponding source file)

this comes from sys/external/bsd/drm2/pci/drm_pci.c:

115 if (pci_mapreg_info(pa->pa_pc, pa->pa_tag, reg, type,
116 >bm_base, >bm_size, >bm_flags) != 0) {
117 aprint_debug_dev(self, "map %u failed\n", unit);

which is basically reporting the same error.  BAR5 has no size.

this may be related to it not doing a POST properly, and our code
isn't properly doing that first.. eg, radeon_r300.c:r300_init()
calls radeon_boot_test_post_card(), which will do POST if it has
not been done... though it relies upon vbios being found.


.mrg.