Bug 11376 - Resurrecting mga_hal driver
Summary: Resurrecting mga_hal driver
Status: RESOLVED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/mga (show other bugs)
Version: 7.2 (2007.02)
Hardware: x86 (IA32) All
: low minor
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords: janitor
Depends on:
Blocks:
 
Reported: 2007-06-25 20:29 UTC by Paul Whittaker
Modified: 2007-09-15 05:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Paul Whittaker 2007-06-25 20:29:08 UTC
Hooks into the Matrox OEM library (mgaHALlib.a) are still present in Xorg 7.2 code, but the ability to use them was lost when Xorg was modularised (ie. usable in Xorg 6.9, not in 7.0+).  These hooks allow construction of a subordinate mga_hal_drv.so that uses the proprietary library to provide functionality not available in the open source driver (eg. second head support for the G400).  I haven't seen any complaints about the missing functionality, so it seems that no-one cares a lot.  I haven't looked at the code in GIT, but it's unlikely that anyone has fixed this since 7.2.

This omission appears to be accidental rather than intentional: it occurs even in Xorg 7.0+ drivers provided by Matrox themselves; bundled documentation has not been updated to omit mention of mga_hal; and clientlx.o and mga_halmod.o are erroneously being added to mga_drv.so.  Even if you don't want to bring back the ability to construct an mga_hal driver, you should at the very least update Makefile.in to omit reference to clientlx.* and mga_halmod.* (if not the files themselves also).  These do NOT belong in mga_drv.so, they are specific to mga_hal_drv.so.

FYI, I was able to compile a working mga_hal driver for Xorg 7.2 (tested on a dual-head MGA G400) as follows.  Sorry, no complete patch - I am not sufficiently automake/autoconf literate.

* replaced binding.h with copy from Xorg 6.8.2 driver in
  mgadriver-4.2.0-src.tar.gz (ftp://ftp.matrox.com/pub/mga/archive/linux/2005)
  and added mgaHALlib.a from the same location. binding.h provided with Xorg
  7.2 mga driver is missing definitions for MGAMODEINFO_FLATPANEL1 et al.
* FYI I was also able to get mga_hal_drv.so to compile okay using the latest
  available Matrox HAL library (4.4) by replacing clientlx.c and client.h also
  (must remove include of xf86_ansic.h from clientlx.c), but tests with a dual
  head MGA G400 consistently failed when using any mgaHALlib.a later than 4.2
  (bogus bad clock mode/interlace/doublescan on modes that should have been ok).
* added -DUSEMGAHAL to CFLAGS in Makefile
* removed references to clientlx.* and mga_halmod.* from mga_drv_la_SOURCES,
  am_mga_drv_la_OBJECTS and am__mga_drv_la_SOURCES_DIST in Makefile
* make
* make mga_halmod.lo
* make clientlx.lo
* gcc -shared .libs/clientlx.o .libs/mga_halmod.o mgaHALlib.a -Wl,-soname
  -Wl,mga_hal_drv.so -o .libs/mga_hal_drv.so
Comment 1 Tilman Sauerbeck 2007-07-27 15:49:07 UTC
I removed the mga_hal glue code in the randr-1.2 on purpose.
I expect to merge this branch at some point in the future.
Comment 2 Tilman Sauerbeck 2007-09-15 05:12:51 UTC
Closing the bug, since HAL support won't go back in.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.