summaryrefslogtreecommitdiff
path: root/src/mga_dri.c
AgeCommit message (Collapse)Author
2024-07-14Fix 2 -Wcalloc-transposed-args warningsHEADmasterAlan Coopersmith
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-05-14Raise minimum supported Xserver version to 1.18 (ABI_VIDEODRV_VERSION 20.0)Alan Coopersmith
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>
2022-01-22Fix spelling/wording issuesAlan Coopersmith
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-26Eliminate unused variablesKevin Brace
Care had to be taken to properly handle XAA usage situation Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
2018-03-25fix typo in MGADRIMoveBuffersXAA()Nicolas Kaiser
Fix typo in MGADRIMoveBuffersXAA(). Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Cyril Brulebois <kibi@debian.org>
2018-02-20mga_drv: fix a typoMikulas Patocka
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 Velikov
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 ;-)
2014-07-29dri: Stop (uselessly) initializing the ValidateTree hooksAdam Jackson
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-12-05mga: fix XAA runtimeDave Airlie
XAA->USE_XAA add USE_XAA. Tested-by: Avengence on #xorg-devel Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-28mga: bring dri1 back to life.Dave Airlie
we need to at least setup the memory manager bits so dri1 clients get a backbuffer. this at least gets gears working again without XAA. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-15mga: fix after XAA removalDave Airlie
Fix mga build after XAA removal. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-06mga: port to new compat API.Dave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-25Move PCI vendor/device id defines into mga.h instead of using xf86PciInfo.hAlan Coopersmith
Silences deprecation warnings from xf86PciInfo.h in current Xorg servers Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2011-09-27Remove if(E != NULL) checks around free(E)Matt Turner
Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-27Remove xalloc/xcalloc/xrealloc/xfreeMatt Turner
Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-06-22Don't include xf86Priv.hAdam Jackson
Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-06-23Death to RCS tags.Adam Jackson
2008-05-30cfb8_32: Gut a remnants of support for 24-bit with 8-bit overlayIan Romanick
2008-03-16Replace ALLOCATE_LOCAL/DEALLOCATE_LOCAL with xalloc/xfree.Paulo Cesar Pereira de Andrade
The other missing symbols is MGAGetClientPointer, that I believe should be provided by matrox's libHAL.a, that I am afraid if someone still has a copy of it, it won't work with X Org's loader.
2007-08-31Use XSERVER_LIBPCIACCESS to detect pci-rework.Ian Romanick
2007-08-22Merge PCI-rework support and "classic" PCI interface support into one treeIan Romanick
First pass at merging both trees. So far, this has only been tested on the PCI-rework build on a PCI G450.
2007-08-20Merge branch 'master' of ↵Ian Romanick
git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-mga into pci-rework
2007-04-15Make DRI initialization work when using EXA.Tilman Sauerbeck
Still need to implement InitBuffers and MoveBuffers for EXA.
2006-12-11Merge branch 'master' of ↵Ian Romanick
git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-mga into pci-rework
2006-12-01Use the XORG_RELEASE_VERSION autoconf macro.Tilman Sauerbeck
2006-10-10Merge branch 'master' of ↵Ian Romanick
git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-mga into pci-rework
2006-09-09Make use of MGA_MARK_SYNC.Tilman Sauerbeck
2006-08-25MGASelectBuffer() is only need for XAA.Tilman Sauerbeck
2006-08-10Call exaMarkSync() where we'd set the NeedToSync flag for XAA.Tilman Sauerbeck
2006-08-10Removed XAA specific code from MGAGetQuiescence.Tilman Sauerbeck
2006-08-10Initial commit of the Exa bits.Tilman Sauerbeck
Based on ajax' mga-exa-2.patch with some straight forward fixes by myself.
2006-08-10Merge branch 'master' of ↵Ian Romanick
git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-mga into pci-rework
2006-08-09Bug #7265: Fix MGA DRI locking.Tilman Sauerbeck
The server expects the driver to take the DRI lock in the wakeup handler, and release it in the block handler. The old locking scheme didn't work like this, which caused problems. We now no longer override wakeup/block handler and just use the ones provided by the server. This means the DRI lock will be taken "all the time" and not just when it's needed by the driver. MGADRISwapContext* are activated again, so the wakeup handler could be removed. I didn't notice any DRI performance drop, but I didn't do serious benchmarking either.
2006-07-26Merge branch 'master' of ↵Ian Romanick
git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-mga into pci-rework
2006-07-26Current state of MGA driver modified to work with the xserverIan Romanick
pci-rework branch.
2006-07-25Fixed some warningsTilman Sauerbeck
2006-04-07Unlibcwrap. Bump server version requirement. Bump to 1.4.0.mga-1_4_0Adam Jackson
2006-03-20Bug #5587: Refactor mga_storm.c to only build once for all color depths.Adam Jackson
(Ian Romanick)
2006-03-15Coverity #1009: Check for NULL first before assigning to pMGADRI.Adam Jackson
2006-03-15Coverity #92: Eliminate a dead code path.Adam Jackson
2005-10-21Bug #4829: Remove some useless DRI symbol checks.accelerated_indirect-0-0-1Adam Jackson
2005-09-09Clean up some warnings. Fix some '#ifdef USEMGAHAL' issues that had causedXORG-6_8_99_901Ian Romanick
the number of curl-braces to be unbalanced.
2005-08-15Egbert's 64bit fixes for mixed 32/64bit clientsAlan Hourihane
2005-07-26Famous last words: "This last change is so trivial, I don't even need toIan Romanick
compile-test it!" This commit fixes a dumb-dumb error by me. I broke the multi-line X_ERROR message into multiple xf86DrvMsg calls to get the formating correct in the log. However, I didn't bother to put in the correct punctuation when I did so.
2005-07-25PInS data on later cards (G200 and later) contains information about theIan Romanick
physical bus used for the card. This allows accurate detection of PCI cards that use a PCI-to-PCI bridge with an AGP chip. Correctly disable DRI on PCI cards used with pre-3.2 DRM. Previously the test was performed based on PCI ID (see above for why this is wrong) and was done *before* the DRM version was known. Bug #3759: <https://bugs.freedesktop.org/show_bug.cgi?id=3759> Correctly determine the PLL reference frequency from the PInS data. Previously the wrong bit was tested. Blame the dumb programmer that used cut-and-paste (that would be me).
2005-07-11Prep for modular builds by adding guarded #include "config.h" everywhere.XORG-6_8_99_16XORG-6_8_99_15Adam Jackson
2005-07-01Re-write the PInS processing codeIan Romanick
This patch dumps all of the old BIOS processing code from the MGA DDX. The new code, located in mga_bios.c, is modeled after the code in matroxfb_misc.c (though no actual code was copied). Basically, the BIOS is processed in one place, with "device independent" values stored in a data structure. This data is then used, without extra switch-statments, throughout the driver. In addition, this patch adds support for processing the BIOS on PowerPC systems. On PPC cards, the magic offset values (that give the location of the PInS data) is not in the BIOS. Instead the driver has to search the BIOS for the PInS structure signature. The patch does this and correctly handles byte-ordering (and data alignement) issues. This code has been tested on an AGP G400 on x86 and a PCI G450 on PowerPC. NOTE: The file mga_bios.h is also removed. The "documentation" in that file was moved to the file mga_PInS.txt. This file documents, as much as possible, the layout of the various PInS datastructure versions. The information in that file is 100% based on the old mga_bios.h and the code in matroxfb_misc.c. No additional information from Matrox documentation is included in that file. This just puts the information that was already known in one place. Xorg Bug: 3553
2005-06-15Adds support for MGA DRM version 3.2.Ian Romanick
Update MGA DDX to use new features of MGA DRM ersion 3.2 to enable DRI support on PCI cards. Backwards compatability with older client-side drivers is enabled with new Device section settings. See mga.man for details. Xorg bug: 3259 Reviewed by: Eric Anholt
2005-06-07Numerous comments, clean-ups, and refactorings for the DRI portion of theXORG-6_8_99_11Ian Romanick
MGA driver. - Use mga_drm.h instead of mga_common.h. Due to this, all the MGA-specific DRM names were changed to generic versions (i.e., drmMGALock became drm_lock_t). - Merge MGADRIMapInit into MGADRIAGPInit and rename the resulting function MGADRIBootstrapDMA. - Eliminate several unnecessary drmMap calls. The server has no need to map MMIO space, primary DMA buffer space, secondary DMA buffer space, WARP microcode space, or the DRM status page. - Clarified which portions of the client / server DRI interface are no longer used. - Removed some unused fields from MGADRIServerPrivateRec. - Bump MGA_PATCHLEVEL. Reviewed by: Adam Jackson Reviewed by: Eric Anholt
2005-05-18Bug #3163: Create new DRIINFO_*_VERSION macros to indicate the versionXORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_10Adam Jackson
number of the DRIInfoRec, disambiguating it from the XF86DRI protocol version number. Modify DRIQueryVersion to return the libdri version number, which all DDXes were requesting implicitly. Fix the DDXes to check for the DRIINFO version they were compiled against.