Commit Graph

80 Commits

Author SHA1 Message Date
Peter Hutterer
9d039ef504 xfree86: silence a few int10 compiler warnings.
'format ‘%#x’ expects type ‘unsigned int’, but argument 2 has type ‘CARD32’'
and similar.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-17 09:05:22 +10:00
Tomas Carnecky
731a907ac2 Fix "warning: XXX defined but not used"
generic.c:80: warning: ‘read_legacy_video_BIOS’ defined but not used

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-04 09:41:40 +10:00
Tomas Carnecky
bc57efffe6 Fix "warning: unused variable XXX"
events.c:4614: warning: unused variable ‘kbd’
xkbUtils.c:361: warning: unused variable ‘maxKeysPerMod’
xf86Events.c:409: warning: unused variable ‘ke’
generic.c:131: warning: unused variable ‘cs’
generic.c:130: warning: unused variable ‘size’
xf86RandR12.c:591: warning: unused variable ‘crtc’

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-04 09:41:25 +10: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
fb22d4d928 Remove declarations of symbols that are never defined.
These symbols were removed from the X Server, or never declared.
  One symbol that may need special attention is XkbBuildCoreState(),
that doesn't have a prototype anywhere, but is called from
xkb/xkbEvents.c:XkbFilterEvents(), and also used by the macros
XkbStateFieldFromRec() and XkbGrabStateFromRec() defined in
include/xkbstr.h.
  fb/wfbrename.h also may need some cleanup, as it makes several
"renames" of non existing symbols.
2008-11-30 01:33:20 -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
Paulo Cesar Pereira de Andrade
74bc792e18 Export symbols required by the vesa and fbdev drivers.
This is a minimal set of patches, to have an usable X Server when
compiling it with symbols hidden by default.
2008-11-27 05:34:14 -02:00
Adam Jackson
37072500f7 Warning fix
helper_exec.c: In function ‘port_rep_inb’:
helper_exec.c:219: warning: implicit declaration of function
‘DEBUG_IO_TRACE’
helper_exec.c:219: warning: nested extern declaration of
‘DEBUG_IO_TRACE’
2008-11-25 15:05:19 -05:00
Adam Jackson
df14682a31 Bus: Remove ISA support.
No, really.  PCI is old enough to drive now.  If you want this, get the kernel
to expose a framebuffer device.
2008-11-24 23:40:06 -05:00
Adam Jackson
b677bff97b int10: Degrade the checksum warning to X_INFO.
I've seen about one case in three years where this has actually been
correlated with the real cause of failure, and we've trained people to
freak out about X_WARNING, so let's be less alarmist.
2008-10-14 14:30:19 -04:00
Adam Jackson
94919480d8 int10: Fix a nasty memory leak. 2008-10-07 13:41:53 -04:00
Adam Jackson
a57b2f172c int10: Don't warn when scanning for devices we don't have.
Some BIOSes (hi XGI!) will attempt to enumerate the PCI bus by asking
for the config space of every possible device number.  This despite
perfectly functional BIOS methods to enumerate the bus exactly.
2008-10-07 13:41:53 -04:00
Adam Jackson
a65e36a873 int10: Remove useless check.
If you have more than one PCI device with the same d/b/d/f, you're
already in trouble.
2008-10-07 13:41:53 -04:00
Adam Jackson
8a5b89e8e1 xalloc+memset(0) -> xcalloc 2008-10-06 15:36:51 -04:00
Adam Jackson
2d3e478384 int10: Fix int1A for %ax == 0xB101.
pciNumBuses was pretty much always 1 post-pciaccess.  That ain't good.
2008-08-18 15:09:44 -04:00
Adam Jackson
9e5b3deafb Bug #11842: Fix emulation of int1A PCI BIOS services.
Use only %di to name the PCI register to read/write, rather than %edi.
DOS is only expecting the base PCI config space anyway, and the BIOS
might be using the high bits of %edi.
2008-06-24 14:08:04 -04:00
Adam Jackson
cc7c045bae Fix PCI config space cycles from int10 emulator.
The top bit of 0xCF8 is an enable bit, not part of the domain.  Sending
cycles to domain 128 instead of domain 0 is rarely the right thing to do.
2008-04-04 12:58:12 -04:00
Bart Trojanowski
1b9878ffcf Bug #14332: Fix PCI access cycles from x86emu.
The address written to 0xcf8 contains the PCI slot address to send the
config cycle to.  However, we would ignore that and always send the
cycle to the device whose BIOS we were running.  This breaks some
integrated graphics platforms that have explicit knowledge about the
system's host bridge, for example.
2008-03-13 17:42:16 -04:00
George Sapountzis
3d64290547 clean some "unused" warnings 2008-03-01 19:49:24 +02:00
Egbert Eich
1d11e4bc4c Fixing a misleading comment which could suggest a GPL violation.
The author of the int10 code looked at the VBIOS POSTing code
in DOSEMU to get some initial idea on how to POST a VBIOS.
To give credit to the DOSEMU Team for this inspiration a comment
was added to the code which could suggest that code from the
GPLed DOSEMU was directly incorporated into this code.
This patch should clearify the situation.
2007-08-30 14:28:06 +02: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
f62beb6f36 Remove all trace of Option "BiosLocation".
This code was deeply dangerous.  If anyone actually had a use for this code,
we should find a better way of doing it.
2007-07-27 13:24:38 -04:00
Michel Dänzer
0ede39a25c Fix build when int10 doesn't use x86emu. 2007-07-03 10:55:13 +02:00
Adam Jackson
028a00bc51 Make x86emu's I/O cycle tracing more useful.
Print debug messages only when the appropriate debug bit is set in the
8086 state vector, so you can focus in on the call you're actually
interested in.
2007-07-02 18:41:55 -04:00
Ian Romanick
24506ea65b Move xf86ReadLegacyBIOS to the one place that uses it.
xf86ReadLegacyBIOS is only used by one function in int10/generic.c.
Move a generic implementation of that function there, rename it to
read_legcay_BIOS, and delete all remnants of it from all other places.
2007-01-24 15:33:49 -08:00
Ian Romanick
d8bd0c41de Convert to new pci_device_cfg_write_u* interface. 2007-01-15 11:38:22 -08: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
Alan Hourihane
b88ad820fa Set Int10Current->Tag for the linux native int10 module
Fixes bug #9296
(cherry picked from 731952c561 commit)
2006-12-13 12:18:22 +00: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
028bbdc041 Merge master back to randr-1.2 2006-11-04 17:46:26 -08:00
Egbert Eich
6319f7d713 Make int10 fully domain aware. 2006-11-03 18:59:51 +01:00
Matthias Hopf
46901063e8 Build with -D_PC on ix86 only. 2006-11-03 18:59:51 +01: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
9df53d903e Rename xf86ReadDomainMemory to xf86ReadLegacyVideoBIOS, since that's
what it is actually used for.  Modify a few routines in linuxPci.c to
take pci_device structures as parameters in stead of PCITAGs.
2006-08-08 16:42:23 -07:00
Ian Romanick
a0f2e1cae4 Move xf86FindPciDeviceVendor and xf86FindPciClass from xf86pciBus.c to
xf86int10.c.  Refactor common code from those functions to do_find.
2006-08-02 10:54:41 -07: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
525257eb98 Fix stupid typos. 2006-07-21 19:16:38 -07:00
Ian Romanick
e18d34f423 Make the various implementations of xf86ExtendedInitInt10 use the
libpciaccess interfaces.  This eliminates all calls to mapPciRom,
which in turn allows the elimination of hw/xfree86/int10/pci.c.
2006-07-21 16:47:45 -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
Ian Romanick
c69c00d652 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver 2006-07-20 12:08:38 -07: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
46369350d4 Add some const qualifiers to serveral function parameters. 2006-07-14 15:51:55 -07:00
Ian Romanick
490fb30459 Rearrange code in xf86int10ParseBiosLocation to use strncasecmp. This
eliminates the need for the first use of xstrdup in this function.
The second use of xstrdup was *never* necessary and has also been
eliminated.
2006-07-14 15:26:56 -07:00
Ian Romanick
d3ee49bcba Refactor common code from the generic.c and linux.c version of
xf86ExtendedInitInt10 to xf86int10GetBiosLocationType and
xf86int10GetBiosSegment.

These changes were tested on MGA hardware on x86-64 with various
combinations of InitPrimary and BiosLocation.
2006-07-14 15:13:35 -07:00
Ian Romanick
8793c7fd4b Refactor identical xf86InitInt10 function from generic.c and linux.c
to helper_exec.c.
2006-07-14 09:11:39 -07:00
Ian Romanick
1450fd5964 Trivial refactor of libint10_la_SOURCES. 2006-07-14 09:10:32 -07:00
Ian Romanick
1708b0c7d9 Eliminate "ugly" spaces around parenthesis. Add const qualifier.
General code clean-ups.
2006-06-21 14:39:39 -07:00
Ian Romanick
c5b3aa120b Added a comment about some suspicious code. 2006-06-07 17:46:23 -07:00