[haiku-development] Re: RFC : re-factoring multimon to be generic (non-radeon)

  • From: Alexander von Gluck <kallisti5@xxxxxxxxxxx>
  • To: <haiku-development@xxxxxxxxxxxxx>
  • Date: Sat, 23 Jul 2011 23:05:02 -0500

On Sun, 24 Jul 2011 04:01:41 +0200, François Revol wrote:
Le samedi 23 juillet 2011 à 17:27 -0500, Alexander von Gluck a écrit :
> I would be heavily against this. It's okay to move into a private
> shared header for now, but really, this API sucks, and should not
> ever
> be made public.

I agree, the way we handle it with now... sucks to say the least.

I believe the proper way would be to pass an extra argument to
accelerants specifying which screen to act on, or something alike.

This would allow more flexibility, including different resolution on
each screen, which I don't think is doable yet, is it ?

With https://dev.haiku-os.org/changeset/42462 I am pretty close structure- wise to being able to manage multiple monitors and set the modes on each
within the radeon_hd driver.

Below is an example detection result of my post 42462 changes.
We are populating a struct with current monitor information and its location
on the card.

KERN: radeon_hd: Currently detected monitors===============
KERN: radeon_hd: Display #0 active = true
KERN: radeon_hd:  + connection: DAC
KERN: radeon_hd:  + connection index: 1
KERN: radeon_hd:  + limits: Vert Min/Max: 56/75
KERN: radeon_hd:  + limits: Horz Min/Max: 31/83
KERN: radeon_hd: Display #1 active = false
KERN: radeon_hd: ==========================================

the detect_displays function (http://bit.ly/nXp0gP) in the driver will
re-detect and repopulate the display struct above with the current monitor info. (maybe a future "Detect Displays" button in the screen preferences applet if the
driver supports it?)

Still, I think it makes sense to factor it out as other drivers might at
least try to provide the same limited multiscreen support meanwhile.
As Axel suggested, it could go to a private header probably.

Done in http://pastebin.com/Tksu5h5i

Going to wait again for any push back before committing. While this isn't a large change... I definitely want to make sure there isn't any *huge* push-back before
committing it :)


Thanks!

 -- Alex

Other related posts: