Commit Graph

14408 Commits

Author SHA1 Message Date
Adam Jackson
f839caadd4 loader: Remove compatibility with ancient XFree86 version numbering
Pretty sure I'm guilty of adding this.  I think I was thinking of trying
to be compatible with some really old binary-only driver that I had
vague aspirations of reverse-engineering, but since I haven't gotten
around to it in the intervening decade...

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-18 15:15:46 -07:00
Julien Cristau
af40913797 xwayland: always include drm.xml in tarballs
Move drm.xml out of the automake conditional so make dist includes it
even if glamor-egl is disabled.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83960

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-18 15:07:20 -07:00
Keith Packard
eaee6572be Merge remote-tracking branch 'anholt/modesetting-import' 2014-09-17 15:49:24 -07:00
Jon TURNEY
e3aa13b8d6 Update help text since -iglx is now the default
This should have been part of d0da0e9c3b

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-17 15:45:05 -07:00
Eric Anholt
b84d25fd53 modesetting: Drop remaining old-xserver compatibility.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-09-16 16:28:50 -07:00
Eric Anholt
7b0965a826 modesetting: Drop use of compat-api.h
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-09-16 16:28:50 -07:00
Eric Anholt
2feda3b6b5 modesetting: Connect the driver to the build.
v2: Fix libdrm version check, and use XORG_VERSION_* instead of a
    static 1.0.0 version for the driver module.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-09-16 16:28:42 -07:00
Adam Jackson
30dcc10f6c xfree86: Clean up some more alpha awareness
Since the sparse stuff is gone none of these variables get used for
anything, they're just dead side-effect-less execution.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-16 11:58:53 -04:00
Adam Jackson
2e21c081d3 xfree86: Remove the memory of MTRR awareness
pciaccess does this for us, and none of our internal hooks really
remain.  This does remove a cleanup pass from the BSD code, but the case
it's covering (a previous server leaving MTRRs around) can't happen
anymore.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-16 11:58:53 -04:00
Adam Jackson
c42712ab4d xfree86: Remove xf86CheckMTRR
Die die die die die.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-16 11:58:53 -04:00
Adam Jackson
8686463de7 xfree86: Remove xf86ReadBIOS
Not being used externally or internally anymore.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-16 11:58:53 -04:00
Adam Jackson
21b216ad6c int10: Port off xf86ReadBIOS
If the linux vm86 backend changes look somewhat horrifying to you,
that's because you have taste.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-16 11:58:53 -04:00
Adam Jackson
96c0da812a xfree86: Remove xf86LinearVidMem
The only driver even pretending to check the result is mach64 anyway.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-16 11:58:53 -04:00
Adam Jackson
ec0e29ed5b xfree86: Remove {set,undo}WC from VidMemInfo
Now that mapMem is gone this can never actually get called.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-16 11:58:53 -04:00
Adam Jackson
9db2af6f75 xfree86: Remove xf86{Map,Unmap}VidMem
This API sucks.  Fortunately it's mostly unused at this point.  geode,
sis, and xgi need minor patches to use the corresponding pciaccess code,
neomagic will (more explicitly) lose its non-PCI support, and newport
will need to be ported to /dev/mem or the platform bus or something.

This should also make it pretty clear that alpha's sparse memory support
was basically not a thing anymore, very few tears shed.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-16 11:58:52 -04:00
Eric Anholt
6d6aa8ab6b modesetting: Update for the platform device API change.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-09-15 12:47:19 -07:00
Eric Anholt
9c080f4496 modesetting: Drop use of "pointer" for "void *"
The xserver doesn't have that typedef.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-09-15 12:47:12 -07:00
Eric Anholt
a10ea01475 modesetting: xserver already checks XEXTPROTO >= 7.2.99.901.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-09-15 12:47:06 -07:00
Eric Anholt
c7e8d4a6ee modesetting: unifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
The server will always have it.

v2: Clean up some weird formatting from the unifdeffing.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-09-15 12:46:43 -07:00
Eric Anholt
0c07bfb38e modesetting: Merge modesetting's COPYING into the xserver's.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-09-15 12:46:02 -07:00
Jon TURNEY
1d6334dd0c hw/xwin: Undefine _XSERVER64 in hw/xwin/winclipboard
Including any server header might define the macro _XSERVER64 on 64 bit
machines. That macro must _NOT_ be defined for Xlib client code, otherwise bad
things happen. So let's undef that macro if necessary.

Remove server directories from include path to ensure no server includes are
included

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:19:06 +01:00
Jon TURNEY
7ca9330194 hw/xwin: Only add to XSetIOErrorHandler() handler chain once
Only use XSetIOErrorHandler() to add to the global XSetIOErrorHandler() chain
once.  If we do it every restart, then we make a loop in the handler chain, and
we end up with a thread spinning in that loop when the server shuts down...

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:19:04 +01:00
Jon TURNEY
5819a02d46 hw/xwin: Add a basic manpage for xwinclip
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:19:01 +01:00
Jon TURNEY
492c924c85 hw/xwin: In clipboard function prototypes, use Window type, not int type
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:18:58 +01:00
Jon TURNEY
4a38c3bda2 hw/xwin: Remove XOpenDisplay() retry code
Remove XOpenDisplay() retry code.  This isn't a sensible thing for the
application to be doing, and XWin server needs to retry much more than just
XOpenDisplay().

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:18:56 +01:00
Jon TURNEY
4fc62aef80 hw/xwin: Improve comment about why we can't XCloseDisplay()
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:18:53 +01:00
Jon TURNEY
89eb7bdcad hw/xwin: Remove setjmp()/longjmp() error constants
Check specially that setjmp() returned a value which we don't pass to longjmp()
seems a bit over-complex.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:18:51 +01:00
Jon TURNEY
d0353bbe57 hw/xwin: Move WIN_MSG_QUEUE_FNAME to where it's used
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:18:48 +01:00
Jon TURNEY
fa0da5a020 hw/xwin: Use header for prototypes in textconv.c
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:18:46 +01:00
Jon TURNEY
cbe133752d hw/xwin: Remove unused X includes from internal.h and add them where needed
Also removing server headers we might clash with and no longer need.  Make
a few adjustments to allow for this change:

- provide a prototype of ErrorF()
- use the MAX() macro provided by sys/param.h, not the max() macro provided by misc.h
- use the X 'Bool' type rather than the unwrapped Windows 'BOOL' type

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:18:43 +01:00
Jon TURNEY
52f3cf3c61 hw/xwin: Remove standard includes from internal.h and add them where needed
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:18:41 +01:00
Jon TURNEY
5992550c4c hw/xwin: Add xwinclip test client
Add xwinclip test client, which includes stubs for winDebug(), ErrorF()

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:18:38 +01:00
Jon TURNEY
5ae674ae6d hw/xwin: Changes in error logging to make libwinclipboard more useful as a library
Consistently use ErrorF() rather than winErrorFVerb()

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:18:36 +01:00
Jon TURNEY
e1cf2b47be hw/xwin: Look up atoms in winClipboardProc()
Look up all atoms of interest in clipboard code in winClipboardProc() and pass
them down.

This avoids the need to check serverGeneration to notice when we need to
invalidate cached atom values.

Also consistently use cached atom values everywhere, rather than sometimes just
doing XInternAtom() again.

Remove WIN_LOCAL_PROPERTY as unused now, as we only refer to CYGX_CUT_BUFFER
once and do that directly.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:18:33 +01:00
Jon TURNEY
be61a1fc7e hw/xwin: Add fUseUnicode as parameter to winClipboardProc()
Add fUseUnicode as parameter to winClipboardProc()
Access g_fUseUnicode global when calling it

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:18:30 +01:00
Jon TURNEY
126c1cfaa5 hw/xwin: Separate libwinclipboard interface and internal header files
Rename the libwinclipboard internal header from winclipboard.h to internal.h

Put libwinclipboard's public interface into winclipboard.h

This lets winclipboardinit.c partake of that public interface, and all X server
headers without clashes

winInitClipboard() prototype belongs in a server header

v2: Remove duplicate declaration of winClipboardWindowDestroy()

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:13:07 +01:00
Jon TURNEY
30c535219e hw/xwin: Return a shutdown flag from winClipboardProc() if we should stop trying
Return a shutdown flag from winClipboardProc(), and use it in
winClipboardThreadProc() to determine if we should stop.

Currently this is set if the clipboard messaging window received a WM_QUIT.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:30 +01:00
Jon TURNEY
88d4459704 hw/xwin: Move clipboard integration code down to a subdirectory
Move clipboard integration code down to a subdirectory and build as a
convenience library

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:28 +01:00
Jon TURNEY
e965001a73 hw/xwin: Make g_hwndClipboard static
Move winFixClipboardChain() into winclipboardthread.c
Add winCLipboardWindowDestroy() function to access it for WM_DESTROY

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:25 +01:00
Jon TURNEY
03a59e7f78 hw/xwin: Add remaining clipboard globals to winglobals.h
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:23 +01:00
Jon TURNEY
8f9fba5bc1 hw/xwin: Hoist use of winSetAuthorization() and winGetDisplayName() up one level
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:20 +01:00
Jon TURNEY
a3c1e405cb hw/xwin: Eliminate g_pClipboardDisplay and g_iClipboardWindow globals
Eliminate the g_pClipboardDisplay and g_iClipboardWindow globals used to make
those values available to the clipboard wndproc, by passing them in via the
WM_CREATE message instead.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:18 +01:00
Jon TURNEY
229a0a83a4 hw/xwin: Move winClipboardCreateMessagingWindow() to winclipboardthread.c
Move winClipboardCreateMessagingWindow() from winclipboardinit.c to
winclipboardthread.c, the only place that uses it, and make it static.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:16 +01:00
Jon TURNEY
a70c2384a2 hw/xwin: Remove SetSelectionOwner wrapper, use XFixesSetSelectionOwnerNotify event instead
Use the XFixesSetSelectionNotify event instead of a SetSelectionOwner wrapper,
the completely equivalent client-side mechanism.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:13 +01:00
Jon TURNEY
ab55746c1b hw/xwin: Remove g_fClipboardLaunched, it's value is identical to g_fClipboardStarted
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:11 +01:00
Jon TURNEY
42d1381082 hw/xwin: Hoist setting of g_fClipboardStarted flag up one level
Hoist the setting of g_fClipboardStarted flag up one level.

Also move up the clearing of the g_fClipboardLaunched at the end of clipboard
function.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:08 +01:00
Jon TURNEY
290dbff075 hw/xwin: winProcEstablishConnection doesn't need to check if clipboard started
winProcEstablishConnection doesn't need to check if clipboard has already been
started.

It should be clear that we start the thread only once when the wrapper tells us
to, as the wrapper unhooks itself thereafter.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:05 +01:00
Jon TURNEY
91e55691ef hw/xwin: Hoist clipboard thread restart up one level
Hoist clipboard thread restart up one level.

Note that currently g_fClipboardLaunched is set the first time in the
winProcEstablishConnection wrapper, and subsequent times when the clipboard
thread restarts itself.

Try to clarify this and just set g_fClipboardLaunched before starting the
thread.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:06:02 +01:00
Jon TURNEY
0bb6eae4e3 hw/xwin: Push winClipboardShutdown() into winclipboardinit.c
Push winClipboardShutdown() into winclipboardinit.c
This lets us make g_ptClipboardProc static

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:05:59 +01:00
Jon TURNEY
6343b531d7 hw/xwin: Remove left-over pthread_exit() in clipboard code
Commit c1bf3baa44 removed all but one of the
pthread_exit() calls which used to call winClipboardThreadExit()

Fix the final remaining one to exit via done label on IOError instead.

Also fix a comment and report pre-flush failure to log, but do not exit

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-09-13 14:05:44 +01:00