Bug 55699 - [PATCH] making x11-servers/XFree86-4-Server able to use mga hal library
Summary: [PATCH] making x11-servers/XFree86-4-Server able to use mga hal library
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-18 17:10 UTC by Jens Rehsack
Modified: 2005-01-13 20:55 UTC (History)
1 user (show)

See Also:


Attachments
patch-have_mga_hal (512 bytes, text/plain)
2003-08-18 17:10 UTC, Jens Rehsack
no flags Details
file.diff (2.24 KB, patch)
2003-08-18 17:10 UTC, Jens Rehsack
no flags Details | Diff
mga_hal.diff.gz (5.11 KB, application/x-gzip)
2003-08-19 04:24 UTC, Eric Anholt
no flags Details
mga_hal.shar (6.36 KB, application/x-shar)
2003-08-19 04:24 UTC, Eric Anholt
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Rehsack 2003-08-18 17:10:22 UTC

Fix: This patch has to be placed into ${FILESDIR}

This is the patch for the port itself.
Comment 1 Eric Anholt freebsd_committer freebsd_triage 2003-08-18 19:09:22 UTC
Responsible Changed
From-To: freebsd-ports-bugs->anholt

Take this as XFree86 maintainer.  I've said before that I think the HAL 
should be a separate port (and the DDX in the XFree86-4-Server port should be 
fixed so that it works with the hal or without).  I'm working on this right now, 
hopefully I'll post a patch soon for testing by people who actually have a use 
for the HAL, since I don't on my hardware.
Comment 2 Eric Anholt freebsd_committer freebsd_triage 2003-08-19 04:24:45 UTC
I've made an mga_hal port and a diff for the XFree86-4-Server port to
include the changes that Matrox made to the open 2d module.  I haven't
tested them at all yet, besides building/installing.  I've emailed
Matrox to clarify the license issue.

I'll want testers before committing this.  To test, apply mga_hal.diff
from your XFree86-4-Server port directory.  Run mga_hal.shar from
ports/x11-servers/.  Re-build and install XFree86-4-Server first and
test the server without the HAL installed to make sure there weren't any
regressions (I don't really trust their changes), then install the
mga_hal port and make sure things work as you expect.  Looking forward
to feedback, and finally killing off this issue.

-- 
Eric Anholt                                eta@lclark.edu          
http://people.freebsd.org/~anholt/         anholt@FreeBSD.org
Comment 3 Eric Anholt freebsd_committer freebsd_triage 2003-10-20 04:50:41 UTC
State Changed
From-To: open->suspended

Mark this suspended -- the code may still be valuable, but I can't scrape up a 
single tester for the patch, and I would like to get at least 2.
Comment 4 Eric Anholt freebsd_committer freebsd_triage 2003-11-12 00:35:05 UTC
Responsible Changed
From-To: anholt->x11

Assign to new x11 ports mailinglist.
Comment 5 Andre.Albsmeier 2003-11-28 19:10:30 UTC
The stuff in this PR works great apart from a small bug
(which is Matrox' fault, not Eric's). I have tested it with
the DVI-Output of a G550 and the TV-Out of a G400 which both
need the HAL in order to work.

I have also tested some configurations with the patched
version of the XFree86-4-Server port but without the HAL
binary installed. This also works perfectly as long as
no special HAL features are needed, of course.

Details:
========

Tested stuff which needs the HAL:
----------------------------------
G550 with DVI output:		works
G400 with TV-Out only:		works
G400 with monitor and TV-Out:	fails, this is the bug
				mentioned above, fix below


Tested stuff without the HAL but the patched XFree86-4-Server port:
-------------------------------------------------------------------
G550 with analog screen:	works
G400 with analog screen:	works
Millenium 2:			works


Now the bug: The patch-mga_hal file contains the modifications of
the XFree86-4-Server port to "upgrade" the MGA driver to the
4.3.0 version shipped by Matrox in their mgadrivers-3.0-src.tgz.
It contains the following change for mga_driver.c:

@@ -2664,7 +2711,7 @@
                pMga->pMgaModeInfo->ulTVStandard = TV_NTSC;
        }
     } else {
-       pMga->pMgaModeInfo->ulRefreshRate = 0;
+       pMga->pMgaModeInfo->ulRefreshRate = 60;
        pMga->pMgaModeInfo->ulTVStandard = TV_NTSC;
     } 
   

(You can find the same change when comparing version 4.2.1
with 4.3.0 contained in mgadrivers-3.0-src.tgz).

This code seems to be run for every head on the G400 and
rendered my 1280x1024 screen (attached to the first head)
unusable due to a vertical refresh head of 51 Hz. I don't
know why they set the default ulRefreshRate to 60 Hz on a
non TV screen but after removing this part of the patches
in patch-mga_hal everything worked again.

	-Andre
Comment 6 Mark Linimon freebsd_committer freebsd_triage 2004-11-17 06:24:41 UTC
Responsible Changed
From-To: x11->freebsd-x11

While PRs for ports maintained by x11@FreeBSD.org have for some time been 
assigned to 'x11', this creates duplicate reminder email postings to the 
mailing lists.  The canonical form should now be 'freebsd-x11'.
Comment 7 Eric Anholt freebsd_committer freebsd_triage 2005-01-13 20:54:30 UTC
State Changed
From-To: suspended->closed

Port of mga_hal 4.1 committed.  The current changes to the open-source pieces 
seemed unimportant, but I could be wrong.  Please tell me if there are issues 
with the mga_hal currently, compared to dropping Matrox's sources in.