[haiku-development] Re: Accelerant multi-head support

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 19 Sep 2018 23:17:50 +0200

Am 19/09/2018 um 16:25 schrieb Alexander von Gluck IV:

As for displays with no EDID information, i'm not sure we could do
anything about that unless we pass information about every port on
the card back to the OS and do a complex port-based mode setting process. (which isn't a bad idea... but we would potentially still
run into the same issue if a display is swapped and the video mode
not changed)

Since cards can have several DVI ports, we would need to add a
connector type + index argument to every hook.

The monitor_info is really only needed to identify a monitor for assigning stored settings, and to show monitor info to the user. It's basically independent from the port in use, but of course, it would be nice to know which port you're on.

I would have a hook which returns all possible ports (either by a fixed index or a fixed identifier, whatever works better for the driver in question), and then the app_server can iterate over them to retrieve the monitor_info (which can tell the app_server: no monitor attached).

The accelerant methods would always only get that identifier/index, like a cookie; they are given out by the driver itself, the app_server only stores it.

Something like this:
        count = get_port_count();
        for (i = 0; i < count; i++) {
                port[i] = get_port_id(i);
                get_monitor_info(port[i], &info);
        }
        [...]
        set_display_mode(port[i], ...);

Bye,
   Axel.

Other related posts: