[haiku-development] Re: Accelerant multi-head support
- From: "Alexander von Gluck IV" <kallisti5@xxxxxxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Wed, 19 Sep 2018 13:56:18 +0000
September 19, 2018 8:43 AM, "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx> wrote:
19 septembre 2018 15:30 "Alexander von Gluck IV" <kallisti5@xxxxxxxxxxx> a
écrit:
Let's keep things simple.
yeah, that's why I leaned this direction.
Side question: do we assume each output port is an "head", or do we actually
require that there
is a display connected? In the latter case, what happens if one unplugs the
first display? Does
the second one suddenly becomes first? This sounds dangerous (let's say the
user does this between
two accelerant hook calls which were supposed to run on the same display...).
I was planning on the accelerants only reporting "attached displays".
I figured letting the app_server know about every port the card could ever
possibly use as being excessive.
One aspect of video cards is HPD (hot plug detection) to tell the OS when a
monitor is changed.
I think adding a single optional hook for the accelerant to tell the app_server
to "recheck the
HEAD_COUNT + display inventory would be sufficient."
Maybe GET_HEAD_COUNT should instead be something that returns
identifier/cookies for each display
(which may happen to be an index in an array), and then all other calls use
that token to identify
the display, no matter if the user plugs and unplugs it, etc.
I was thinking we could just use the monitor_info struct itself as the unique
identifier at the app_server
level. it includes a lot of "fixed" information about the attached display
(including the EDID reported
serial number which is "sometimes unique, sometimes not"). If two displays
have identical information,
monitor_info still includes the port attachment information so every one should
be "unique".
We could also assign some random identifier to a display and pass it in
monitor_info, but leaving it up
to the accelerant to decide when a random identifier should change might create
inconsistent
behavior between drivers.
-- Alex
Other related posts: