Commit Graph

121 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 fbc4da6fef xfree86: Move DRICreatePCIBusID to the PCI code
This symbol is used by some DRI2+ drivers and there's nothing
DRI1-specific about it.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
2017-06-20 16:37:24 -04:00
Emil Velikov cc69d4f110 xfree86/dri: remove libdrm runtime checks
As of last commit all the places in our configure.ac require version
2.3.1 (released back in 2007) or later. With the latter introducing the
1.3.0 version, as returned by drmGetLibVersion.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-10-05 14:38:13 -04:00
Keith Packard 9d15912aa4 Remove fd_set from Block/Wakeup handler API
This removes the last uses of fd_set from the server interfaces
outside of the OS layer itself.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-18 15:27:51 -04:00
Keith Packard fb0802113b Remove readmask from screen block/wakeup handler
With no users of the interface needing the readmask anymore, we can
remove it from the argument passed to these functions.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-18 15:27:51 -04:00
Adam Jackson 2725dd024d dri1: Hide the SIGIO details from drivers
Not being used, and not likely to be useful.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Keith Packard <keithp@keithp.com>
2016-06-08 11:36:31 -04:00
Adam Jackson 05e1bcf56e dri1: Fix unchecked AddResource
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2016-03-02 10:03:27 -05:00
Jon TURNEY 8cc88fbe9e debug output format fix in DRISwapContext()
xorg/xserver/hw/xfree86/dri/dri.c:1695:19: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘DRIContextPrivPtr’ [-Werror=format=]                   ^
xorg/xserver/hw/xfree86/dri/dri.c:1695:19: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘DRIContextPrivPtr’ [-Werror=format=]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-28 12:06:51 +01: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 0d30d44a8c dix: Drop the third argument from WindowExposuresProcPtr
A careful read shows that it was always NULL.  It hasn't always been; as
the DDX spec indicates, it was the "occluded region that has backing
store", but since that backing store code is long gone, we can nuke it.

mi{,Overlay}WindowExposures get slightly simpler here, and will get even
simpler in just a moment.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-09 11:14:44 +02:00
Adam Jackson a08e7a098a dri1: Remove unused DRI{,Post}ValidateTree
i810, mga, savage, and tdfx do reference these slots, but only to set
them to NULL, so while this does have API impact it's not actually used.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:58:30 -04:00
Adam Jackson 58ef01648b dri1: Don't bother asking the loader about drmGetLibVersion
This was added for DRM_IOCTL_SET_VERSION support, which has been around
for over ten years now. Since we require ≥2.3.0 in configure.ac this
would really only protect you if you managed to build against a modern
libdrm but run against one that's more than 7½ years old, which, doctor
it hurts when I do this.

Archaeology: http://cgit.freedesktop.org/~ajax/dri/commit/xc/programs/Xserver/GL/dri/dri.c?id=77d62efca033dced96ab7998b7c62a4e2df907d5
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-18 11:11:19 -07:00
Keith Packard 07b03e721e xfree86: Fix -Wshadow warnings
Just rename variables to eliminate -Wshadow warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-22 19:56:31 -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
Keith Packard 017307f0b4 xfree86/dri: Mark DRIDrvMsg and dri_drm_debug_print _X_ATTRIBUTE_PRINTF
And fix resulting warnings.

v2: (Adam Jackson) Cast handles through uintptr_t to avoid size change warnings

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-01-12 10:14:50 -08:00
Dave Airlie 785af88ab0 dri1: fix dri1 startup since 459c6da0f9
This commit regresses dri1 since it moves the drmSetServerInfo from being
called at module load time to extension init time. However DRIScreenInit
relies on this being called before it gets control.

This patches moves the call into DRIScreenInit and seems to work here.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-12-12 12:56:35 +10:00
Daniel Stone 459c6da0f9 Move DRI1 from external module to built-in
Rather than building the tiny amount of code required for XFree86-DRI as
an external module, build it in if it's enabled at configure time.

v2: Fix test/Makefile.am to only link libdri.la if DRI is set

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>

fixup for DRI1 move

Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10 00:30:40 -07:00
Daniel Stone a1d41e311c Move extension initialisation prototypes into extinit.h
Create extinit.h (and xf86Extensions.h, for Xorg-specific extensions) to
hold all our extension initialisation prototypes, rather than
duplicating them everywhere.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09 23:06:41 -07:00
Dave Airlie 1f0e8bd5eb api: rework the X server driver API to avoid global arrays.
This is a squash merge containing all the API changes, as
well as the video ABI bump.

Its been squashed to make bisection easier.

Full patch log below:

commit b202738bbf0c5a1c1172767119c2c71f1e7f8070
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Mon May 14 15:16:11 2012 -0700

    xfree86: Bump video ABI to 13.0

    The ABI was broken by changes to convert from screen index numbers to ScreenPtr
    / ScrnInfoPtr in various structures and function signatures.

    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 3d5f7d9f8d408bcad3f83277d255f25d3b0edbf3
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu May 24 10:56:57 2012 +0100

    xf86: xf86ClearEntityListForScreen should take a pScrn

    When adding GPU screens this make life easier.

    (also fix comment, as pointed out by Alan)

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit afee8b5ab4501597ecc1ade34124d7ca227ab055
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu May 24 07:07:32 2012 +0100

    xf86i2c: add pscrn for drivers to use

    This just adds a pScrn pointer into the struct for the drivers to use
    instead of scrnIndex. Mostly scrnIndex is used for logging, but some
    drivers use it to lookup xf86Screens, so let them stash a pScrn instead.

    Removing the scrnIndex is a bit more involved and I'm not sure its worth
    the effort. Doing i2c in the X server is legacy code as far as I'm concerned.

    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit ea5092f1f679691d187f1eee9427e6057beec56e
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 19:25:20 2012 +0100

    dix/gc: consolidate GC object creation in one place

    The standard GC create and scratch GC create were 90% the same really,
    and I have a need in the future for creating GC objects without the
    other bits, so wanted to avoid a third copy.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 3d91482ea9b4883e64e496f2768168e0ffa21ba1
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 10:24:06 2012 +0100

    xf86: add a define to denote the new non-index interfaces are being used

    This can be used by drivers to provide compatible APIs.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 37c3ae3e6cd4f3dedc72f371096d6743f8f99df3
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 15:09:12 2012 +0100

    dix: make Create/Free scratch pixmaps take a ScreenPtr

    While technically an API/ABI change I doubt anyone uses it,
    but it helps in splitting screens up.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 75f2062a3fe94f04764ecc7d2ff2fbbeccb9da60
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 14:57:55 2012 +0100

    xf86/xv: remove scrnIndexfrom xf86FindXvOptions.

    Move this interface to taking an ScrnInfoPtr.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit f80c2374f40ea7b2ee0556e2e76cc07406f3d843
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 14:53:59 2012 +0100

    xf86: make xf86DeleteScreen take a ScrnInfoPtr (v2)

    stop passing indices into this function.

    v2: drop flags argument.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 58824e414f35682435f15bfe6c4b656bd90b9235
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 14:48:09 2012 +0100

    xf86: fix xf86IsScreenPrimary interface to take a pScrn (API/ABI)

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 6b4fc1f9d391bcdf7ca288766e49bce60f4635cd
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:18:59 2012 +0100

    xserver: convert block/wakeup handlers to passing ScreenPtr (ABI/API) (v2)

    Instead of passing an index, pass the actual ScreenPtr. This allows
    more moving towards not abusing xf86Screens + screenInfo.

    v2: drop the blockData/wakeupData args as per ajax's suggestion.,
    fix docs.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 790d003de20fb47674420a24dadd92412d78620d
Author: Dave Airlie <airlied@gmail.com>
Date:   Wed Apr 11 09:53:14 2012 +0100

    xf86/common: remove some more pScrn->pScreen uses

    remove some more conversions that appeared after api cleanups.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit aac85e18d1dd093f2cad6bd29375e40bd7af0b8f
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 16:34:53 2012 +0100

    ddc: change API to take ScrnInfoPtr (v2)

    This removes all xf86Screens usage from ddc code,
    it modifies the API for some functions to avoid taking indices.

    v2: address Alan's comments about dropping DDC2Init parameter.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit fe3f57b6eaf6860a33876a54f9439f69578f03a5
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 16:31:26 2012 +0100

    vbe: don't use index for VBEInterpretPanelID (API)

    Remove use of xf86screens from vbe module.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit abf1965f4ed91529036d3fdb470d6a3ce6f29675
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 16:25:11 2012 +0100

    int10/vbe: don't use xf86Screens. (ABI) (v3)

    Pass the ScrnInfoPtr instead of the index in the int10 struct.

    This saves us using it to dereference xf86Screens.

    v2: address Alan's comment to fix struct alignment.

    v3: squash in all the int10 fixes, test the vm86 code builds,
    after comments by Keith.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 23cca612b4fb5efc33683c7624b803b457387e3d
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:30:18 2012 +0100

    xserver: drop index argument to ScreenInit (ABI/API) (v2)

    This drops the index argument, its the same as pScreen->myNum,
    and its the last major index abuse I can find.

    v2: address Alan's review - update docs, fix xwin/xnest/darwin

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 40d360e2d7e832407f3ed64e3a02c27ecc89a960
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:23:01 2012 +0100

    xf86: migrate PointerMoved from index to ScrnInfoPtr (ABI/API)

    This migrates PointerMoved from an index to ScrnInfoPtr.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit aa60a2f38679d0eeb979a9c2648c9bc771409bf9
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:20:46 2012 +0100

    xf86: migrate PMEvent to a ScrnInfoPtr (ABI/API)

    This migrates the PMEvent from index to ScrnInfoPtr.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit d3f28ef44371ed4a039ffc5dd7eb6408d1269ba2
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:18:30 2012 +0100

    xf86: migrate SetDGAMode from index to ScrnInfoPtr (ABI/API)

    This migrates the SetDGAMode callback from an index to ScrnInfoPtr.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit baf5e4818a74f2b68c3dfdcc56f54322351039a0
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:14:11 2012 +0100

    xf86: migrate ChangeGamma from index to ScrnInfoPtr (ABI/API) (v2)

    This migrates the ChangeGamma interface to avoid passing a index.

    v2: fix xf86RandR12.c + xf86cmap.c call

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 51e5f90ada929d6b23176090badbb42fdb3fa550
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:11:09 2012 +0100

    xf86/exa: migrate index to screen types for EnableDisableFBAccess (ABI/API)

    The EXA interface migrates to ScreenPtr,
    and the xf86 interface migrated to ScrnInfoPtr.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 94f1f21d17e86f96d4a54292a399160950087675
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:02:11 2012 +0100

    xf86: migrate ValidMode callback to ScrnInfoPtr (ABI/API)

    This migrates the ValidMode to passing a ScrnInfoPtr instead
    of an index.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 3f8f18198fed4f39ec805b508a3482e91eea26b2
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:59:46 2012 +0100

    xf86: migrate SwitchMode to taking ScrnInfoPtr (ABI/API) (v2)

    This migrate the SwitchMode interface to take a ScrnInfoPtr
    instead of an index.

    v2: drop flags.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit d06a038a5c49328ab3a8d969d24f9fcd22c63202
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:50:37 2012 +0100

    xf86: move AdjustFrame to passing ScrnInfoPtr (ABI/API) (v2)

    This converts AdjustFrame code paths to passing a ScrnInfoPtr
    instead of an integer index.

    v2: drop flags args.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 53d2f8608ffd4090d08e7d5cf2e92fb954959b90
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:41:27 2012 +0100

    xf86: modify FreeScreen callback to take pScrn instead of index. (ABI/API) (v2)

    Another index->pScrn conversion.

    v2: drop flags arg.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 60db37c0b247052e0f5c54b1921fe58a3609c2e3
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:35:41 2012 +0100

    xf86: change EnterVT/LeaveVT to take a ScrnInfoPtr (ABI/API break) (v2)

    This modifies the EnterVT/LeaveVT interfaces to take a ScrnInfoPtr
    instead of an index into xf86Screens. This allows dropping more
    public dereferences of the xf86Screens and screenInfo.

    v2: drop flags args as suggested by Keith, fix docs.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 06729dbbc804a20242e6499f446acb5d94023c3c
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:04:59 2012 +0100

    xserver: remove index from CloseScreen (API/ABI breakage)

    This drops the index from the CloseScreen callback,
    its always been useless really, since the pScreen contains it.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-05 13:22:18 +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
Nicolas Kaiser 0320db25f9 hw/xfree86/dri: remove duplicated includes
Remove duplicated includes.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2011-04-24 19:46:06 -07:00
Dave Airlie ef9d04f8ad dri: kill if 0 out code.
This refers to pWin->winSize in some #if 0 code remove it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
2011-03-28 10:08:00 +10:00
Adam Jackson 67e0bcba43 dri1: warning fix
dri.c: In function ‘DRIScreenInit’:
dri.c:434: warning: cast from pointer to integer of different size

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-31 12:36:44 +00:00
Alan Coopersmith 3a9bb93dd1 Convert alloc+sprintf pairs into asprintf() & XNFasprintf() calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Tiago Vignatti 17a23f9ba8 xfree86: dri: remove unused PCI macro
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-14 18:53:09 +03: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
Keith Packard faeebead7b Change the devPrivates API to require dixRegisterPrivateKey
This patch only changes the API, not the implementation of the
devPrivates infrastructure. This will permit a new devPrivates
implementation to be layed into the server without requiring
simultaneous changes in every devPrivates user.

Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-06-05 19:23:03 -07:00
Keith Packard 2dc138922b Rename region macros to eliminate screen argument
This is a combination of a huge mechanical patch and a few small
fixups required to finish the job. They were reviewed separately, but
because the server does not build without both pieces, I've merged
them together at this time.

The mechanical changes were performed by running the included
'fix-region' script over the whole tree:

$ git ls-files | grep -v '^fix-' | xargs ./fix-region

And then, the white space errors in the resulting patch were fixed
using the provided fix-patch-whitespace script.

$ sh ./fix-patch-whitespace

Thanks to Jamey Sharp for the mighty fine sed-generating sed script.

The hand-done changes involve removing functions from dix/region.c
that duplicate inline functions in include/regionstr.h, along with
their declarations in regionstr.h, mi.h and mispans.h.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-05 18:59:00 -07:00
Jamey Sharp e7fae9ecc4 Move each screen's root-window pointer into ScreenRec.
Many references to the WindowTable array already had the corresponding
screen pointer handy, which meant they usually looked like
"WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of
keeping this information in a parallel array simplifies those
expressions, and eliminates a MAXSCREENS-sized array.

Since dix uses this data, a screen private entry isn't appropriate.

xf86-video-dummy currently uses WindowTable, so it needs to be updated
to reflect this change.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03 14:03:23 -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
Alan Coopersmith 895f40792a Add type name argument to CreateNewResourceType
Convert all calls of CreateNewResourceType to pass name argument

Breaks DIX ABI.

ABI versions bumped:

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18 17:44:12 -08:00
Alan Coopersmith a11c58fa0c Ensure all resource types created have names registered
Calls RegisterResourceName to record the type name for
use by X-Resource, XACE/SELinux/XTsol, and DTrace.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-18 16:51:45 -08:00
Alan Coopersmith eb750f8b5e Check for failures from CreateNewResourceType
Make sure to check return value before setting bitmask flags.
For most calls, just fails to init the extension.   Since Xinput
already calls FatalError() on initialization failure, so does
failure to allocate Xinput's resource type.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-18 16:51:45 -08:00
Jamey Sharp b0dd6be2c8 Cast small-int values through intptr_t when passed as pointers
On 64-bit systems, int and pointers don't have the same size, so GCC gives
warnings about casts between int and pointer types. However, in the cases
covered by this patch, it's always a value that fits in int being stored
temporarily as a pointer and then converted back later, which is safe.
Casting through the pointer-sized integer type intptr_t convinces the
compiler that this is OK.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-10-08 13:38:44 +11:00
Shunichi Fuji 4d6b20c25a dri: use noPanoramiXExtension directly.
xf86LoaderCheckSymbol() is never useful if using externed variable directly.
noPanoramiXExtension will be just used through dlopen() like other extension modules.

Signed-off-by: Shunichi Fuji <palglowr@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-18 08:23:32 +10:00
Alan Coopersmith fe31f9c646 Change xf86dristr.h includes to use xf86driproto.h instead
Clears warnings about obsolete headers, but raises minimum
required version of xf86driproto to 2.1.0

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-16 12:06:07 +10:00
Dave Airlie e454f106dc xf86 ddx: add vga arbiter support.
This adds support for using the libpciaccess interface for
vga arbitration support on top of a kernel which supports it.

Currently patches are queued for kernel 2.6.32 in jbarnes
pci tree, and shipping in Fedora kernel.

Co-authors:
Tiago Vignatti <tiago.vignatti@nokia.com>

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-08-28 11:39:42 +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
Michel Dänzer ef320bdd5e DRI1: Make DRICreateDrawable return TRUE for pixmaps.
GLX_EXT_texture_from_pixmap was broken since commit
a26c77ff43 ('glx: fix retval checks when failures
occur for drawable creation.')

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-02-23 16:52:51 +01:00
Peter Hutterer cb95642dc8 Remove #define NEED_EVENTS and NEED_REPLIES
A grep on xorg/* revealed there's no consumer of this define.

Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.

Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-12-12 11:43:32 +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 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
Keith Packard 9c7ac47b87 Notify DRI when crtc regions change
Drivers that care about crtc positions on the screen to ensure that vblank
works correctly need to be notified when crtcs are changed.

Provide a hook in the mode setting code that is invoked whenever any
configuration is done to the screen.

Use this new hook in the DRI code so that DRI clients are notified and
receive updated information.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-11-24 13:24:35 -08:00
Maarten Maathuis 5b336585a4 dri: don't set the dixPrivate key to NULL, as this is a staticly set variable.
- This breaks on the 2nd server generation.
- No other subsystem seems to NULL their key.
- This should fix bug 17982.
2008-10-10 23:28:30 +02:00
Tomas Carnecky ebea78cdba Prepare for array-index based devPrivates.
TODO: static indices can be made just an int; some indices
can be combined.
2008-08-28 18:05:40 -04:00
Tiago Vignatti 3164288b12 Remove deprecated function miPointerPosition(). 2008-07-04 03:55:59 -03:00
Peter Hutterer 3344569529 Merge branch 'master' into mpx
Conflicts:

	Xi/exevents.c
	dix/devices.c
2008-05-02 11:00:14 +09:30
Paulo Cesar Pereira de Andrade 6899ff81e8 Fix an off by one read error in drmSIGIOHandler().
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-05-01 10:14:30 +09:30