Commit Graph

6993 Commits

Author SHA1 Message Date
Adam Jackson
ef22655311 xfree86: Remove spurious xf86ConfigError
READABLE.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-26 15:27:18 -04:00
Adam Jackson
35f0257360 xfree86: Remove Option "TextClockFreq"
No modern driver pays attention to this.  Presumably there existed
hardware once where you couldn't just read the right values out of the
CRTC.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-26 15:27:18 -04:00
Adam Jackson
6755aa2c12 xfree86: Remove xv clip notify driver hook
Nothing's using it.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-26 15:27:18 -04:00
Adam Jackson
7cd192edc1 loader: Deobfuscate RTLD_* macro stuff
POSIX requires that these be named correctly, no need to be clever.

Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-26 15:27:18 -04:00
Jon TURNEY
28337cb14e xserver: Move 'pragma GCC diagnostic' outside functions
$ gcc --version
gcc (Gentoo 4.4.3-r2 p1.2) 4.4.3

/jhbuild/checkout/xorg/xserver/os/log.c: In function ‘LogInit’:
/jhbuild/checkout/xorg/xserver/os/log.c:199: error: #pragma GCC diagnostic not allowed inside functions
/jhbuild/checkout/xorg/xserver/os/log.c:201: warning: format not a string literal, argument types not checked
/jhbuild/checkout/xorg/xserver/os/log.c:212: error: #pragma GCC diagnostic not allowed inside functions
/jhbuild/checkout/xorg/xserver/os/log.c:214: warning: format not a string literal, argument types not checked

etc.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-18 22:28:27 -07:00
Adam Jackson
670ee0757f ephyr: Properly implement hardware cursors (v3)
When dix hands us a new cursor we proxy it through to the host server;
since we keep the host XID on the cursor bits private we can switch
among them with just ChangeWindowAttributes.

v2:
Use xcb-renderutil for argb format lookup (Uli, Keith)
Fall back to core cursors for host RENDER < 0.5 (Keith)
Drop useless ephyrEnableCursor
Consistently create/destroy the cursor image GC on both paths
Treat null cursor from dix as invisible

v3:
Initialize the invisible cursor's image (Keith)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-09-18 15:27:10 -07:00
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
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
Adam Jackson
d3427717f2 xwayland: Snap damage reports to the bounding box
Instead of sending every little rect.  Lets x11perf run to completion,
makes 'while true; do gtkperf -a; done' take longer to crash.

This is effectively a resend of the same logic against the old
xfree86+xwayland branch:

http://lists.x.org/archives/xorg-devel/2013-October/038453.html

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-11 23:40:30 -06:00
Jasper St. Pierre
5ecc0315a2 xwayland: Implement throttling for surfaces based on the frame event
This implements simple throttling that keeps us to one attach per
frame. There isn't really an active performance benefit, since the
buffers will be redrawn only once per frame anyway, but it does cut down
on the chatty network traffic. Since the Wayland sockets might fill
up as well, the cut down on the volume of data we send out also provides
us with a big stability benefit.

Namely, mutter is a lot more stable running gtkperf, a fairly intensive
X11 application, after this change.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net>
2014-09-11 23:40:27 -06:00
Jasper St. Pierre
6c442fc4f7 xwayland-input: Fix a crasher for a race with the Wayland compositor
If something quickly maps and unmaps a window, then we'll immediately
create and destroy the Wayland surface that cooresponds to that
window. If our mouse pointer is over the window when the surface is
created, we'll receive a enter on the window.

Since resource creation and destruction is not synchronous, that
means that the compositor will queue up an event for a resource that's
eventually destroyed. On the client-side, when we receive this message,
we note that the resource isn't allocated, and get a NULL surface in our
enter handler. We immediately try to dereference this, and then crash.

This was caused by running gtkperf while moving the window a lot.

Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net>
2014-09-11 23:40:20 -06:00
Jon TURNEY
f92df22a03 hw/xwin/glx: Remove an incorrect assertion in glxWinDrawableSwapBuffers
The piglit test glx_make_current triggers this assertion, by making the context
current on a different drawable before issuing a glXSwapBuffers()

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29 13:56:36 +01:00
Jon TURNEY
b21321e515 hw/xwin/glx: Downgrade "forcing window to exist" message to debug
It happens whenever a GLX client uses GL on a window before it's been mapped, so
don't log it like an error.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29 13:55:21 +01:00
Jon TURNEY
31d0896336 hw/xwin/glx: Fix a couple of typo bugs in indirect.c
fbConfigToPixelFormatIndex()'s drawableTypeOverride parameter is a drawable
type bitmask, not a drawable type enum value

WGL_SWAP_COPY_ARB is a value of the WGL_SWAP_METHOD_ARB attribute for
wglChoosePixelFormatARB(), not an attribute itself

also remove duplicate error reporting for wglChoosePixelFormat() and fix a
comment

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29 13:52:08 +01:00
Jon TURNEY
b1ea714cdc hw/xwin/glx: Update .gitignore
Update to align with rewrite of wrapper generation script in commit
583a1146233f16d861706926706e5feec3baffba

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29 13:49:08 +01:00
Jon TURNEY
d1d3bd3596 hw/xwin/glx: Don't override the server supported GL extensions string.
Don't override the server supported GL extensions string.

The string reported to the client is the intersection of client, server and GL
implementation extensions.

Overriding the server supported GL extensions string like this causes extensions
which are supported by the client and implementation, but not by the server, to
be erroneously reported, so don't change it.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29 13:41:26 +01:00
Jon TURNEY
c99cd058a8 hw/xwin: Add an idempotency guard to glwindows.h
Add an idempotency guard to glwindows.h

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29 13:40:26 +01:00
Jon TURNEY
1c34e774ef hw/xwin: Fix a potential crash in winRedrawScreenShadowDDNL()
Seen during shutdown when using '-fullscreen' and '-depth 8'

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29 13:32:50 +01:00
Jon TURNEY
16d9da0886 hw/xwin: Improve choice of display name used by internal clients
Choose the display name used to connect to internal clients and exported into
environment of processes started from the traymenu so that it uses a transport
we know is working

This should mean the server can start correctly with -multiwindow and/or
-clipboard and any two of -nolisten inet6, -nolisten inet and -nolisten unix
(the server will correctly refuse to start if all 3 are used, as it must be
listening on at least one socket)

v2:
Place prototype for winGetDisplayName() in windisplay.h, and include it where
needed.

v3:
Include xwin-config.h, so that _XSERVER64 is defined, just in case anything
relies on that.

v4:
Replace grovelling around in the server's list of listeners with new Xtrans
TransIsListening() interface, added in Xtrans 1.3.3

See also [1]

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=10725

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29 13:28:00 +01:00
Jon TURNEY
95357539c1 hw/xwin: Makefile.am cleanup
- Rename XWIN_GLX_LINK_FLAGS -> XWIN_GLX_SYS_LIBS for consistency
- Rename MULTIWINDOW_LIBS -> MULTIWINDOW_SYS_LIBS for consistency
- Don't link with XWin with $(MAIN_LIB), it provides it's own main()
- Put one library per line for more intelligible diffs when one is added

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29 13:25:16 +01:00
Jon TURNEY
aa40d0c071 hw/xwin/glx: When generating shims, limit the considered features to GL version <=1.2
This fixes a problem when using Khronos registry data since the change of
2013-08-16 removed glBlend(Color|Equation) from GL1.2 and added them to
GL_ARB_imaging.

If shim generation considers all features, no shims are generated for
glBlend(Color|Equation) as they are first emitted for GL 1.4 (which we ignore as
shims are only generated for GL version <=1.2), then emission for GL_ARB_imaging
is skipped as they have already been emitted.

Also improve feature name matching so it is exact, not on an initial substring,
so 'GL_ARB_texture_compression_bptc' and 'GL_ARB_texture_compression_rgtc'
aren't matched by 'GL_ARB_texture_compression'.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-08-29 13:22:36 +01:00
Eric Anholt
35dc7c7515 Merge branch 'modesetting-import' into master
This reintroduces a "hardware" driver to the xfree86 directory.
Unlike the drivers that xorg used to include in the source tree, that
needed independent release schedules to get hardware support out the
door, the modesetting driver shouldn't change much as new hardware
gets released.  A lot of what this driver needs to do is just keep up
with server ABI changes.

This import was done by taking xf86-video-modesetting-0.9.0, and
running this script with 'git-filter-branch -f --tree-filter
~/bin/modesetting-filter':

mkdir -p hw/xfree86/drivers/modesetting

rm -f README autogen.sh configure.ac Makefile.am .gitignore
rm -f man/Makefile.am

mv man/modesetting.man hw/xfree86/drivers/modesetting/
mv COPYING hw/xfree86/drivers/modesetting/
mv src/* hw/xfree86/drivers/modesetting/
2014-08-26 11:07:55 -07:00
Laércio de Sousa
3a51418b2d ephyr: set screen size & origin from host X server output's CRTC geometry
If a given output is passed via new -output option, Xephyr will query
host X server for its info. If the following conditions are met:

 a. RandR extension is enabled in host X server;
 b. supported RandR version in host X server is 1.2 or newer;
 c. the given output name is valid;
 d. the given output is connected;

then Xephyr will get output's CRTC geometry and use it to set its own
screen size and origin. It's just like starting Xephyr in fullscreen mode,
but restricted to the given output's CRTC geometry (fake "Zaphod mode").

This is the main feature needed for Xephyr-based single-card multiseat
setups where we don't have separate screens to start Xephyr in fullscreen
mode safely.

Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21 20:14:55 -05:00
Laércio de Sousa
84b02469ef ephyr: enable screen window placement following kdrive -screen option extended syntax
With this patch, one can launch Xephyr with option "-screen WxH+X+Y"
to place its window origin at (X,Y). This patch relies on a previous
one that extends kdrive -screen option syntax to parse +X+Y substring
as expected.

If +X+Y is not passed in -screen argument string, let the WM place
the window for us, as before.

Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21 20:14:55 -05:00
Laércio de Sousa
376f4de8ae kdrive: add support to +X+Y syntax in -screen option parsing
This patch enhances current -screen option parsing for kdrive-based
applications. It can parse strings like
<WIDTH>x<HEIGHT>+<XOFFSET>+<YOFFSET>, storing X and Y offsets
in KdScreenInfo instances.

For negative values, this patch supports +-X+-Y (not -X-Y) syntax.

It will allow e.g. proper Xephyr window placement for multiseat
purposes.

Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21 20:14:54 -05:00
Thierry Reding
5d133276de xfree86: Allow non-PCI devices as primary
On platforms that don't support PCI or have no GPU attached to the PCI
bus, there can still be a primary device on a non-PCI bus.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21 20:04:08 -05:00
Thierry Reding
2f0183222b xfree86: Fallback to first platform device as primary
When neither of the various bus implementations was able to find a
primary bus and device, fallback to using the platform bus as primary
bus and the first platform device as primary device.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21 20:03:48 -05:00
Joerg Sonnenberger
c2548d71f7 Fix format string.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-17 14:18:45 -07:00
Keith Packard
d09c9ddb86 Merge remote-tracking branch 'jeremyhu/master' 2014-08-12 16:34:24 -07:00
Keith Packard
ee9f766abf xfree86: [v2] Remove duplicate InputInfoPtr typedef from xf86Xinput.h
GCC 4.2 doesn't accept 2 typedef declarations of the same type, so
remove the extra one from xf86Xinput.h and have xf86Xinput.h #include
xf86.h to make sure everyone using just that file gets the typedef.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
2014-08-12 15:36:57 -07:00
Jeremy Huddleston Sequoia
ab32ee3589 XQuartz: Better support turning off "Displays have separate Spaces" on OS X Mavericks
http://xquartz.macosforge.org/trac/ticket/1876

Follow-up to: 1c10b37380

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-08-11 13:18:51 -07:00
Eric Anholt
3714f54016 kdrive: Remove a dead struct.
It's never been used in the history of the tree.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-07 12:39:53 -07:00
Eric Anholt
ef258fa4fd xv: Drop the ClientPtr from the interface to the DDX.
Nobody was using it.

v2: Merge the hunk that was accidentally in the previous commit into
    this one.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-07 12:39:53 -07:00
Eric Anholt
850b268e2b xv: Remove the no-op AllocatePort/FreePort interfaces.
v2: Fix accidentally squashed-in change for dropping client from the
    arguments, which should have been in the next commit.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com> (v2)
2014-08-07 12:39:48 -07:00
Eric Anholt
41d4a626c6 kdrive: Don't bother explicitly clearing new window privates to NULL.
Privates are initially cleared to zero by dixInitPrivates().

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Eric Anholt
e311318b35 kdrive: Remove dead KXVPaintRegion().
It's been unused since mach64 was deleted, and now there's a helper in
core XV.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Eric Anholt
ea3f3b0786 xv: Move xf86 XV color key helper to core.
Color key overlay implementations want to reuse this code, and XF86's
had bugs (to be fixed in the next commit).

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Eric Anholt
b01cfe5f23 xv: Move CloseScreen setup from a DIX hook to normal wrapping.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Eric Anholt
e7dde86f23 xv: Move the DDX XV screen private allocation into the DDXes.
XV was going against convention by having the core infrastructure
allocate the private on behalf of the DDX.  I was interested in this
because I was trying to make multiple pieces of DDX be able to
allocate adaptors, and that wasn't going to work if DDX-specific code
was hung off of a single global screen private.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Eric Anholt
a146c6d421 xv: Drop the ddQueryAdaptors() interface.
The core was passing pointers to pxvs's nAdaptors and pAdaptors, and
the two hardware implementations were copying pxvs's nAdaptors and
pAdaptors into those pointers.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Eric Anholt
cb42805c66 xv: Move common code for adaptor cleanup to xvmain.c
Since any DDX XV screen cleanup would need this same code for freeing
the tree of pointers for xv adaptors, move it to the dix.

v2: Unconditionalize the pPorts freeing, to match the block above it.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com> (v1)
2014-08-06 20:12:20 -07:00
Eric Anholt
8cb0da2940 xv: Remove dead VIDEO_NO_CLIPPING from the xorg and kdrive DDXes.
As far as I can see, nothing has ever used this flag except possibly
the i.mx6 xorg ddx debug during bringup.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Eric Anholt
a6ec7d5278 xv: Remove dead VIDEO_INVERT_CLIPLIST from the xorg and kdrive DDXes.
As far as I can see (looking at trees on my disk, plus googling for
the term), nothing has ever used this flag

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06 20:12:20 -07:00
Keith Packard
61afe950e6 xfree86/modes: rotation damage is automatically destroyed on close
Don't try to destroy rotation_damage in the xf86RotateCloseScreen; it
will have been destroyed when the screen pixmap was destroyed.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-07-31 00:03:58 -07:00
Keith Packard
bd4198b01f xfree86: Avoid compiler warning for unused vars without systemd
When systemd isn't being used, systemd_logind_release_fd is defined
as an empty macro, leaving the arguments unused. Fix the compiler
warnings by simply removing the local variables and referencing the
structure within the macro call.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-07-31 00:03:39 -07:00
Keith Packard
90803042bc Fix files including xorg-server.h by mistake
A few files in the server are including xorg-server.h, which is only
for use by Xorg server drivers. This fixes those errors and then adds
a check to make sure it doesn't happen again.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-07-30 12:17:27 -07: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
5486c834fa xquartz: Remove unused DRI{,Post}ValidateTree
Cargo-culted from DRI1, not actually used for anything.

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
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
ac3af4bd21 xfree86: Remove unused HardEdges
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:53:19 -04:00
Adam Jackson
4100687ea6 xfree86: Remove useless #include "fb.h"
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:53:04 -04:00
Adam Jackson
2d451c5cdc xfree86: Remove pointless xf86RandRCreateScreenResources
Given the #if 0 this was wrapping for no effect.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:53:01 -04:00
Adam Jackson
a8cca7bd5a xfree86: Remove protectMem from VidMemInfo
Never filled in.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:52:58 -04:00
Adam Jackson
e4cf1e58f5 xfree86: Remove unused xf86{Map,Unmap}LegacyIO
I ported these to pciaccess in:

    commit 858fbbb40d
    Author: Adam Jackson <ajax@redhat.com>
    Date:   Fri Sep 16 13:33:04 2011 -0400

        pci: Port xf86MapLegacyIO to pciaccess

As of yet there are still no drivers using them, and there's not a lot
of value in having the wrappers when they just trivially call pciaccess
anyway.  Nuke 'em.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:52:52 -04:00
Adam Jackson
96206cf477 xfree86: Remove deprecated PCI types
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:52:50 -04:00
Adam Jackson
46fd5a28ef xfree86: Remove some unused pre-pciaccess types
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:52:46 -04:00
Adam Jackson
3bb9f9862b xfree86: Remove xf86ConfigActivePciEntity
The giant OBSOLETE DO NOT USE comment has been there since 2000,
probably it's safe to nuke by now.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:52:27 -04: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
150acef3af kdrive: Remove some dead bits of the man page
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:51:40 -04:00
Adam Jackson
a317e0a974 bsd: Remove some reference arm code behind #if 0
git history is reference enough, thanks.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:47:23 -04:00
Adam Jackson
6ddd164508 xfree86: Unify the ppc/sparc mmio-swap-or-not conditionals
Map SPARC_MMIO_IS_BE and PPC_MMIO_IS_BE to MMIO_IS_BE and use the same
macros for both since they're identical.

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:19:10 -07:00
Adam Jackson
8ffd1c066a xfree86: Clean up some silly __sparc macro usage
The top of this file already defines __sparc__ if __sparc is defined.

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:19:07 -07:00
Adam Jackson
1c1711b57f xfree86: Pull generic barrier() definition up to top level
And remove the redundant redecl from the nds32 section.

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:19:05 -07:00
Adam Jackson
c73929bbfc xfree86: Remove MMIO_ONB* and friends
Non-barrier-emitting MMIO writes.  They appear to be utterly unused,
burn it all down.

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:19:01 -07:00
Adam Jackson
9b33e31d41 xfree86: Clean up powerpc barrier decls
I think the externs are there for the non-gcc case?  And maybe there was
some assembly code to implement that once?  Whatever, at this point on
ppc the compiler is either gcc or willing to pretend.  The macros below
the decls take care of the actual eieio so the externs can just go.

Also remove a comment that maybe made sense once upon a time.

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:58 -07:00
Adam Jackson
b5141a1fab xfree86: Simplify a bunch of OS and arch conditionals
All of this is inside #ifdef __GNUC__, between that and configure.ac we
can assume there's a unixy thing under us.  Given that there's no real
reason to limit the arch paths to particular OSes, so let's not.

The final #elif here, combined with the ones before it, effectively said
"if not (alpha amd64 sparc* mips* ppc* arm* nds32 m68k sh hppa s390 m32r)",
and as the comment above it hints, it's meant to cover i386 (and happens to
also cover itanic).  Flip the conditional around to be sensible.

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:55 -07:00
Adam Jackson
6d3ba80f19 xfree86: Remove pre-2.6 Linux ppc support
2.6.0 was December 2003, you've had plenty of time to get your head in
the game.

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:52 -07:00
Adam Jackson
e242e82eba xfree86: Remove a useless !__SUNPRO_C guard
You can't tell from context here, but this is all inside #ifdef
__GNUC__, so this conditional can't do squat.

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:35 -07:00
Adam Jackson
93745a6c1a xfree86: Undef GCCUSESGAS
Can't be needed, we've never defined it in modular xserver.

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:33 -07:00
Adam Jackson
b1d9bc8d1d xfree86: Remove an unlikely bit of #pragma
__USLC__ appears to mean the SCO OpenServer compiler, which configure.ac
doesn't think is an OS the xfree86 ddx supports.  The conditionals
surrounding these pragmas effectively mean "if not gcc and not Sun C",
and probably arbitrary pragmas aren't supported by arbitrary compilers.

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:31 -07:00
Adam Jackson
f7f9ccef1d xfree86: Undef __HIGHC__
MetaWare High C++ compiler?  xfree86 cvs history shows this being added
in a commit whose text is, classically, "updates".  metaware.com
redirects to a 404 on synopsys.com, which to me indicates it's not super
important to them, and their order form won't even tell you how much the
thing costs.  At any rate if this is worth worrying about it's worth
letting autoconf worry about for us.

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:29 -07:00
Adam Jackson
80446086b9 xfree86: Undef FAKEIT
I guess this is meant to stub out all I/O port calls?  Whatever, it's
not been defined by the buildsystem at least as far back as monolith
6.8.2.

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:26 -07:00
Adam Jackson
8002b1a8cb xfree86: Remove a few random ppc decls
Whatever these are, they're not something grep can find, they must not
be used.

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:24 -07:00
Adam Jackson
5f5af5d669 xfree86: Remove remaining unused unaligned accessors
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:21 -07:00
Adam Jackson
d28b788e11 xfree86: Move generic unaligned helpers into int10 code
This is the only place they're actually used (well, aside from some XAA
code in the s3 driver, but one s3 and 2 XAA).

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:19 -07:00
Adam Jackson
956a8d5c92 xfree86: Remove unused unaligned int64 helpers
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:16 -07:00
Adam Jackson
da2b267186 xfree86: Unspecialize gcc variants of unaligned memory access
Yes yes, very clever, memmove works fine on gcc too, let's just do the
portable thing since none of this is performance code.

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:13 -07:00
Adam Jackson
e03c902e03 xfree86: Undefine NO_INLINE
Nothing in the server defines this, nor do any drivers.

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:11 -07:00
Adam Jackson
f63b8e44ab xfree86: Remove MMIO_MOVE32
Only used by mach64's XAA code, which isn't built if XAA isn't
available, and it isn't.

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:08 -07:00
Adam Jackson
1100935650 xfree86: Remove nds32_flush_icache
I guess this might have been needed for elfloader, except we didn't
support nds32 back then, so I assume this was cargo-culted from
ppc_flush_icache, which is also dead now.

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:06 -07: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
Carlos Garnacho
2172714c67 xwayland: Only disable/enable devices on capabilities change
Anytime a capability is first reported, the device is created, but after
that, it is only disabled/enabled.

This is a closer behavior to what Xorg does on VT switch, at the expense
of maybe leaving a dangling "physical" device if a capability goes for good.
Otherwise, any DeviceIntPtr (re)created after server initialization will be
left floating, and bad things happen when the wayland enter event handler
tries to update cursor position based on a floating device.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-24 16:52:41 -07:00
Adam Jackson
83701c4ee8 xfree86: Remove i2c multimedia modules
These came in with the GATOS merge I think.  The only driver using them
was radeon, and then only in UMS mode.  The radeon driver dropped UMS
support from the main branch about two years ago, the UMS branch hasn't
been touched in about fifteen months, and does not build against 1.16 in
any case, so this is all dead code.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-24 16:49:22 -07:00
Aaron Plattner
06268a0c55 xfree86: Remove stale /usr/share/X11/xorg.conf.d hard-code from the xorg.conf man page
I forgot that the old behavior of searching in /usr/share/X11/xorg.conf.d was
documented in the man page.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Fixes: acc0b5edd1 ("xfree86: Only support one sysconfigdir")
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-24 16:39:39 -07:00
Colin Walters
ac3acab131 xf86platformBus: Add assertion to avoid (fatal) compiler warning
Compilation of -video-intel started failing in gnome-continuous,
it's because xserver has -Werror=return-type on, and gcc can't
prove this function always returns a value:

   /usr/include/xorg/xf86platformBus.h:119:1: error: control reaches end of non-void function [-Werror=return-type]

Let's add assertions to the accessor functions to fix this.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-18 08:31:20 -07:00
Keith Packard
5c2e9fa3d6 Merge remote-tracking branch 'anholt/glamor-next' 2014-07-17 20:06:21 -07:00
Eric Anholt
6d49548849 Merge remote-tracking branch 'origin/master' into glamor-next
I've done this merge manually to resolve the minor conflict in glamor.c.

Signed-off-by: Eric Anholt <eric@anholt.net>
2014-07-17 18:07:26 -07:00
Eric Anholt
e310387f44 glamor: Remove always-true yInverted flag.
All users of glamor had the same value set, and it complicated things
for no reason.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-07-17 17:35:38 -07:00
Keith Packard
e678b4971b xfree86: Provide backward-compatibilty API for OdevAttributes
This allows drivers to compile using the old OdevAttributes API
against a new server. It generates compiler errors if the caller uses
the wrong or undefined attribute types, or if the caller provides an
incorrect default value for an integer attribute.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-07-17 17:11:05 -07:00
Keith Packard
60c05ce1ab config: Replace OdevAttributes linked list with struct
OdevAttributes are a fixed set of values with known types; instead of
storing them in a linked list and requiring accessor/settor functions,
replace the list header, struct OdevAttributes, with a struct that
directly contains the values. This provides for compile-time
typechecking of the values, eliminates a significant amount of code
and generally simplifies using this datatype.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-07-17 17:10:48 -07:00
Keith Packard
bfa5c73a36 ephyr: Free damage structure at server reset time
The usual mechanism for freeing a damage structure when the pixmap is
destroyed does not work for the screen pixmap as it isn't freed in the
normal way.

The existing driver cleanup function, scrfini, is called after the
wrapped CloseScreen functions, including damageCloseScreen, are called
and thus ephyr can't free the damage structure at that point.

Deal with this by providing an early CloseScreen hook in KdCloseScreen
which ephyr can use to free the damage structure before damage itself
shuts down.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2014-07-17 11:26:44 -07:00
Keith Packard
3319e7041f hw/xfree86: Let xf86Rotate leave the BlockHandler unwrapped when possible
When no shadow frame buffer is needed, the rotate block handler
doesn't need to be called any more. Remove it from the chain.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-07-17 11:17:25 -07:00
Keith Packard
79a2733005 hw/xfree86: Fix VGA arbiter screen proc wrapping
Change the screen proc epilog code to re-fetch the current screen
function in case a nested proc changes how things work. This isn't a
problem with the current code as all of the wrapping layers that are
set up at server init time (like the VGA arbiter) leave themselves in
the screen proc chain forever. But, this makes the code conform with
the expected norms.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-07-17 11:17:22 -07:00
Keith Packard
08fc33042c hw/xfree86: Fix block handler wrapping in xf86Rotate
xf86Rotate, it was delaying unwrapping the BlockHandler until after
calling xf86RotateRedisplay. If there was a software cursor on the
screen, the redisplay operation would cause cursor to be removed from
the frame buffer and the misprite block handler to be inserted into
the block handler chain with the misprite screen private saved block
handler now set to xf86RotateBlockHandler.

When xf86RotateRedisplay returned, xf86RotateBlockHandler would then
set screen->BlockHandler to its saved value, call down and then reset
screen->BlockHandler to xf86RotateBlockHandler. miSpriteBlockHandler
would never be called after that, which meant that the software cursor
will now disappear from the screen whenever rendering overlapped and
would only reappear when the cursor was moved.

To correct this, all that is needed is to move the restoration of
screen->BlockHandler to the top of xf86RotateBlockHandler, before the
call to xf86RotateRedisplay.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-07-17 11:17:15 -07:00
Aaron Plattner
acc0b5edd1 xfree86: Only support one sysconfigdir
When the X server is compiled with --prefix set to something other than /usr,
then it ends up with a nonstandard sysconfigdir in its .pc file.  This causes
various other components to install their xorg.conf.d snippets there.

However, the X server first looks for /usr/share/X11/xorg.conf.d before looking
in sysconfigdir.  That means that if the system administrator installed anything
that created that path, the user's custom sysconfigdir is not searched.

Rather than doing that, just look in the configured sysconfdir and nowhere else.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-07-14 08:48:13 +10:00
Peter Hutterer
578b9283bc xfree86: don't force the screensaver off on DPMS unblank, merely suggest it
Commit 41d4beb261 added symmetry to the
screensaver/DPMS invocations so that one (en|dis)ables the other. Having
dependencies between DPMS and the screensaver is subject to further arguments,
but in this particular case using SCREENSAVER_FORCER is detrimental.
SCREENSAVER_FORCER(ScreenSaverReset) resets the idle time for all
devices on DPMS unblank.

It prevents at least one use-case that GNOME tries to implement:
GNOME displays a notification before suspending. If the display is
currently blanked, GNOME lights it up to display the message. With the
original patch in place DPMS unblank also resets the device idle times, thus
restarting the timeout ad infinitum.

Switch this to a more suggestive SCREENSAVER_OFF(ScreenSaverReset). This keeps
the symmetry in blanking mode (DPMS and screensaver turn each other on/off as
expected) but does not reset the idle time on the devices.

https://bugzilla.gnome.org/show_bug.cgi?id=731241

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-By: Egbert Eich <eich@freedesktop.org>
2014-07-14 08:39:50 +10:00
Keith Packard
9de3cc8daa Merge remote-tracking branch 'jturney/master' 2014-07-07 16:53:07 -07:00
Thierry Reding
b6cc489838 xfree86: Make error message more readable
While at it also replace a tab by four spaces for consistency.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-07 16:13:20 -07:00
Thierry Reding
eeefecd9df xfree86: Support driver loading via OutputClass
Use the OutputClass configuration to determine what drivers to autoload
for a given device.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-07 16:12:41 -07:00
Thierry Reding
a270bb18ba xfree86: Introduce OutputClass configuration
The OutputClass section provides a way to match output devices to a set
of given attributes and configure them. For now, only matching by kernel
driver name is supported. This can be used to determine what DDX module
to load for non-PCI output devices. DDX modules can ship an xorg.conf.d
snippet (e.g. in /usr/share/X11/xorg.conf.d) that looks like this:

	Section "OutputClass"
	    Identifer "NVIDIA Tegra open-source driver"
	    MatchDriver "tegra"
	    Driver "opentegra"
	EndSection

This will cause any device that's driven by the kernel driver named
"tegra" to use the "opentegra" DDX module.

See the OUTPUTCLASS section in xorg.conf(5) for more details.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-07 16:12:09 -07:00
Thierry Reding
856bb80cea xfree86: Store kernel driver name in platform device attribute
When opening a DRM device, query the version and store the driver name
as a new attribute for future reference.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-07 16:11:34 -07:00
Thierry Reding
5a4e15c3f6 xfree86: Make driver matching consistent
Most of the driver enumeration functions take an array and a maximum
number of entries that they are allowed to fill in. Upon success, they
return the number of entries filled in. This allows them to be easily
used to consecutively.

One exception is the xf86MatchDriverFromFiles() function, which doesn't
return a value, so callers have to manually search the array for the
first empty entry.

This commit modifies the xf86MatchDriverFromFiles() to behave the same
way as others, which makes it easier to deal with.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-By: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Rob Clark <robdclark@gmail.com>  (on arm / platform device)
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-07-07 16:11:00 -07:00
Yaakov Selkowitz
a5499870e2 hw/xwin: link dynamically and export symbols
With my patch to fix shared libXfont to work correctly on Cygwin/Win32,
there is no need for -static anymore.  But, XWin.exe must export its
symbols in order for them to override libXfont's stubs.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-07-03 15:48:07 +01:00
Kristian Høgsberg
2f113d68f6 xwayland: Add glamor and DRI3 support
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-24 15:09:55 -07:00
Chris Wilson
18744907d0 dri2: Invalidate DRI2Buffers upon SetWindowPixmap updates
When transitioning to a redirected or unredirected Window, the Composite
layer modifies the Window's Pixmap. However, the DRI2Buffer for the
Drawable is still pointing to the backing bo of the old Pixmap with the
result that rendering goes astray.

This now also effects DRI2 Drawables that are touched by PresentPixmap.

v2: Fixup the function name after rebasing

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Reinis Danne <reinis.danne@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-23 15:05:08 -07:00
Chris Wilson
4d92fab39c dri2: Use the PrimeScreen when creating/reusing buffers
This fixes a segfault when we attempt to call ds->ReuseBufferNotify()
passing a Prime DRI2BufferPtr to the master backend.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80001
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-23 14:54:54 -07:00
Eric Anholt
199d9a6a94 xephyr: Allow initializing glamor with gles2 (on GLX).
This should be useful for glamor development, so you can test both
paths (which are significantly different, and apparently
glamor_gradient.c was broken on GLES2 as of the import).

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-16 05:43:43 +01:00
Eric Anholt
98b6158bc1 glamor: Share code for put_image handling.
The difference between the two is that XF86 has the clip helper that
lets you upload less data when rendering video that's clipped.  I
don't think that's really worth the trouble, especially in a world of
compositors, so I've dropped it to get to shared code.

It turns out the clipping code was broken on xf86-video-intel anyway.
To reproduce, run without a compositor, and use another window to clip
the top half of your XV output on the glamor XV adaptor: the rendering
got confused about which half of the window was being drawn to.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-15 23:20:09 +01:00
Eric Anholt
34884e16bf ephyr: Add support for XV using glamor.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-15 23:20:06 +01:00
Eric Anholt
23d303bf90 kdrive: Mark XV names const to avoid warnings.
No code modifies it at runtime, and it's common to store string
literals to it.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-15 23:20:04 +01:00
Eric Anholt
65efc14b6a glamor: Split the XV code into XF86-dependent parts and generic.
I want to expose this from Xephyr as well, both to be able to test XV
changes rapidly, and beause the XV passthrough to the host's overlay
really doesn't work out well when we glXSwapBuffers() over the
colorkey.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-15 23:20:02 +01:00
Eric Anholt
a5662193f1 kdrive: Simplify the adaptor setup interface.
Now that we don't have to worry about the generic adaptors code,
there's no need to have a list of pointers to different sets of
adaptors.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-15 23:19:59 +01:00
Eric Anholt
55aad7399d kdrive: Remove dead generic XV adaptors code.
I couldn't find any callers in the history of the tree.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-15 23:19:57 +01:00
Eric Anholt
0edc0a78fb kdrive: Do a little more cleanup from the XV struct deduplication.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-15 23:19:54 +01:00
Eric Anholt
1d90e8811a xorg: Remove duplicated definitions of some XV-related structs.
These were field-for-field identical, so we can just typedef them to
be the same, and memcpy their contents.

v2: Fix missed strdup().

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-15 23:19:51 +01:00
Keith Packard
14d82a2bc3 ephyr: Deal with non-root visual for window
glx will sometimes select a non-root visual, deal with that by
creating a suitable colormap and using that instead of attempting to
use the default colormap.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-06-12 22:52:36 -07:00
Chris Wilson
7ca458493a xfree86: Report Present as a built-in module
This is so that drivers can do a runtime check that Present is available,
similar to existing runtime checks performed by the drivers for DRI.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02 13:11:18 -07:00
Chris Wilson
746be5a03e xfree86: Report DRI3 as a built-in module
This is so that drivers can do a runtime check that DRI3 is available,
similar to existing runtime checks performed by the drivers for DRI and
DRI2.

v2: Only add DRI3 to the list if the module was actually built into the
server (Mark Kettenis).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02 13:11:15 -07:00
Keith Packard
b5526141f7 Merge remote-tracking branch 'jturney/master' 2014-06-02 13:08:23 -07:00
Max Filippov
dc8d068847 xtensa: add support for xtensa architecture
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02 13:05:40 -07:00
Keith Packard
a6ffdc69c4 Merge remote-tracking branch 'jeremyhu/master' 2014-06-02 11:30:24 -07:00
Søren Sandmann
63c48de63b xfree86: Add "modesetting" to list of fallback drivers
To make X -configure work properly, the output of fixup_video_driver_list()
should be in order of preference. Otherwise, the config file may use
the incorrect driver for some devices.

In particular, the drivers that work for all (or many) devices need to be
last in the list. Since the modesetting driver works for many devices,
it needs to be considered a fallback driver.

Signed-off-by: Søren Sandmann <ssp@redhat.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-06-02 11:26:35 -07:00
Keith Packard
ab47ec9636 Merge remote-tracking branch 'whot/for-keith' 2014-06-02 11:22:48 -07:00
Jon TURNEY
aaaa413456 hw/xwin: Update for __glXLastContext -> lastGLContext
Update for __glXLastContext -> lastGLContext.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-06-02 13:07:17 +01:00
Jeremy Huddleston Sequoia
1c10b37380 XQuartz: Update logic to account for title bar on every display in Mavericks
<rdar://problem/14205847>
http://xquartz.macosforge.org/trac/ticket/832

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-05-31 17:48:29 -07:00
Jeremy Huddleston Sequoia
ad0ff649c6 XQuartz: Dead code removal (ENABLE_DEBUG_LOG)
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-05-31 17:48:19 -07:00
Jeremy Huddleston Sequoia
e281288d5a XQuartz: Bump to 2.7.7
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-05-31 17:47:40 -07:00
Peter Hutterer
e48a132b6d xfree86: fix wrong DontZap documentation (#71113)
X.Org Bug 71113 <http://bugs.freedesktop.org/show_bug.cgi?id=71113>

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-05-24 20:02:56 +10:00
Adam Jackson
6d684f916b shadowfb: Fix initialization
This has to run at initial CreateWindow time, at CreateScreenResources
the root window doesn't actually exist yet.

Tested-by: Michael Thayer <michael.thayer@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Michael Thayer <michael.thayer@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22 17:56:24 -07:00
Adam Jackson
d9e99edd4d glxproxy: Fix memory leak on error path in CreateGLXPixmap (#50281) (v2)
v2: Fix another path spotted by keithp

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22 17:13:59 -07:00
Adam Jackson
dff1f5e1a9 dmx: Fix memory leak in dmxBELoadFont (#50281)
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22 17:13:34 -07:00
Michal Srb
3dba171f5e dri2: Fix detection of wrong prime_id in GetScreenPrime.
Checking the iterating variable ("slave") against null can not detect if the
xorg_list_for_each_entry finished without break being invoked - slave variable
will be always non-null. This caused segfault whenever someone tried to use
DRI_PRIME with incorrect id while having at least one render offloading slave
configured.

Restructurize the GetScreenPrime to work as expected.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22 16:27:44 -07:00
Alexey Brodkin
c08d2b8ccb ARC: Add support for ARC architecture
Xorg server could be built for and run on Synopsys DesignWare ARC cores.
These changes are required for successful building and execution of the server.

Both little-endian and big-endian flavors of ARC cores are supported.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Egbert Eich <eich@freedesktop.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-22 16:15:21 -07:00
Adam Jackson
042bae0b49 Use own thunk function instead of shadowUpdatePackedWeak
I plan to remove the Weak functions from a future server.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-05-21 10:17:02 -04:00
Laércio de Sousa
fb24ac0a2c xfree86: fix warnings after MatchSeat patch
This patch fixes some compile warnings that arise after
commit 7070ebeeba
(xfree86: add new key MatchSeat to xorg.conf sections "Device", "Screen", and "ServerLayout")
available at git repository
git://people.freedesktop.org/~whot/xserver for-keith

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-05-12 14:14:28 -07:00
Keith Packard
d60724b752 Merge commit 'who/for-keith'
Skipping two unreviewed patches; will mark them reviewed and cherry pick
2014-05-08 12:58:41 -07:00
Peter Hutterer
15460eaed2 systemd-logind: let the logind code decided whether to close an fd
We can only request one fd per device from systemd-logind. If a fd is re-used
by the same device, releasing the fd from one device doesn't mean we can close
it. The systemd code knows when it's really released, so let it close the fd.

Test case: xorg.conf section for an input device with hotplugging enabled.
evdev detects the duplicate and closes the hotplugged device, which closes the
fd. The other instance of evdev thinks the fd is still valid so now you're
playing a double lottery. First, which client(s) will get the evdev fd?
Second, which requests will be picked up by evdev and which ones will be
picked up by the client? You'll never know, but the fun is in finding out.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-05-05 07:26:33 +10:00
Dave Airlie
219ce9e6c3 modesetting: fix build regression against older servers.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-05-02 13:16:05 +10:00
Dave Airlie
795af9ff01 modesetting: fix use after free.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-05-02 13:14:30 +10:00
Keith Packard
42a4873cc7 hw/xfree86: Video Driver ABI version 18.0
With the change in the cursor interface in
4c3932620c, we need to bump the video
driver ABI number to ensure that drivers are rebuilt to match the new
interface.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2014-05-01 16:53:57 -07:00
Laércio de Sousa
a6f5ffd587 xfree86: add short description about MatchSeat key in xorg.conf man page
Signed-off-by: Laércio de Sousa <lbsousajr@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-05-01 08:19:19 +10:00
Oleg Samarin
7070ebeeba xfree86: add new key MatchSeat to xorg.conf sections "Device", "Screen", and "ServerLayout"
This patch introduces a new key MatchSeat in xorg.conf (also applies to
any .conf file in xorg.conf.d). It will allow targeting a given
"Device", "Screen", and/or "ServerLayout" section to a particular
seat only (specified by option "-seat" in X server command line),
so that other seats won't be affected.

Without this patch, one needs to write a separate xorg.conf.custom
file and pass it to X server via "-config" option, if one wants that
these settings only apply for the right seat. However, in some cases,
this solution is undesirable or even impossible (e.g. when using GDM,
which doesn't allow X server command line customization).

Example file (/etc/X11/xorg.conf.d/seat1.conf), which would be ignored
by X server unless it was started with "-seat seat1" option:

Section "Device"
    Identifier "card0"
    Driver "nvidia"
    Option "NoLogo" "True"
    MatchSeat "seat1"
EndSection

Signed-off-by: Oleg Samarin <osamarin68@gmail.com>
Signed-off-by: Laércio de Sousa <lbsousajr@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-05-01 08:19:19 +10:00
Laércio de Sousa
29b1484bb9 xfree86: allow fallback to PCI bus probe for graphics devices on non-seat0 X servers (#66851)
Currently non-seat0 X servers only probe platform bus for graphics devices,
which is OK for most KMS-compliant drivers. However, for non-KMS drivers
(like NVIDIA proprietary ones), graphics devices can't be reached
by platform bus probe, resulting in a "No devices detected" error.

This patch allows a fallback to PCI bus probe for non-seat0 X servers
in case no platform bus graphics device is found.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66851

Signed-off-by: Laércio de Sousa <lbsousajr@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-05-01 08:19:18 +10:00
Hans de Goede
f073b5e582 Add support for server managed fds
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-04-28 13:08:55 +02:00
Thierry Reding
b92a9289fe xfree86: int10: Fix build on ARM
Commit 7353ec7cb6 "xfree86: Switch int10
code to stdint types" uses designated initializers to setup the fields
of the X86EMU_pioFuncs.

This breaks compilation on ARM, since out{b,w,l}() are redefined using
the preprocessor and therefore cause the compiler to complain about
non-existent fields being assigned to.

It seems like the compiler.h header that contains these redefinitions
isn't actually needed in xf86x86emu.c, so the easiest "fix" is to not
include it.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
2014-04-27 12:02:39 -04:00
Rob Clark
774fea38c4 int10: fix build error
Fixes:

  stub.c:66:1: error: conflicting types for 'xf86int10Addr'
  In file included from stub.c:14:0:
  xf86int10.h:72:53: note: previous declaration of 'xf86int10Addr' was here

Signed-off-by: Rob Clark <robdclark@gmail.com>
2014-04-27 12:02:16 -04:00
Keith Packard
4c3932620c hw/xfree86: Restore API compatibility for cursor loading functions
Create load_cursor_image_check, load_cursor_argb_check,
LoadCursorImageCheck and LoadCursorARGBCheck that can return failure
and use them in preference to the old unchecked variants.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Michael Thayer <michael.thayer@oracle.com>
2014-04-25 14:41:52 -07:00
Dominik Behr
70e564104b xf86RandR12: use correct gamma size when allocating gamma table
When setting crtc->gamma_size to randr_crtc->gammaSize we should
use randr_crtc->gammaSize to allocate new gamma table in crtc.
Currently, if randr_crtc->gammaSize > crtc->gammaSize the subsequent
memcpy will overwrite memory beyond the end of gamma table.

Signed-off-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-21 22:27:09 -07:00
YunQiang Su
19e5a13970 Fix hw/xfree86/common/compiler.h for mips64
Mark mips64 as 64bit
Use long as PORT_SIZE

Signed-off-by: YunQiang Su <wzssyqa@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-21 22:02:32 -07:00
Keith Packard
5df66822c9 shadowfb: Fix compilation errors
Ok, that's embarassing -- I didn't even make sure Adam's patch
compiled. These are minimal fixes to make it build.

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-21 21:39:43 -07:00
Adam Jackson
2dcb167262 shadowfb: Port to miext/damage (#31303, #65547)
Somewhat shocking how much simpler this is, isn't it?  We no longer need
to wrap the screen or GC or Picture, because damage does it for us,
which is doubly great since the old shadowfb code didn't wrap _enough_
things (border updates and Render glyphs, at least).  The only real
difference now between this and shadow is a) shadow will let you track
arbitrary pixmaps, and b) shadow's update hook runs off the BlockHandler
whereas shadowfb is immediate.

Tested on nouveau.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-21 21:33:52 -07:00
Alan Coopersmith
935ea0d7b5 dmxConfigCanvasUpdate: Delay dereference until after checking for NULL
Flagged by cppcheck 1.64:
[hw/dmx/config/xdmxconfig.c:306] -> [hw/dmx/config/xdmxconfig.c:323]:
 (warning) Possible null pointer dereference: fs - otherwise
           it is redundant to check it against null.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-21 20:54:22 -07:00
Keith Packard
ba5c2b6c87 Merge remote-tracking branch 'krh/xwayland-for-keithp' 2014-04-21 14:59:51 -07:00
Kristian Høgsberg
66b6024740 xwayland: Remove left-over ErrorF logging
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2014-04-21 11:25:12 -07:00