G550 Dual-head questions

Alex Deucher alexdeucher at gmail.com
Sat Jul 23 22:13:38 PDT 2005


On 7/23/05, Daniil V. Kolpakov <dan at solutions.lv> wrote:
> Hello developers,
> 
> I've bought a Matrox G550 recently, and a second monitor, too. Now I'm having
> some dualhead.
> 
> But, uh, dualhead is not fun without DRI, and xv is working on the first head
> only. I've googled alot and I've read pretty anything related to the dualhead
> on Matrox. :) I know I could download a binary driver from Matrox to enable
> MergedFB mode, but that's too scary.

Only crtc1 has a video overlay, so Xv using the overlay will always be
limited to crtc1.  Textured video will however work correctly on
either head in mergedfb mode.

> 
> Basically, I've one question, which I would like to adress to the current mga
> driver maintainer and other driver developers:
> 
>   What's the problem in implementing MergedFB mode without MGA_HAL?

Nothing.  I had planned to tackle it at one point myself, but never
got around to it.  How I don't have any more working mga hardware.

> 
> Currently I have the following setup:
>  - Matrox G550 (plain dualhead, not the Dual-DVI one)
>  - one CRT monitor (MAG 570FD, 1024x768 FD Trinitron)
>  - one analog LCD monitor (Samsung SyncMaster 152x, 1024x768)
> 
> My thoughts:
> 
>  1) G550 has videomodes like 2048x768;
>  2) It's possible to setup the 1024x768 mode with virtual size
>     of 2048x768 in the clone mode; DRI&xv works
>  3) mga driver can do dual-head, so I guess it could program both heads
>     to use the same framebuffer, with different viewports?

Exactly.  that bascially all mergedfb is.  One big framebuffer with
two viewports looking into it.  You'll need to program both crtcs and
write an adjustframe() function to handle the crtc offsets.  One
possible limitation is the max coordinates size handled by the drawing
engine.  The size of your merged desktop will be limited by the max
size your drawing engine can handle.

> 
> I'm not C programmed and I've never tried to hack XFree86 or XOrg before I've
> got this G550, but I'm so curious now that I've downloaded sources (I had to
> use Mandrake SRPMS since the XOrg release doesn't compile with GCC4) and
> started to make stuppid changes here and there; after messing with
> pMga->Restore I've eventially got something like a 1024x384 (actually
> 1024x768 interlaced with garbage ;)) on the first monitor, showing the upper
> top of the 2048x768 framebuffer, and a 1024x768 on the second screen showing
> the mouse-controllable viewport, just like in the plain clone/singlehead
> mode. Later I've realised that it was not garbage on the first head
> - it was the wrong virtual size, and the every second line actually was the
> first line prolonged.

the easiest way to start messing with dualhead, IMHO, is to try and
get the first instance of the driver to initialize the proper mode on
each crtc.  Just start out with a cloned desktop.  Once you get that
create a large virtual desktop and hack the adjustframe() function to
set the crtc offsets to different values.  then work from there to
integrate some of the other more advanced features.

> 
> So far, I understand very little in the sources, but I would like to hear
> something from the mga driver developers, and maybe from the radeon driver
> developers as well, since radeon driver has MergedFB working.

Take a look at the sis driver too.  Thomas has done most of the
mergedfb pioneering.  In the radeon driver, I separated out most of
the mergedfb stuff into radeon_mergedfb.c/h when I added mergedfb
support to radeon.  If you have any questions along the way feel free
to ask.  I'd be happy to explain anything you have questions about.

Alex

> 
> Thanks for reading,
> 
> --Daniil
> 
> --
> /dev/brains: permission denied
> 
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.gnu.org/philosophy/no-word-attachments.html



More information about the xorg mailing list