Commit Graph

73 Commits

Author SHA1 Message Date
Alan Coopersmith 23e83724df Fix spelling/wording issues
Most (but not all) of these were found by using
  codespell --builtin clear,rare,usage,informal,code,names
but not everything reported by that was fixed.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-07-05 13:07:33 -07:00
Adam Jackson d1c00c859c xfree86: Remove -flippixels
No supported driver supports 1bpp anymore, nor has in a very long time.
This option only worked with vgahw anyway.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-09-27 16:50:22 +00:00
Adam Jackson bdce17959c meson: Build libvgahw.so
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-04-27 15:19:41 -04:00
Peter Hutterer 732fd7e571 Drop trailing whitespaces
sed -i "s/[ ]\+$//g" **/*.(c|h)

happy reviewing...
git diff -w is an empty diff.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
Adam Jackson 51531a6717 vgahw: Nuke unused vgaCmap.c
Never been built since m12n, can't be needed.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:52:24 -04:00
Adam Jackson eb76228080 xfree86: Remove #include "compiler.h" from places that don't need it
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-28 12:18:03 -07:00
Alan Coopersmith 910b5b2454 Link libvgahw with $(PCIACCESS_LIBS) as well
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-01-29 15:21:55 -08:00
Keith Packard 60014a4a98 Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
is used throughout the X server for other things, and having duplicate
names generates compiler warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-12 10:24:11 -08:00
Peter Hutterer bbef8e46f2 Replace INCLUDES with AM_CPPFLAGS
newer automake gets quite noisy about this.
hw/xfree86/ddc/Makefile.am:7: warning:
'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
and many more of these.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-06 13:08:13 +10:00
Dave Airlie 05d2472cd2 xf86dga: handle DGAAvailable for gpu screens. (v2)
v2: Split out DGAAvailable into two interfaces, one for calls from protocol
decoding and one for internal usage, after discussion with ajax and keithp.

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-07 10:37:10 +01:00
Dave Airlie 2e237c838f xf86: reimplement XF86SCRNINFO macro using new functions.
This macro did lookups via privates but we can just use the ScreenToScrn
conversion instead.

This patch drops all in-server uses, we should drop the macro later,
once drivers have been converted to not use it.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21 12:59:20 +01:00
Dave Airlie 41151f88a6 xf86: migrate to using xf86ScreenToScrn wrapper (v2)
migrate to new helper API.

This just wraps all the obvious uses of xf86Screens[pScreen->myNum],
and should be fairly simple to review.

v2: remove commented out lines.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21 12:59:08 +01:00
Keith Packard 9838b7032e Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:

	-bap
	-psl
	-T PrivatePtr
	-T pmWait
	-T _XFUNCPROTOBEGIN
	-T _XFUNCPROTOEND
	-T _X_EXPORT

The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.

The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.

The comparison was done with this script:

dir1=$1
dir2=$2

for dir in $dir1 $dir2; do
	(cd $dir && find . -name '*.o' | while read file; do
		dir=`dirname $file`
		base=`basename $file .o`
		dump=$dir/$base.dump
		objdump -d $file > $dump
	done)
done

find $dir1 -name '*.dump' | while read dump; do
	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
	diff -u $dump $otherdump
done

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-21 13:54:42 -07:00
Adam Jackson 8db029064b vgahw: Fix DACDelay() macro to use the driver's vtable
We don't want to unconditionally use I/O routines here, since if the
driver is using mmap'd VGA ports then the I/O handle won't be set up.

Tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-01-09 13:09:49 -08:00
Adam Jackson 7757b80924 pci: Remove xf86MapDomainMemory
This is slightly draconian, but that API is just awful.  In all but
one case in the callers it's used to get a map of some legacy VGA
memory, and it would be cleaner for the caller to just call
pci_device_map_legacy.

The sole exception is in the vesa driver, which uses it to avoid having
to look up which device the BAR belongs to.  That's similarly trivial to
fix.

Having done that, Linux's PCI layer is now very small indeed.

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-10-15 21:18:46 -07:00
Adam Jackson 6d9efdce0d vgahw: Port to pciaccess IO space routines
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-15 21:18:45 -07:00
Adam Jackson 4bd6579188 vgahw: Don't default to standard (port space) access routines
In fact, don't default to anything; drivers must explicitly say which
kind they want, and they are strongly encouraged to do MMIO if possible.
This is an ABI change in that drivers that don't will crash, but drivers
that are explicit will work with both old and new servers.

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-15 21:18:45 -07:00
Adam Jackson 30fb334d21 vgahw: Remove IO domain setup
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-15 21:18:45 -07:00
Adam Jackson c0b63ff88a xfree86: Move xf86GetClocks to vgahw
This is really a vga-specific hack anyway.  The only modern driver that
uses it is trident, but it's already loaded vgahw by the time it would
call xf86GetClocks.

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-10-15 21:18:45 -07:00
Macpaul Lin 2b24b2bd85 xfree86: nds32: add nds32 definition for vgaHW support.
Add __nds32__ definitions for vgaHW support.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-23 15:36:19 -07:00
Mikhail Gusarov 7287ef9e6c Remove unnecessary parentheses around return values in functions
This patch was generated by the following Perl code:

perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;'

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-10 06:42:42 -07:00
Mikhail Gusarov 0a4d8cbdcd Remove more superfluous if(p) checks around free(p)
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@

-if(E) { free(E); }
+free(E);

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-06-06 20:27:18 +07:00
Jamey Sharp 11c69880c7 Quit using clientErrorValue in dix/colormap.c.
And that's it! No more clientErrorValue kludge.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2010-05-13 17:14:07 -07:00
Mikhail Gusarov 3f3ff971ec Replace X-allocation functions with their C89 counterparts
The only remaining X-functions used in server are XNF*, the rest is converted to
plain alloc/calloc/realloc/free/strdup.

X* functions are still exported from server and x* macros are still defined in
header file, so both ABI and API are not affected by this change.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-13 00:22:37 +07:00
Tiago Vignatti b61870595b xfree86: track screens' installed colormaps as screen privates
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-04-23 15:50:23 +03:00
Peter Hutterer aa07957373 Revert "alpha: kill xf86SlowBCopyToBus and xf86SlowBCopyFromBus"
The vesa driver still uses slowbcopy_frombus and slowbcopy_tobus.

This reverts commit 5ef53a94ce.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-06 20:40:20 -04:00
Peter Hutterer 59e731ef66 xfree86: silence some xf86dgaproto compiler warnings
We already require xf86dgaproto > 2.0.99 since 6fffcd582

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-04 12:51:02 +10:00
Matt Turner 5ef53a94ce alpha: kill xf86SlowBCopyToBus and xf86SlowBCopyFromBus
xf86SlowBCopyToBus and xf86SlowBCopyFromBus cause segfaults on my
system.

Also remove associated slowbcopy_tobus/slowbcopy_frombus macros.

Signed-off-by: Matt Turner <mattst88@gmail.com>
2009-08-31 20:25:15 -04:00
Peter Hutterer d3f6b43a24 Update to xextproto 7.0.99.1.
xextproto had Xlib client headers moved into libXext.
Protocol header files are named fooproto.h, header files with constants
foo.h or fooconst.h where foo.h was already in use for client-side headers.
2009-07-15 17:00:05 +10:00
Peter Hutterer 2f6253376d xfree86: Remove superfluous ifdef DEBUG checks.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-16 12:01:23 +10:00
Eamon Walsh 57aff88c7d Fix most remaining deprecated resource lookups.
Callsites updated to use dixLookupResourceBy{Type,Class}.
TODO: Audit access modes to make sure they reflect the usage.
2009-04-29 01:04:37 -04:00
Julien Cristau aec4c0caca xfree86: ANSI cleanups 2009-01-11 08:54:11 +01:00
Paulo Cesar Pereira de Andrade 49f77fff14 Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.

  This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)

  LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.

  xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
Paulo Cesar Pereira de Andrade d6cbd4511e Export symbols defined in the sdk.
This is the biggest "visibility" patch. Instead of doing a "export"
symbol on demand, export everything in the sdk, so that if some module
fails due to an unresolved symbol, it is because it is using a symbol
not in the sdk.

  Most exported symbols shouldn't really be made visible, neither
advertised in the sdk, as they are only used by a single shared object.

  Symbols in the sdk (or referenced in sdk macros), but not defined
anywhere include:
XkbBuildCoreState()
XkbInitialMap
XkbXIUnsupported
XkbCheckActionVMods()
XkbSendCompatNotify()
XkbDDXFakePointerButton()
XkbDDXApplyConfig()
_XkbStrCaseCmp()
_XkbErrMessages[]
_XkbErrCode
_XkbErrLocation
_XkbErrData
XkbAccessXDetailText()
XkbNKNDetailMaskText()
XkbLookupGroupAndLevel()
XkbInitAtoms()
XkbGetOrderedDrawables()
XkbFreeOrderedDrawables()
XkbConvertXkbComponents()
XkbWriteXKBSemantics()
XkbWriteXKBLayout()
XkbWriteXKBKeymap()
XkbWriteXKBFile()
XkbWriteCFile()
XkbWriteXKMFile()
XkbWriteToServer()
XkbMergeFile()
XkmFindTOCEntry()
XkmReadFileSection()
XkmReadFileSectionName()
InitExtInput()
xf86CheckButton()
xf86SwitchCoreDevice()
RamDacSetGamma()
RamDacRestoreDACValues()
xf86Bpp
xf86ConfigPix24
xf86MouseCflags[]
xf86SupportedMouseTypes[]
xf86NumMouseTypes
xf86ChangeBusIndex()
xf86EntityEnter()
xf86EntityLeave()
xf86WrapperInit()
xf86RingBell()
xf86findOptionBoolean()
xf86debugListOptions()
LoadSubModuleLocal()
LoaderSymbolLocal()
getInt10Rec()
xf86CurrentScreen
xf86ReallocatePciResources()
xf86NewSerialNumber()
xf86RandRSetInitialMode()
fbCompositeSolidMask_nx1xn
fbCompositeSolidMask_nx8888x0565C
fbCompositeSolidMask_nx8888x8888C
fbCompositeSolidMask_nx8x0565
fbCompositeSolidMask_nx8x0888
fbCompositeSolidMask_nx8x8888
fbCompositeSrc_0565x0565
fbCompositeSrc_8888x0565
fbCompositeSrc_8888x0888
fbCompositeSrc_8888x8888
fbCompositeSrcAdd_1000x1000
fbCompositeSrcAdd_8000x8000
fbCompositeSrcAdd_8888x8888
fbGeneration
fbIn
fbOver
fbOver24
fbOverlayGeneration
fbRasterizeEdges
fbRestoreAreas
fbSaveAreas
composeFunctions
VBEBuildVbeModeList()
VBECalcVbeModeIndex()
TIramdac3030CalculateMNPForClock()
shadowBufPtr
shadowFindBuf()
miRRGetScreenInfo()
RRSetScreenConfig()
RRModePruneUnused()
PixmanImageFromPicture()
extern int miPointerGetMotionEvents()
miClipPicture()
miRasterizeTriangle()
fbPush1toN()
fbInitializeBackingStore()
ddxBeforeReset()
SetupSprite()
InitSprite()
DGADeliverEvent()

  SPECIAL CASES
o defined as _X_INTERNAL
	xf86NewInputDevice()
o defined as static
	fbGCPrivateKey
	fbOverlayScreenPrivateKey
	fbScreenPrivateKey
	fbWinPrivateKey
o defined in libXfont.so, but declared in xorg/dixfont.h
	GetGlyphs()
	QueryGlyphExtents()
	QueryTextExtents()
	ParseGlyphCachingMode()
	InitGlyphCaching()
	SetGlyphCachingMode()
2008-11-29 23:56:06 -02:00
Paulo Cesar Pereira de Andrade 31285d063e Make visible symbols required by xorg modules.
This patch exports all symbols required by the compilable
(in a x86 linux computer) xorg/driver/* modules.
  Still missing symbols worth mentioning are:

sunleo
	miFindMaxBand no longer available

intel	(uxa/uxa-accel.c)
	fbShmPutImage no longer available (and should have been static)

mga
	MGAGetClientPointer (should come from matrox's libhal)

  This is not a definitive "visibility" patch, as all it does is to
export missing symbols, but the modules that current don't compile,
may require more symbols once fixed, and third party drivers should
also require more symbols exported.
  A "definitive" patch should export symbols defined in the sdk.
2008-11-28 01:55:11 -02:00
Daniel Stone 733d42065f XFree86: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:42 +00:00
Ian Romanick 8b6b40b727 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts:

	hw/xfree86/common/xf86.h
	hw/xfree86/common/xf86Init.c
	hw/xfree86/common/xf86pciBus.c
	hw/xfree86/int10/generic.c
	hw/xfree86/int10/helper_exec.c
	hw/xfree86/loader/xf86sym.c
	hw/xfree86/os-support/bus/Pci.c
	hw/xfree86/os-support/bus/Pci.h
	hw/xfree86/os-support/bus/linuxPci.c
	hw/xfree86/os-support/linux/int10/linux.c
2007-08-23 18:19:17 -07:00
Adam Jackson 4d76075dbb Death to RCS tags. 2007-06-29 14:06:52 -04:00
Ian Romanick ca9c41e09d Convert int10 and vgaHW to use 'struct pci_device' instead of PCITAG.
Convert all uses of PCITAG in int10 and vgaHW to 'struct pci_device'.
This allows the conversion of xf86ReadLegacyVideoBIOS and
xf86MapDomainMemory to 'struct pci_device' from PCITAG.
2007-01-11 21:09:20 -08:00
Ian Romanick e1f73d2208 Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts:

	hw/xfree86/common/xf86Configure.c
	hw/xfree86/common/xf86Helper.c
	hw/xfree86/common/xf86pciBus.c
	hw/xfree86/int10/helper_exec.c
	hw/xfree86/os-support/bus/Pci.c
	hw/xfree86/os-support/bus/linuxPci.c
	hw/xfree86/os-support/linux/lnx_pci.c
	hw/xfree86/scanpci/Makefile.am
	hw/xfree86/utils/pcitweak/Makefile.am
	hw/xfree86/utils/scanpci/Makefile.am
2006-12-08 17:24:15 -08:00
Keith Packard 2be1ac15ae Remove smashing of CFLAGS from server build.
CFLAGS is a user variable, extracted from the environment at configure time
and settable by the user at build time. We must not override this variable.
2006-09-18 12:11:18 -07:00
Ian Romanick 21291d6ca7 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework 2006-08-25 09:34:21 -07:00
Bastian Blank f7919c2879 xfree86: don't do legacy IO on ARM or S/390 (Debian #362641)
Don't attempt to poke legacy IO ranges on ARM or S/390.
2006-08-12 20:43:25 +03:00
Ian Romanick 380b51d605 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts:

	hw/xfree86/common/xf86Init.c
	hw/xfree86/int10/pci.c
	hw/xfree86/scanpci/xf86PciData.h
	hw/xfree86/scanpci/xf86PciStdIds.h
	hw/xfree86/scanpci/xf86PciStr.h
	hw/xfree86/scanpci/xf86ScanPci.h
	hw/xfree86/utils/pcitweak/pcitweak.c
	hw/xfree86/utils/scanpci/scanpci.c

Re-removed most of the conflicting files.
2006-07-25 11:30:04 -07:00
Ian Romanick 07ad92d2c4 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts:

	hw/xfree86/common/xf86DoScanPci.c
	hw/xfree86/common/xf86Init.c
	hw/xfree86/common/xf86pciBus.c
2006-07-21 15:25:35 -07:00
Adam Jackson 0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Daniel Stone 84683f19b4 get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULE
Get rid of almost all uses of these definitions.  They're still defined for
delinquent out-of-tree drivers, and also for the Mesa build.  As well as
for miinitext.c.  But largely gone.
2006-07-18 18:17:38 -04:00
Ian Romanick 46f55f5dea Initial batch of changes for PCI rework. All future changes will be
tracked individually.
2006-06-07 14:09:02 -07:00
Adam Jackson 52fc7c8dc7 Ensure all *ModuleData symbols are marked _X_EXPORT. Start removing
XFree86LOADER ifdefs, non-loadable hasn't been supported for a while
    now. Remove completely gratuitious REMOVE_LOADER_CHECK_MODULE_INFO
    ifdefs surrounding a call to a function added in XFree86 4.1 (!).
    Miscellaneous static markings.
2006-06-05 03:00:24 +00:00
Eric Anholt c3d1403672 Remove libcwrapper usage from xorg server modules. The libcwrapper is only
of (marginal) use in the drivers, and that usage remains.
2006-02-10 22:00:30 +00:00