Bug 1097 - [PATCH] [Matrox/MGA] Add Pseudo-Xinerama to MergedFB for mga
[PATCH] [Matrox/MGA] Add Pseudo-Xinerama to MergedFB for mga
Status: RESOLVED WONTFIX
Product: xorg
Classification: Unclassified
Component: Driver/mga
git
x86 (IA32) Linux (All)
: high normal
Assigned To: ajax at nwnk dot net
Xorg Project Team
2011BRB_Reviewed
: love, patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-08-16 10:26 UTC by Jürg Billeter
Modified: 2014-03-20 21:34 UTC (History)
5 users (show)

See Also:


Attachments
Patch to add pseudo-xinerama support to the mga driver (26.80 KB, patch)
2004-08-16 10:26 UTC, Jürg Billeter
no flags Details | Splinter Review
Patch to add pseudo-xinerama support to the mga driver (26.49 KB, patch)
2004-08-16 10:36 UTC, Jürg Billeter
no flags Details | Splinter Review
mga-pseudoxinerama-1.patch (27.31 KB, patch)
2005-12-22 03:22 UTC, ajax at nwnk dot net
no flags Details | Splinter Review
Rediff against current git repository (26.96 KB, patch)
2006-12-25 16:20 UTC, Lorenz Huedepohl
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jürg Billeter 2004-08-16 10:26:07 UTC
The mga driver lacks pseudo-xinerama in MergedFB mode, i.e. MergedFB isn't
really usable with mga and a desktop environment as no app recognizes the two
monitors.

I've copied the pseudo-xinerama code from the radeon driver (written by Alex
Deucher) and adapted it to the structure of the mga driver. It works so far nice
for me but I don't have more than one mga machine to test.
Comment 1 Jürg Billeter 2004-08-16 10:26:48 UTC
Created attachment 650 [details] [review]
Patch to add pseudo-xinerama support to the mga driver
Comment 2 Jürg Billeter 2004-08-16 10:36:10 UTC
Created attachment 651 [details] [review]
Patch to add pseudo-xinerama support to the mga driver

Added the wrong file before, this should be the right one...
Comment 3 Thomas Winischhofer 2004-08-16 17:15:42 UTC
Erm... don't want to appear picky but that code was actually written by me. Alex
took it (including the comments) from the SiS driver.
Comment 4 Jürg Billeter 2004-08-17 00:57:48 UTC
Sorry, didn't want to credit the wrong person. Thank you for the initial
implementation, only that makes MergedFB really usable.
Comment 5 ajax at nwnk dot net 2005-12-22 03:22:27 UTC
Created attachment 4138 [details] [review]
mga-pseudoxinerama-1.patch

rediff against modular.
Comment 6 Erik Andren 2006-04-18 04:55:58 UTC
adding patch keyword. Also has this patch been merged to trunk?
Comment 7 Lorenz Huedepohl 2006-12-24 15:23:06 UTC
Unfortunately, in xorg 7.2 the patch no longer works. Could someone 
knowledgeable adapt it? It was quite useful (and stable, used it for over a 
year without problems!)
Comment 8 Lorenz Huedepohl 2006-12-25 16:20:35 UTC
Created attachment 8216 [details] [review]
Rediff against current git repository

Rediff against current code from git repository. Created by me without any real
knowledge of X11, just adapted the patch to fit the new code so use with care!

One thing though: Some files were missing includes to "config.h", this could be
a bug on its own.

To use this patch, one has to manually insert "#define USEMGAHAL" in config.h
after running autogen.sh and configure, as I have no idea of autoconf and how
to adapt configure.ac (or how to do this properly another way :)

After your review, i suggest to include pseudo-xinerama permanently in HEAD,
the patch looks quite non-intrusive to me (that is, a complete xorg-outsider ;)
Comment 9 Tilman Sauerbeck 2006-12-26 03:55:42 UTC
Getting the HAL module working with our current driver (as opposed to the stuff
Matrox ships) is a PITA anyway -- so that's why we this bug isn't really of high
priority to me.

IMO this patch can go in once we have figured out how to mergedfb on our own.
Comment 10 Daniel Stone 2007-02-27 01:23:52 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 11 Tilman Sauerbeck 2007-10-03 12:33:45 UTC
MergedFB is dead, we have working RandR support now.
Comment 12 mephinet 2007-10-24 09:18:10 UTC
(In reply to comment #11)
> MergedFB is dead, we have working RandR support now.

Can you please add a pointer to a demo configuration using randr with dual head setup working?
Comment 13 Lorenz Huedepohl 2008-07-10 14:12:47 UTC
I would use RandR with joy, just it doesn't work with a G550 - this patch always has.

Using X 7.3-96.1 RandR reports only one output:

> xrandr
Screen 0: minimum 640 x 350, current 1280 x 1024, maximum 2560 x 1024
default connected 1280x1024+0+0 0mm x 0mm
   1280x1024      85.0*    75.0     60.0  
   1280x960       85.0     60.0  
   1152x864       85.0     75.0  
   1152x768       55.0  
   1024x768       85.0     75.0     70.0     60.0  
   832x624        75.0  
   960x529        75.0  
   800x600        85.0     75.0     72.0     60.0     56.0  
   640x480        85.0     75.0     73.0     60.0  
   720x400        88.0     70.0     85.0  
   640x400        85.0  
   640x350        85.0  
   2560x1024      85.0

For xorg.conf, see below.

So for me this bug is still open, as I can not get accelerated dual-head on my G550 in any way.

Any chance that this could be fixed on the MergedFB route? If not, should I open a RandR bug for my G550 setup?

xorg.conf:

Section "Files"
  FontPath     "/usr/share/fonts/misc:unscaled"
  FontPath     "/usr/share/fonts/local"
  FontPath     "/usr/share/fonts/75dpi:unscaled"
  FontPath     "/usr/share/fonts/100dpi:unscaled"
  FontPath     "/usr/share/fonts/Type1"
  FontPath     "/usr/share/fonts/URW"
  FontPath     "/usr/share/fonts/Speedo"
  FontPath     "/usr/share/fonts/PEX"
  FontPath     "/usr/share/fonts/cyrillic"
  FontPath     "/usr/share/fonts/latin2/misc:unscaled"
  FontPath     "/usr/share/fonts/latin2/75dpi:unscaled"
  FontPath     "/usr/share/fonts/latin2/100dpi:unscaled"
  FontPath     "/usr/share/fonts/latin2/Type1"
  FontPath     "/usr/share/fonts/latin7/75dpi:unscaled"
  FontPath     "/usr/share/fonts/baekmuk:unscaled"
  FontPath     "/usr/share/fonts/japanese:unscaled"
  FontPath     "/usr/share/fonts/kwintv"
  FontPath     "/usr/share/fonts/truetype"
  FontPath     "/usr/share/fonts/uni:unscaled"
  FontPath     "/usr/share/fonts/CID"
  FontPath     "/usr/share/fonts/ucs/misc:unscaled"
  FontPath     "/usr/share/fonts/ucs/75dpi:unscaled"
  FontPath     "/usr/share/fonts/ucs/100dpi:unscaled"
  FontPath     "/usr/share/fonts/hellas/misc:unscaled"
  FontPath     "/usr/share/fonts/hellas/75dpi:unscaled"
  FontPath     "/usr/share/fonts/hellas/100dpi:unscaled"
  FontPath     "/usr/share/fonts/hellas/Type1"
  FontPath     "/usr/share/fonts/misc/sgi:unscaled"
  FontPath     "/usr/share/fonts/xtest"
  FontPath     "/opt/kde3/share/fonts"
  InputDevices "/dev/gpmdata"
  InputDevices "/dev/input/mice"
EndSection

Section "ServerFlags"
  Option       "AllowMouseOpenFail" "on"
  Option       "ZapWarning" "on"
EndSection

Section "Module"
  Load         "dbe"
  Load         "type1"
  Load         "freetype"
  Load         "extmod"
  Load         "glx"
  Load         "dri"
EndSection

Section "InputDevice"
  Driver       "kbd"
  Identifier   "Keyboard[0]"
  Option       "Protocol" "Standard"
  Option       "XkbLayout" "de"
  Option       "XkbModel" "microsoftpro"
  Option       "XkbRules" "xfree86"
  Option       "XkbVariant" "nodeadkeys"
EndSection

Section "InputDevice"
  Driver       "mouse"
  Identifier   "Mouse[1]"
  Option       "Buttons" "9"
  Option       "Device" "/dev/input/mice"
  Option       "Name" "ImExPS/2 Logitech Wheel Mouse"
  Option       "Protocol" "explorerps/2"
  Option       "Vendor" "Sysp"
  Option       "ZAxisMapping" "4 5"
EndSection

Section "Monitor"
  Identifier   "Monitor[0]"
  VendorName   "IBM"
  ModelName    "IBM P260"
  DisplaySize  388 291
  Option       "DPMS"
  Option       "PreferredMode" "1280x1024"
EndSection

Section "Screen"
  Identifier   "Screen[0]"
  Device       "Device[0]"
  Monitor      "Monitor[0]"
  DefaultDepth 24
  SubSection "Display"
    Depth      24
    Virtual    2560 1024
  EndSubSection
EndSection

Section "Device"
  BoardName    "G550"
  BusID        "1:0:0"
  Driver       "mga"
  Identifier   "Device[0]"
  VendorName   "Matrox"
EndSection

Section "ServerLayout"
  Identifier   "Layout[all]"
  InputDevice  "Keyboard[0]" "CoreKeyboard"
  InputDevice  "Mouse[1]" "CorePointer"
  Screen       "Screen[0]"
EndSection

Section "DRI"
    Group      "video"
    Mode       0660
EndSection

Section "Extensions"
EndSection
Comment 14 Jeremy Huddleston 2011-09-25 16:39:28 UTC
Over to ajax since I think he's the only xorg dev with hardware for this.

The comments indicate that the patch no longer applies.  If someone rebases it 
against the current driver, please send it to xorg-devel for review and comment 
in this ticket.  If this bug doesn't get any motion in the next month or so, 
I'll probably close it as NTBF.  Thanks.
Comment 15 ajax at nwnk dot net 2014-03-20 21:34:20 UTC
I don't intend to fix this, short of porting mga to new enough randr where you get xinerama protocol for free.