On Mon, Mar 01, 2004 at 10:10:40PM +0000, Alan Hourihane wrote:
>I'm looking to enhance the parser in XFree86 so that a lot of redundant
>code in the current drivers that implement the 'mergedfb' mode can
>be eliminated such that they don't have to do all the monitor munging
>in the driver.
>
>So here's two variants of the modifications to the XF86Config I'm
>thinking of, and both would remove the current 'Monitor' keyword from
>the Screen Section, in favour of the SubSection keyword being the actual
>monitor it's referencing.
>
>I've already started poking around the parser to implement this, but
>I thought I'd ask for comments first before taking it too far, and
>to ask for possible enhancements that others can think of too.

The approach I was following up a while ago but never finished was
something like this:

Section "Screen"
        Identifier "Screen0"
        Device     "Videocard0"
        Monitor 0 "Monitor0"
        Monitor 1 "Monitor1" RightOf "Monitor0"
        DefaultDepth 24
        SubSection "Display"
                Depth 16
                Virtual 0 1600 1200
                Virtual 1 1024 768
                Modes 0 "1600x1200" "1280x1024" "1024x768"
                Modes 1 "1024x768" "800x600" "640x480"
        EndSubSetion
        SubSection "Display"
                Depth 24
                Virtual 0 1600 1200
                Virtual 1 1024 768
                Modes 0 "1600x1200" "1280x1024" "1024x768"
                Modes 1 "1024x768" "800x600" "640x480"
        EndSubSetion
EndSection

Explicitly tying numbers to the monitor entries would be optional, as
would supplying per-monitor parameters in the Display subsections.

The idea of MetaModes (i.e., mode combinations) that I think Andy Ritger
mentioned a while back would be useful too.

Figuring out how the configuration information is represented will be useful
in working out how to represent the information internally for the drivers.
As much as possible should be auto-configured by default though.

I got the parser changes, and the data structure changes done, and had
made a start on the other pieces.  Allowing a high level of flexibility
in the configuration syntax was complicating the implementation though.
It might be that a different method would simplify that, which would
definitely be a good thing.

>
>Option 1....
>
>Section "Screen"
>       Identifier "Screen0"
>       Device     "Videocard0"
>       DefaultDepth     24
>       SubSection "Monitor0"
>               SubSection "Display"
>                       Depth     16
>                       Modes    "1024x768" "800x600" "640x480"
>               EndSubSection
>               SubSection "Display"
>                       Depth     24
>                       Modes    "1024x768" "800x600" "640x480"
>               EndSubSection
>       EndSubSection
>       SubSection "Monitor1"
>               SubSection "Display"
>                       Depth     16
>                       Modes    "1024x768" "800x600" "640x480"
>               EndSubSection
>               SubSection "Display"
>                       Depth     24
>                       Modes    "1024x768" "800x600" "640x480"
>               EndSubSection
>       EndSubSection
>EndSection
>
>Or, Option 2.
>
>Section "Screen"
>       Identifier "Screen0"
>       Device     "Videocard0"
>       DefaultDepth     24
>       SubSection "Monitor0"
>               Depth     16
>               Modes    "1024x768" "800x600" "640x480"
>       EndSubSection
>       SubSection "Monitor0"
>               Depth     24
>               Modes    "1024x768" "800x600" "640x480"
>       EndSubSection
>       SubSection "Monitor1"
>               Depth     24
>               Modes    "1024x768" "800x600" "640x480"
>       EndSubSection
>EndSection

I'd prefer option 2 out of these because of the reduced redundancy.  If
we want to handle meta modes, perhaps they could be handled via a regular
"Display" subsection.  You then need a method for specifying the monitor
layout.  I chose an approach analogous to how we specify the layout of
multiple screens, and that should work here too.

Additional things come up, like how the monitor view port moves within
the logical screen, how the mode switching hot keys work, etc.

I'd suggest we come up with something that can cope with the types of
things we expect to need, get the basics implemented first, then get
into the nitty gritty details of some of the fancier stuff.

David
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to