How to handle dualhead on single card? Any ideas?

Possible solution
1) Driver creates Core object
2) Core object
2.1) detect hardware configuration
2.2) grab resources (fb, mmio, ports)
2.3) creates VgaIO[] (size == 1, if there is only one CRT)
2.3.1) every VgaIO object register DeviceDataChannelAPI (for grab information about monitors)
2.4) create configurations[] (in configuration we should have CRT index)
2.5) register FrameBufferAPI

Problems:
AbsractFrameBufferDriver closely tied to device, so we can't create multiple FB object from one driver? Or i'm wrong?

Child devices

The driver for the graphics card should detect that there are multiple heads. If that is the case, it should create 1 device for every head, set the correct drivers for those devices and register them with the device manager.

This parent-child relationship between devices is already used in the IDE driver. For every partition found on a disk a device is instantiated with the appropriate driver.

So more in detail.

- There is device A that is the parent device, it is detected by some means (e.g. a pci finder)
- The driver for device A detects that there are multiple heads:
- The driver for device A instantiates device B and C and sets drivers for them.
- The driver for device A registers device B and C with the device manager.
- Both the drivers for devices B and C register a FrameBufferAPI with their respective devices.

If device A stops, it also stops device B and C.

Ewout

What to do with memory

What to do with memory layout? Is be fixed or changed dinamicaly?

we are on irc

If you want quicker answers, we are now on irc : irc://irc.oftc.net/JNode.org
Smiling

Fabien

should be done by DeviceToDriverFinder

I think that it's to the DeviceToDriverFinder to create 2 drivers (create 2 instances of the same class).
The 2 instances of the driver must be parameterized through a parameter like "screenid" (with value 0 and 1 for dual head).

Fabien

How to share resources?

How to share resources? Is memory layout fixed or dynamic?

...boot

p.s. we need simple and elegant solution.. Eye-wink