summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
6 daysuse XNFcallocarray() instead of xnfcalloc macroHEADmasterEnrico Weigelt, metux IT consult4-9/+9
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-01-07Fix warning: declaration of ‘ulIndex’ shadows a previous local [-Wshadow]Alan Coopersmith1-3/+2
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-07Fix 3 -Wmissing-prototypes warningsAlan Coopersmith1-3/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-07Add X.Org's standard C warning flags to AM_CFLAGSAlan Coopersmith2-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-01-07Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOLAlan Coopersmith1-2/+1
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>
2023-10-01gitlab CI: ensure libtool is installed in build containerAlan Coopersmith1-3/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-04-28Fix -Wold-style-declaration warningsAlan Coopersmith2-6/+6
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-02-25Remove "All rights reserved" from Oracle copyright noticesAlan Coopersmith1-1/+1
Oracle no longer includes this term in our copyright & license notices. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-09gitlab CI: stop requiring Signed-off-by in commitsAlan Coopersmith1-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-10xf86-video-mga 2.0.1xf86-video-mga-2.0.1Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-13Fix uninitialized read in MGAEnableSecondOutPutRaphael Isemann1-0/+1
`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-01-22gitlab CI: add a basic build testAlan Coopersmith1-0/+98
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-22Fix spelling/wording issuesAlan Coopersmith16-33/+33
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-01-22Build xz tarballs instead of bzip2Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-05-04configure.ac: fix cross-compilationFabrice Fontaine1-6/+12
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>
2018-12-07Version bumped to Version 2.0.0xf86-video-mga-2.0.0Kevin Brace1-1/+1
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-12-07Version bumped to Version 1.6.901Kevin Brace1-1/+1
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-12-07Remove last remnants of old Matrox HALKevin Brace6-504/+1
Apparently, commit 94bbeb132c7eda912d1b402a1a91ca7cbbf5e6a1 missed removing a few more files related to old Matrox HAL. Signed-off-by: Kevin Brace <kevinbrace@gmx.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-29Version bumped to Version 1.6.900Kevin Brace1-1/+1
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-11-29Write 8 bits instead of 32 to MGAREG_CACHEFLUSHHenry Zhao1-1/+1
Fixes misaligned address crash when EXA is enabled on Solaris SPARC (Oracle Bug id 22993744) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-29Use fabs() to compute absolute value of floating point number.Matthieu Herrb1-2/+2
Fixes a warning from clang and looks like it was a real bug. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-26Suppression of a compilation error when XAA is not in useKevin Brace2-1/+4
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-11-26Convert most HAVE_XAA_H conditional compilation labels to USE_XAAKevin Brace5-23/+23
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-11-26Eliminate set but unused variablesKevin Brace3-37/+12
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-11-26Eliminate unused variablesKevin Brace6-12/+25
Care had to be taken to properly handle XAA usage situation Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-11-25Update configure.ac bug URL for gitlab migrationAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-21mga_drv: fix image corruption due to memcpy reorderingMikulas Patocka1-1/+17
The memcpy specification doesn't specify how the destination is written - and on glibc 2.19 memcpy is doing some bytewise writes with the rep stosb instruction. These bytewise writes confuse the hardware (because it expects 32-bit writes) and result in image corruption. This patch replaces memcpy with explicit writes, so that the sequential write order and 32-bit write size is guaranteed. We use the "volatile" attribute to make sure that compiler optimizations won't cause write reordering. When reading the memory, we use a structure with "packed" attribute to avoid unaligned traps on RISC machines. Tested-by: Kevin Brace <kevinbrace@gmx.com> Signed-off-by: Mikulas Patocka <mikulas@twibright.com>
2018-11-18Update README for gitlab migrationAlan Coopersmith3-26/+19
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-03-25fix typo in MGADRIMoveBuffersXAA()Nicolas Kaiser1-1/+1
Fix typo in MGADRIMoveBuffersXAA(). Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Cyril Brulebois <kibi@debian.org>
2018-02-20mga_drv: use exa by defaultMikulas Patocka1-0/+3
If the Xserver doesn't support XAA, we must turn EXA on by default - otherwise we end up with no acceleration at all. Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Mikulas Patocka <mikulas@twibright.com>
2018-02-20mga_drv: fix warningMikulas Patocka7-38/+48
Fix warnings in the MGA driver. There's no functional change. Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Mikulas Patocka <mikulas@twibright.com>
2018-02-20mga_drv: fix structure definitionMikulas Patocka1-1/+1
Fix missing entry in structure definition. Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Mikulas Patocka <mikulas@twibright.com>
2018-02-20mga_drv: fix a typoMikulas Patocka1-1/+1
Fix a typo that causes dynamic symbol lookup failure and xserver crash. Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Mikulas Patocka <mikulas@twibright.com>
2017-07-17xf86-video-mga: remove the GlxSetVisualConfigs stub and friendsEmil Velikov4-256/+2
The function was an empty since 2008 at least. Remove it alongside the unused GLX visuals code. With this all the GL/GLX dependencies in the driver are gone. Cc: Mathieu Larouche <mathieu.larouche@matrox.com> Cc: Dave Airlie <airlied@redhat.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> --- There's a GLX reference in mga_ucode.h - a file which was seemingly never used since day 1. I'm not going to bother with that, since I've taken enough of a diversion already ;-)
2017-06-20xf86-video-mga: Fix to always set HiPri for G200e4 V2Mathieu Larouche1-15/+25
- Changed the HiPri value for G200e4 to always be 0. - Added Bandwith limitation to block resolution above 1920x1200x60Hz - (V2): Pulled out ulMemoryBandwidth of condition so it's always initialized as reviewed by : Stefan Dirsch <sndirsch@suse.de> Reviewed-by: Samer El-Haj-Mahmoud <smahmoud@lenovo.com>
2017-02-14xf86-video-mga: Add support for a new G200eH3 deviceMathieu Larouche5-5/+94
- Added support for the new deviceID for G200eH3 - Added PLL algorithm for the G200eH3 - Removed the bandwidth limitation for the G200eH3 Signed-off-by: Mathieu Larouche <mathieu.larouche@matrox.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-01-26autogen: add default patch prefixMihail Konev1-0/+3
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-26autogen.sh: use quoted string variablesEmil Velikov1-4/+4
Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent fall-outs, when they contain space. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-26autogen.sh: use exec instead of waiting for configure to finishPeter Hutterer1-1/+1
Syncs the invocation of configure with the one from the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-01-26autogen.sh: Implement GNOME Build APIColin Walters1-1/+3
http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-01-26configure: Drop AM_MAINTAINER_MODEPeter Hutterer2-2/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-17xf86-video-mga 1.6.5xf86-video-mga-1.6.5Matt Turner1-1/+1
Signed-off-by: Matt Turner <mattst88@gmail.com>
2016-07-28xf86-video-mga: Add support for the new G200e chipset -- V2Mathieu Larouche2-5/+83
- Added PLL algorithm for a new rev of G200e - Removed the bandwidth limitation for the new G200e Fixes : https://bugs.freedesktop.org/show_bug.cgi?id=92540 Change from V1 : - Make sure we don't cause issue on previous chips. (Dave Airlie review) Signed-off-by: Mathieu Larouche <mathieu.larouche@matrox.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-07-28xf86-video-mga: Add support for a new G200eW3 chipsetMathieu Larouche5-17/+149
- Added support for the new deviceID for G200eW3 - Added PLL algorithm for the G200eW3 - Added some initialization code for G200eW3 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=92541 Signed-off-by: Mathieu Larouche <mathieu.larouche@matrox.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-07-19Adapt Block/WakeupHandler signature for ABI 23Adam Jackson1-0/+5
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-09-17Use correct type in function call.Thomas Klausner1-1/+5
Fixes passing argument 2 of 'pci_device_cfg_read_u32' from incompatible pointer type pciaccess.h:153:5: note: expected '__uint32_t *' but argument is of type 'CARD32 *' Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Reviewed-by: Connor Behan <connor.behan@gmail.com>
2015-08-24Composite fixupConnor Behan1-1/+7
A driver like this that tries to composite a lot will definitely need to avoid crashing for solid pictures. Signed-off-by: Connor Behan <connor.behan@gmail.com>
2015-08-24Remove DownloadFromScreenConnor Behan1-26/+0
This hook was broken and did the same thing as a software fallback. Signed-off-by: Connor Behan <connor.behan@gmail.com>
2015-07-01Enable write-combining on the framebuffer BARAdam Jackson1-1/+2
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-01MGA DDX: make it possible to find EXA supportMatthew Rezny1-2/+4
Newer versions of the xserver stricter requirements on header order which caused the configure tests for EXA support to erroneously fail. Since XAA was already removed from an earlier version of xserver, the configure failure meant no acceleration was possible. Patch configure tests similar to r128. Reviewed-by: Adam Jackson <ajax@redhat.com>