[haiku-development] display_adapter: howto register child displays properly?

  • From: Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx>
  • To: haiku-development <haiku-development@xxxxxxxxxxxxx>
  • Date: Sun, 11 Jan 2015 19:25:22 +0100

Started some more work on display_adapter, but I just get stuck on new
style driver writing.

The idea was that every display_adapter will have an adapter device,
and that adapter will then register displays attached. (It may or may
not be the best way to do this, but atm that is what I am doing, so
bear with me.)

This is what happens:
The display adapters are found, and running:
KERN: DBUG_support: scanning at bus: acpi path: \_SB_.PCI0.GFX0
KERN: displayadapter_support: found at bus: aKERN: cpi path: \_SB_.PCI0.GFX0
KERN: publish device: node 0x8281d7d0, path display_adapter/0, module
drivers/display_adapter/display_adapter/device_v1

It then scans displays:
KERN: Display ID = 1024
KERN: name: DD01
KERN: Child _adr 256
KERN: name: LCDD
KERN: Child _adr 1024
KERN: publish device: node 0x82bb5338, path display_adapter/0/LCDD,
module drivers/display_adapter/display_adapter/display/device_v1

However, display_init is never called and no errors in syslog.

So can anyone tell me what I should do different? It's a new-style driver.

The code is here:
http://cgit.haiku-os.org/haiku/tree/src/add-ons/kernel/drivers/display

Code of interest is display_adapter::register_displays and display.cpp

Please help save my sanity :)

/Fredrik Holmqvist, TQH

Other related posts: