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

  • From: "Alexander von Gluck IV" <kallisti5@xxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 19 Sep 2018 14:04:55 +0000

September 19, 2018 8:56 AM, "Alexander von Gluck IV" <kallisti5@xxxxxxxxxxx> 
wrote:

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."

I just realized I only read the first part of your question :-)

As for changing monitors being dangerous, most of the driver code i've seen has 
been pretty careful
to continuously check the "validity" of the screen.  In the case of things like 
DisplayPort, we really
don't "access memory/registers down the DisplayPort cable", so the risk is 
minimal. (using radeon_hd
as an example, we run card functions to manage the DisplayPort daisy-chain and 
bit-bang local registers
to probe it)

If the accerant attempts a set_display_mode on a screen which is unplugged (or 
otherwise invalid), the
set_display_mode could always return a non-B_OK status_t which would be a hint 
to the app_server to stop
what it's doing and trigger another rescan of the attached displays.


 -- Alex

Other related posts: