425 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
f1fdb72a31 replace obsolete "pointer" by plain void*
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-05 19:11:16 +01:00
Enrico Weigelt, metux IT consult
b5caa4d195 drop obsolete compat macros and compat-api.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 20:25:05 +01:00
Enrico Weigelt, metux IT consult
a6c28b4fad .github: add NetBSD build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-29 17:38:28 +01:00
Enrico Weigelt, metux IT consult
32c40df622 .github: add freebsd and dragonfly build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-28 16:11:30 +01:00
Enrico Weigelt, metux IT consult
6db5905dd1 .github: use new common driver build actions
Using the new driver build actions in X11Libre/actions-build-driver repo,
instead of having lots of duplicated pipeline and script in all the
individual driver repos.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-23 21:58:54 +01:00
Enrico Weigelt, metux IT consult
90ee88ef6b configure.ac: increase minimum xserver version to 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 16:12:27 +01:00
Enrico Weigelt, metux IT consult
df3c94fbf4 release 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xf86-video-mga-25.0.0
2025-12-18 19:13:42 +01:00
Enrico Weigelt, metux IT consult
cd0b946b09 configure.ac: tiny formatting cleanup
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 17:26:40 +01:00
Enrico Weigelt, metux IT consult
f490217b1d drop hacks for ancient pre-libpciaccess Xservers
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 15:28:41 +01:00
Enrico Weigelt, metux IT consult
e4d2670eb7 drop obsolete #ifdef XFree86LOADER
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 13:45:27 +01:00
Enrico Weigelt, metux IT consult
bcb045e785 configure.ac: replace DRIVER_NAME symbol by actual name
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 13:14:04 +01:00
Enrico Weigelt, metux IT consult
7dc2eb304a drop obsolete #ifdef HAVE_CONFIG_H
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 20:19:26 +01:00
Enrico Weigelt, metux IT consult
3e5d2dd687 drop obsolete .gitlab-ci.yml
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 20:18:06 +01:00
Enrico Weigelt, metux IT consult
c170f26e33 release 2.1.1
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xf86-video-mga-2.1.1
2025-12-16 15:17:31 +01:00
Enrico Weigelt, metux IT consult
c8ab8d4235 README.md: fix URLs
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 13:20:43 +01:00
Enrico Weigelt, metux IT consult
3d2d097ca6 configure.ac: fix package name and issue tracker URL
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 19:02:08 +01:00
Alan Coopersmith
04a4e4b81b Strip trailing whitespace from source files
Performed with: `git ls-files | xargs perl -i -p -e 's{[ \t]+$}{}'`

`git diff -w` & `git diff -b` show no diffs from this change

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga/-/merge_requests/17>
2025-12-15 17:31:33 +01:00
Alan Coopersmith
983cff1eb9 Improve man page formatting
More closely follow common style as described on
https://man7.org/linux/man-pages/man7/man-pages.7.html
and fix warnings raised by `mandoc -T lint` and `groff -rCHECKSTYLE=10`

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga/-/merge_requests/16>
2025-12-15 17:31:22 +01:00
Enrico Weigelt, metux IT consult
823a1b86da drop ancient compat hacks
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-08 19:08:54 +01:00
b-aaz
368f2e8e43 configure: Automatically detect the default xorg-module-dir.
The module directory has changed to a per ABI folder in the xlibre-xserver.
Now the default value of `xorg-module-dir` will be detected from the `moduledir` variable in xorg-server.pc.

Signed-off-by: b-aaz <b-aazbsd.proton.me>
xlibre-xf86-video-mga-2.1.0.2
2025-07-29 18:46:11 +02:00
Enrico Weigelt, metux IT consult
047d2acff2 .github: add CI pipeline
This pipeline builds the driver against the latest Xserver stable
release as well as current master.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-28 20:29:56 +02:00
callmetango
da9b8eba5b .github: Add issue forms
Add the following forms for issue creation:

* Bug report
* Feature request
* Code change
* Documentation update
* Organizational task

* add issue type selection page on "New Issue" call
* mention Github Discussions and the mailing list where appropriate

Part-of: X11Libre/misc#156
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-07-07 17:06:00 +02:00
Alan Coopersmith
3f2000a09a mga_bios: remove unused get_u32 inline function
Clears warning from clang:

mga_bios.c:77:26: warning: unused function 'get_u32' [-Wunused-function]
static __inline__ CARD32 get_u32( const CARD8 * data )
                         ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga/-/merge_requests/15>
xlibre-xf86-video-mga-2.1.0.1
2024-11-16 22:09:35 +00:00
Alan Coopersmith
7012e41c65 Remove semicolons without statements
Clears 5 warnings from clang of the form:

mga_driver.c:1861:13: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
            ;
            ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga/-/merge_requests/15>
2024-11-16 22:09:35 +00:00
Alan Coopersmith
b460131050 PMGA & QUIESCE_DMA: Remove ; from end of macro definitions
Clears 12 warnings from clang of the form:

mga_exa.c:170:18: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
    PMGA(pPixmap);
                 ^
mga_exa.c:176:25: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
    QUIESCE_DMA(pPixmap);
                        ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga/-/merge_requests/15>
2024-11-16 22:09:35 +00:00
Alan Coopersmith
d55a8f77ab WAITFIFO: add do { ... } while (0) to avoid -Wextra-semi-stmt warnings
Clears 17 warnings from clang of the form:

mga_video.c:739:17: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
    WAITFIFO(15);
                ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga/-/merge_requests/15>
2024-11-16 22:09:35 +00:00
Alan Coopersmith
3b7e42e8b1 CHECK_DMA_QUIESCENT: add do ... while (0) to avoid -Wextra-semi-stmt warnings
Clears 8 warnings from clang of the form:

mga_storm.c:269:37: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
    CHECK_DMA_QUIESCENT(pMga, pScrn);
                                    ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga/-/merge_requests/15>
2024-11-16 22:09:35 +00:00
Alan Coopersmith
f227f3bec1 BOUND & REBOUND: add do ... while (0) to avoid -Wextra-semi-stmt warnings
Clears 22 warnings from clang of the form:

mga_merge.c:738:35: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
            REBOUND(f1.x0,f1.x1,x);
                                  ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga/-/merge_requests/15>
2024-11-16 22:09:35 +00:00
Alan Coopersmith
62f9d8de06 Remove MGA_NOT_HAL() macro left behind from HAL removal
When commit 94bbeb132c removed the HAL support, it removed the
MGA_HAL() macro to wrap code only used with HAL, but left behind
the equivalent MGA_NO_HAL() macro for the non-HAL code paths.
Since it just expanded to the code it contained, it did nothing
but upset clang and mess up the code formatting.

This fixes 6 clang warnings of the form:

mga_dacG.c:1670:2: warning: embedding a directive within macro arguments
 has undefined behavior [-Wembedded-directive]
#ifdef XSERVER_LIBPCIACCESS
 ^

and 23 clang warnings of the form:

mga_dacG.c:1351:3: warning: empty expression statement has no effect;
 remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
        );      /* MGA_NOT_HAL */
         ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga/-/merge_requests/14>
2024-11-16 13:21:06 -08:00
Alan Coopersmith
c228139d65 xf86-video-mga 2.1.0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
xf86-video-mga-2.1.0
2024-10-12 12:54:20 -07:00
Alan Coopersmith
3279df42ed Fix 2 -Wcalloc-transposed-args warnings
From gcc 14.1:

mga_dri.c: In function ‘MGADRIScreenInit’:
mga_dri.c:757:40: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
  757 |    pMGADRI = (MGADRIPtr)calloc( sizeof(MGADRIRec), 1 );
      |                                        ^~~~~~~~~
mga_dri.c:757:40: note: earlier argument should specify number of elements, later size of each element
mga_dri.c:767:22: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
  767 |       calloc( sizeof(MGADRIServerPrivateRec), 1 );
      |                      ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga/-/merge_requests/12>
2024-07-14 13:23:38 -07:00
Alan Coopersmith
66ee371516 Assume the Xserver provides xf86ModeBandwidth now
It was added by xorg/xserver@1768af38c7
which was included in the xserver 1.10 release, which is now less than
our minimum required, so we don't need to check for it and provide a
fallback any longer.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga/-/merge_requests/11>
2024-05-14 18:17:54 -07:00
Alan Coopersmith
af09c0ca1f Raise minimum supported Xserver version to 1.18 (ABI_VIDEODRV_VERSION 20.0)
Already effectively required by use of XNFcallocarray() introduced in
xorg/xserver@b96dc999 - xserver-1.18.0, released in Nov. 2015.

Allows dropping remnants of code for XAA and pre-pciaccess X servers

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga/-/merge_requests/11>
2024-05-14 16:16:50 -07:00
Enrico Weigelt, metux IT consult
e7329f4634 use XNFcallocarray() instead of xnfcalloc macro
xnfcalloc is just an alias for XNFcallocarray() that doesn't seem to serve
any practical purpose, so it can go away once all drivers stopped using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mga/-/merge_requests/9>
2024-05-08 16:04:16 +02:00
Alan Coopersmith
0d0ae3fd54 Fix warning: declaration of ‘ulIndex’ shadows a previous local [-Wshadow]
mga_g450pll.c: In function ‘MGAG450SetPLLFreq’:
mga_g450pll.c:326:11: warning: declaration of ‘ulIndex’ shadows a previous local [-Wshadow]
  326 |       int ulIndex;
      |           ^~~~~~~
mga_g450pll.c:312:11: note: shadowed declaration is here
  312 |    CARD32 ulIndex;
      |           ^~~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-07 10:10:47 -08:00
Alan Coopersmith
3bc8e3b57e Fix 3 -Wmissing-prototypes warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-07 10:02:57 -08:00
Alan Coopersmith
09df931ce6 Add X.Org's standard C warning flags to AM_CFLAGS
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-07 10:00:19 -08:00
Alan Coopersmith
14e430cab9 Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOL
AC_PROG_LIBTOOL was replaced by LT_INIT in libtool 2 in 2008,
so it's time to rely on it.

Clears autoconf warnings:

configure.ac:45: warning: The macro 'AC_PROG_LIBTOOL' is obsolete.
configure.ac:45: You should run autoupdate.
aclocal.m4:3515: AC_PROG_LIBTOOL is expanded from...
configure.ac:45: the top level

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-07 09:57:42 -08:00
Alan Coopersmith
58fae3137c gitlab CI: ensure libtool is installed in build container
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-10-01 13:30:46 -07:00
Alan Coopersmith
951fa4d49c Fix -Wold-style-declaration warnings
mga_dac3026.c:77:1: warning: ‘static’ is not at beginning of declaration
 [-Wold-style-declaration]
 const static unsigned char MGADACregs[] = {
 ^~~~~
mga_dac3026.c:103:1: warning: ‘static’ is not at beginning of declaration
 [-Wold-style-declaration]
 const static unsigned char MGADACbpp8[DACREGSIZE] = {
 ^~~~~
mga_dac3026.c:108:1: warning: ‘static’ is not at beginning of declaration
 [-Wold-style-declaration]
 const static unsigned char MGADACbpp16[DACREGSIZE] = {
 ^~~~~
mga_dac3026.c:124:1: warning: ‘static’ is not at beginning of declaration
 [-Wold-style-declaration]
 const static unsigned char MGADACbpp24[DACREGSIZE] = {
 ^~~~~
mga_dac3026.c:129:1: warning: ‘static’ is not at beginning of declaration
 [-Wold-style-declaration]
 const static unsigned char MGADACbpp32[DACREGSIZE] = {
 ^~~~~
mga_dacG.c: In function ‘MGAGInit’:
mga_dacG.c:1118:2: warning: ‘static’ is not at beginning of declaration
 [-Wold-style-declaration]
  const static unsigned char initDAC[] = {
  ^~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-04-28 16:26:38 -07:00
Alan Coopersmith
32d6cc7971 Remove "All rights reserved" from Oracle copyright notices
Oracle no longer includes this term in our copyright & license notices.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-25 09:11:41 -08:00
Alan Coopersmith
e7fa8055ea gitlab CI: stop requiring Signed-off-by in commits
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-09 12:06:57 -08:00
Alan Coopersmith
37bf1be0fb xf86-video-mga 2.0.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
xf86-video-mga-2.0.1
2022-07-10 17:11:22 -07:00
Raphael Isemann
638653561d Fix uninitialized read in MGAEnableSecondOutPut
`MGAGRestore` allocated `ModeInfo` without initializing its memory and then
passes it into `MGAEnableSecondOutPut` via `MGAEnableSecondOutPut(pScrn, &ModeInfo);`.

`MGAEnableSecondOutPut` then reads the unitialized memory in the line
`if ( !(pModeInfo->flSignalMode & POS_HSYNC) )`.

This patch just zeroes the memory to prevent those branches to be randomly
taken.

Signed-off-by: Raphael Isemann <teemperor@gmail.com>
2022-04-13 13:12:29 +02:00
Alan Coopersmith
a6ab1e08ee gitlab CI: add a basic build test
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-22 13:06:47 -08:00
Alan Coopersmith
1e4dbef654 Fix spelling/wording issues
Found by using:
    codespell --builtin clear,rare,usage,informal,code,names

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-22 13:05:35 -08:00
Alan Coopersmith
f74f050415 Build xz tarballs instead of bzip2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-22 12:57:58 -08:00
Fabrice Fontaine
f227f2f286 configure.ac: fix cross-compilation
AC_CHECK_FILE can't be used when cross-compiling

[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/x11r7/xdriver_xf86-video-mga/0001-misc-fixes.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-05-04 20:47:14 +02:00
Kevin Brace
924c310dfe Version bumped to Version 2.0.0
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
xf86-video-mga-2.0.0
2018-12-07 16:43:46 -08:00
Kevin Brace
ada903eea2 Version bumped to Version 1.6.901
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-12-07 16:21:44 -08:00