Commit Graph

14619 Commits

Author SHA1 Message Date
Adam Jackson
c52a2b1eba mi: Fix regression in arc drawing
xts' XDrawArcs/15 regressed (turning into a server-side infinite loop)
after:

    commit 7679afd4da
    Author: Adam Jackson <ajax@redhat.com>
    Date:   Fri Sep 26 12:01:37 2014 -0400

        mi: Fold mifpolycon.c into miarc.c

The reason is miarc.c provided its own definitions (sigh) of min/max,
that both accept int arguments and return an int.  Since miFillSppPoly
uses a double (sigh) and some min-involving math for its loop index
variable, things do not go well.

Since the integer versions of min/max are redundant, nuke 'em.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-11-24 20:35:59 -08:00
Keith Packard
ec0ac8970b Merge remote-tracking branch 'whot/for-keith' 2014-11-24 15:39:51 -08:00
Keith Packard
65cc0982af glamor: Don't insert fbos from external objects into fbo cache
Mark fbos created from external buffers so that when the associated
pixmap is destroyed, they aren't put into the fbo cache for later
re-use and are instead freed immediately.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-11-20 14:33:00 -08:00
Peter Hutterer
0f88d4e793 mi: fix documentation for miPointerSetPosition
Changed when we added barriers, documentation didn't get updated.

Reported-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2014-11-12 11:24:56 +10:00
John Hunter
6a117af7e7 fix an annotation mistake
Signed-off-by: John Hunter <zhaojunwang@pku.edu.cn>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:26:02 +10:00
Peter Hutterer
732fd7e571 Drop trailing whitespaces
sed -i "s/[ ]\+$//g" **/*.(c|h)

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

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
Peter Hutterer
96143d6dc3 dix: silence compiler warning comparing CARD32 to -1
window.c:3246:36: warning: comparison of constant -1 with expression of type
'CARD32' (aka 'unsigned int') is always true
[-Wtautological-constant-out-of-range-compare]
    if (optional->backingBitPlanes != ~0L)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
2014-11-12 10:25:00 +10:00
Peter Hutterer
04ca169979 dix: silence compiler warning
inpututils.c:243:26: warning: comparison of constant 256 with expression of
type 'KeyCode' (aka 'unsigned char') is always false
[-Wtautological-constant-out-of-range-compare]
        if (modkeymap[i] >= MAP_LENGTH)
                    ~~~~~~~~~~~~ ^  ~~~~~~~~~~

MAP_LENGTH depends on MAX_BUTTONS which is somewhat arbitrarily chosen. We
don't expect this to ever change, but just in case leave the condition there
so the code is correct if we drop the number down.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
Peter Hutterer
79b9d33545 xwayland: declare fatal log handler as noreturn
xwayland.c:661:1: warning: function 'xwl_log_handler' could be declared with
attribute 'noreturn' [-Wmissing-noreturn]

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
Peter Hutterer
adee4f239b xfree86: drop double-typedef of DBusConnection
Just include dbus.h, it's been typedef'd there since 2003.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
Peter Hutterer
25315ee555 Xext: fix clang compiler warning
shm.c:1150:24: warning: equality comparison with extraneous parentheses
[-Wparentheses-equality]
    if ((shmdesc->addr == ((char *) -1))) {

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
Peter Hutterer
995ecfb51d include: change RegionSize() to take a size_t
/usr/include/xorg/regionstr.h:130:36: warning: implicit conversion changes
signedness: 'int' to 'unsigned long' [-Wsign-conversion]
    return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec)));
                                   ^  ~

Really only just pushes the problem to the caller, but maybe that motivates
someone to fix it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
Peter Hutterer
3ccec1b5ba include: fix documentation for list.h
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-11-12 10:24:55 +10:00
Colin Harrison
5920433c3a hw/xwin: Don't allocate one wchar_t too much for unicode text placed on the Windows clipboard
The count of wchar_t returned by MultiByteToWideChar() includes the terminating
null character, so don't add one to it.

Also, reduce the scope of various length variables

Signed-off-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2014-11-09 14:24:44 +00:00
Jon TURNEY
d172cd630d hw/xwin: Fix hang on shutdown when we own the clipboard.
If we are the clipboard owner when we are shutdown, we recieve a
WM_RENDERALLFORMATS, to render the clipboard, so it's contents will remain
available to other applications.  Unfortunately, this is far too late to do
anything useful with, as the server is waiting for the clipboard thread to exit,
and so can't process requests to convert clipboard contents.

Change so we just do nothing on WM_RENDERALLFORMATS. (I'm not convinced that
WM_RENDERALLFORMATS has ever worked usefully, in any case).

(To make this work, I guess we would need to rearrange the way shutdown works
completely: first synchronously stop the clipboard, then stop the X server)

We also then receive a WM_DRAWCLIPBOARD, perhaps telling us that the available
clipboard formats have changed (as ones which haven't been rendered are now
removed), but the clipboard owner is now the system, not us, which we have to
arrange to ignore.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-11-09 14:22:53 +00:00
Jon TURNEY
94d433c8cb hw/xwin: Fix clipboard thread restart
It seems that the clipboard thread restart mechanism has been broken for a
while, which can be demonstrated using XDMCP with KDM (e.g. to a Kubutunu 12.04
host)

KDM kills all attached clients, including the clipboard integration client,
which restarts, but then exits on WM_QUIT.

Using PostQuitMessage() in WM_DESTROY is unhelpful, as we may not actually be
quitting the thread, if we just destroyed the window because the clipboard
thread is about to retry, because he WM_QUIT message sticks around, and is
noticed the next time we look at the window message queue and confuses us into
thinking we need to quit.

Sending a WM_DESTROY is apparently never correct anyhow, see [1]

So:

1/ Use DestroyWindow() to destroy the clipboard messaging window when cleaning
up for retry or exit in winClipboardProc (the clipboard thread main proc)

2/ Send a special WM_WM_QUIT message in winClipboardWindowDestroy() from the X
server thread when the X server is resetting.

3/ When processing that WM_WM_QUIT message in the clipboard thread, cause the
clipboard window to PostQuitMessage(), which causes the clipboard thread to
exit.

[1] http://blogs.msdn.com/b/oldnewthing/archive/2011/09/26/10216420.aspx

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-11-09 14:22:51 +00:00
Jon TURNEY
b4a08e642b hw/xwin: Improve reliability of clipboard X->Windows pastes
Sometimes, particularly with large clipboard pastes to Windows, we could end up
waiting for the timeout to expire, rather than pasting the data.

Various changes to improve reliability:

1. Use XFlush() not XSync() in winProcessXEventsTimeout().

It makes no sense to ensure we have received replies to outstanding requests if
we are going to wait for them using select()

2. Add XFlush() to winClipboardProc()

Make sure we have sent any requests before we wait using select()

3. Don't use FD_ISSET() to check which fd is ready

This looks like a Cygwin select() bug in that it sometimes returns 0 with an
empty fd set before the timeout expires, but a fd appears to be ready.

Add select() return value to debug output when we are warning that this has
happened.

4. Drain event queues before entering select()

Unconditionally drain event queues before entering select().  This seems to be
the recommended way of writing select() and X event processing loops.

winClipboardFlushXEvents() checks using XPending(), and
winClipboardFlushWindowsMessageQueue() checks using PeekMessage() so this is
safe against blocking, but means that may not need to enter select() at all
sometimes.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-11-09 14:22:48 +00:00
Jon TURNEY
c03f9e23c2 hw/xwin: Add controls for enabling/disabling monitoring of PRIMARY selection
xwinclip: Add -noprimary option
Xwin: Add -primary and -noprimary options and tray-menu control

v2:
Use Bool type for fPrimarySelection
Add -noprimary to usage message
Fix indentation in hw/xwin/winwndproc.c

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-11-09 14:22:35 +00:00
Jon TURNEY
851b504199 hw/xwin: Retrieve TARGETS to avoid unnecessary failing conversion attempts
See http://cygwin.com/ml/cygwin-xfree/2013-07/msg00016.html

It looks like the change in a9aca218f5 had some
unforseen consequences.

If the X11 selection contents are not convertable to COMPOUND_TEXT, UTF8_STRING
or STRING format (for example, if it is an image), after those conversion
attempts have failed, we sit in winProcessXEventsTimeout() until the timeout
expires.

It also seems that maybe gnuplot doesn't respond correctly to this sequence of
conversion requests and doesn't reply to some of them, which also causes us to
sit in winProcessXEventsTimeout() until the timeout expires.

The Windows application which has requested the clipboard contents via
GetClipboardContents() is blocked until we return from WM_RENDERFORMAT, so
sitting waiting for this timeout to expire should be avoided.

So instead, explicitly request conversion to the TARGETS target, choose
the most preferred format, and request conversion to that.

Also: if there is no owned selection, there is nothing to paste, so don't bother
trying to convert it.

v2: Fix compilation with -Werror=declaration-after-statement

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-11-06 12:23:03 +00:00
Jon TURNEY
4db1241037 hw/xwin: In SelectionNotify, don't pointlessly retrieve just the size of the property
Don't pointlessly retrieve just the size of the property, if we are then going
to assume we can retrieve the whole property in one request anyhow...

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-11-06 12:10:08 +00:00
Jon TURNEY
c5ad92077e hw/xwin: In SelectionNotify, delete the property containing returned data after we have retrieved it
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-11-06 12:09:12 +00:00
Jon TURNEY
ff018d88b9 hw/xwin: Remove some redundant clipboard externs, now defined in winglobals.h
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2014-11-06 12:07:34 +00:00
Thierry Reding
63bb5c5ef1 xv: Add missing gcstruct.h include
Commit ea3f3b0786 (xv: Move xf86 XV color key helper to core.) added
code that uses internals of struct _GC. This structure is defined in the
include/gcstruct.h header which wasn't included by the source file, only
gc.h was. That caused the following build failure:

	  CC       xvmain.lo
	Xext/xvmain.c: In function 'XvFillColorKey':
	Xext/xvmain.c:1114:13: error: dereferencing pointer to incomplete type
	         (*gc->ops->PolyFillRect) (pDraw, gc, nbox, rects);
	             ^

Fix this by including the correct header file.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Tested-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-31 07:00:01 -07:00
Axel Davy
882f2d10d9 Fix present_notify to return right away when querying current or past msc.
When the target msc is past or is the current one, we want to get immediate
feedback. This patch fixes this behaviour.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-30 14:37:15 -07:00
Aaron Plattner
72a0754f46 xfree86: Bump ABI versions (video: 19, extension: 9)
Among other things, commit b851ca968b added a
NameWindowPixmap function pointer to ScreenRec, shifting some of the fields
around.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-30 13:57:16 -07:00
Peter Hutterer
b227d97456 include: fix compiler warning about casting int to uint16_t
/usr/include/xorg/misc.h:141:30: warning: implicit conversion loses integer
precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wconversion]
    return ((x & 0xff) << 8) | ((x >> 8) & 0xff);
        ~~~~~~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~

Function sig is a uint16_t, so just force the cast.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-10-30 09:07:49 +10:00
Keith Packard
e9db768202 Update to version 1.16.99.901
1.17 RC1

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-28 21:32:24 -07:00
Keith Packard
5ff74d68b0 xfree86: Include 'drivers' directory with distribution
Even if we don't build it locally, make sure it gets included with the release.

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-28 21:31:40 -07:00
Keith Packard
f36f16f055 dri2: Distribute new pci_ids headers
Create hw/xfree86/dri2/pci_ids/Makefile.am which includes all of the new
pci id files in the tarballs. Build that from configure.ac, and run it
from dri2/Makefile.am

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-28 21:30:23 -07:00
Keith Packard
65dd1ba7b3 dix: Untwist transformAbsolute logic, eliminate uninitialized value warnings
tranformAbsolute has a pretty simple job, that of running the X/Y
values from a device through the transformation matrix. The tricky bit
comes when the current device state doesn't include one of the
values. In that case, the last delivered value is back-converted to
device space and used instead.

The logic was twisted though, confusing GCC's uninitialized value
detection logic and emitting warnings.

This has been fixed by changing the code to:

 1) Detect whether the ValuatorMask includes X/Y values
 2) If either are missing, back-convert the current values into ox/oy
 3) When X/Y are present, set ox/oy to the current value
 4) Transform
 5) Store X/Y values if changed or if they were set before.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-10-28 20:56:37 -07:00
Adam Jackson
0fbbdb37c8 composite: Wrap GetSpans
GetSpans should flush composition from children to parent, just like
GetImage and SourceValidate.  Fortunately no one is likely to have
noticed, since to hit this you're already deep into failure town.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-28 11:29:48 -07:00
Keith Packard
da70c7d556 xkb: Initialize 'bad' Atom in _XkbSetNamesCheck
When _XkbCheckAtoms returns NULL for an error, it always sets the
error return code, but GCC can't figure that out, so just initialize
the local variable, 'bad', in _XkbSetNamesCheck to eliminate the warning.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-10-28 11:26:23 -07:00
Keith Packard
2566835b43 os: Eliminate uninitialized value warnings from access.c
The ConvertAddr function doesn't reliably set the 'addr' return value,
and so callers are getting flagged for using potentially uninitialized
values. Initialize the value in the callers to NULL and then go ahead
and check for NULL values before using them.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-10-28 11:25:56 -07:00
Alex Orange
1b94fd7779 fb: Fix Bresenham algorithms for commonly used small segments.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=54168

Fix errors introducted in 863d528a9f. Said
patch does indeed remove the problematic writes to bad memory, however
it also introduces errors in the algoritm. This patch has the effect of
reverting said patch and adding an if in the proper location to catch
the out of bounds memory write without causing problems to the overall
algorithm.

Signed-off-by: Alex Orange <crazycasta@gmail.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
Tested-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-27 16:35:56 -07:00
Jon TURNEY
ea5b2b0a2e os: -displayfd should check ports up to 65535
-displayfd should check ports up to 65535

Noticed during https://cygwin.com/ml/cygwin-xfree/2014-07/msg00024.html

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-27 15:44:26 -07:00
Keith Packard
3a123fbdda Merge remote-tracking branch 'jturney/master'
Conflicts:
	hw/xwin/winpixmap.c

Adam removed a pile of windows code, including this file.
2014-10-27 15:39:26 -07:00
Chris Wilson
9b29fa957a Xext/shm: Detach SHM segment after Pixmap is released
The GPU may still have a reference to the SHM segment which would only
be finally released when the Pixmap is destroy. So we can only detach
the SHM segment (and thereby making the memory unaccessible) after the
backend has had a chance to flush any remaining references.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85058
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-and-tested-by: gedgon@gmail.com
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-27 15:33:48 -07:00
Keith Packard
5adc20179e modesetting: Skip kernel work-around on error in crtc to kernel msc
ms_crtc_msc_to_kernel_msc attempts to work around kernel
inconsistencies in reporting msc values by comparing the expected
value with the reported value. If the kernel fails to
actually provide its current values, then just skip the work around
steps as there's really nothing better we can do.

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-27 15:28:14 -07:00
Keith Packard
59b12c454d Merge remote-tracking branch 'anholt/modesetting-dri2-no-pageflip' 2014-10-27 14:48:55 -07:00
Keith Packard
5574a0a07e composite: Skip SetWindowPixmap when pixmap isn't changing
Check the current window pixmap to see if it matches the new pixmap
and avoid calling SetWindowPixmap in that case.

x11perf -ucreate highlights an instance where compCreateWindow reassigns
the same Pixmap to the Window. Currently this triggers an expensive
invalidation of the entire window hierachy, making sure that DRI2
clients are kept informed of the handle changes. However, as the backing
Pixmap for the Window is actually unchanged, there is no need to
do anything in this case.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-27 13:38:21 -07:00
Yogish Kulkarni
df6a3a07f6 Skip SetCursor when vtSema is FALSE.
Consider below sequence -
1) Cursor is removed : isUp will be FALSE if HW cursor is set.
2) VT switched away from X : vtSema becomes FALSE.
3) xf86CursorSetCursor is called with non-null CursorPtr :
Saves the passed in CursorPtr, fallbacks to SW cursor and invokes
spriteFuncs->SetCursor which saves the area under cursor and restores
the cursor. This sets isUp to TRUE and as vtSema is FALSE saved data
is garbage.
4) VT switched to X : vtSema becomes TRUE. xf86Cursor enable fb access
is called which will remove the SW cursor, i.e copies saved data in #3
to screen.

This results to momentary garbage data on screen. Hence when !vtSema
skip spriteFuncs->SetCursor.

X.Org Bug 85313 <https://bugs.freedesktop.org/show_bug.cgi?id=85313>

Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-27 13:36:20 -07:00
Eric Anholt
cac4b064f9 modesetting: Add support for DRI2 with glamor.
This is derived from the intel driver DRI2 code, with swapchain and
pageflipping dropped, functions renamed, and vblank event management
shared code moved to a vblank.c for reuse by Present.

This allows AIGLX to load, which means that you get appropriate
visuals exposed in GL, along with many extensions under
direct-rendering that require presence in GLX (which aren't supported
in glxdriswrast.c).

v2: Drop unused header includes in pageflip.c, wrap in #ifdef GLAMOR.
    Drop triple-buffering, which was totally broken in practice (I'll
    try to fix this later).  Fix up some style nits.  Document the
    general flow of pageflipping and why, rename the DRI2 frame event
    type enums to reflect what they're for, and handle them in a
    single switch statement so you can understand the state machine
    more easily.
v3: Drop pageflipping entirely -- it's unstable on my Intel laptop
    (not that the normal 2D driver is stable with pageflipping for
    me), and I won't get it fixed before the merge window.  It now
    passes all of the OML_sync_control tests from Jamey and Theo
    (except for occasional warns in timing -fullscreen -divisor 2).
v4: Fix doxygen at the top of vblank.c

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-10-27 13:16:43 -07:00
Eric Anholt
7064b00d47 modesetting: Export two functions I want to reuse from DRI2/Present.
This renames dumb_get_bo_from_handle(), since it wasn't using a handle
(GEM terminology) but a dmabuf fd.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-10-27 13:16:35 -07:00
Eric Anholt
34a98c8103 dri2: Automatically fill in the driver name if the DDX doesn't provide it.
This will be used by the modesetting driver to support DRI2 across all
hardware that can support glamor, and could potentially be used by
other drivers that have to support DRI2 on sets of hardware with
multiple Mesa drivers.

This logic is the same as what's present in the Mesa driver loader,
except for the lack of nouveau_vieux support (which requires a
predicate on the device).

v2: Fix duplicated assignment of info->driverName.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-10-27 13:16:23 -07:00
Eric Anholt
470d97e1d1 dri2: Import a copy of Mesa's PCI ID -> driver name mappings.
This comes from Mesa commit acdcef6788beaa2a1532e13ff84c3e246b8025ed

Previously, each driver had to tell DRI2 what GL driver object should
be loaded.  Originally for a 2D driver that was a matter of giving the
constant string for the vendor name, same as the driver's name.  For a
driver that's trying to handle multiple generations of hardware with
different Mesa driver filenames, the driver had to bake in a mapping
from PCI ID to the appropriate driver name in Mesa, which seems like a
pretty awful layering violation (and one that was fixed with DRI3)

As of January, Mesa now handles the mapping from a DRI fd to the
driver name on its own, but the AIGLX loader still relies on DRI2 for
choosing the filename.  Instead of propagating the PCI ID list from
each 2D driver to the modesetting driver, import a central copy of the
PCI ID list so that drivers can stop handling this themselves.  (Some
day, when AIGLX transitions to EGL, we can drop the DRI2 filename
setup entirely).

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-10-27 13:15:18 -07:00
Adam Jackson
839f05329d dix: Retype and repack GC
LP64: 160 bytes before, 128 after.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2014-10-27 13:01:43 -07:00
Adam Jackson
73e2383b73 dix: Always store GC client clip as a region (v2)
Again, this changes FixesCreateRegionFromGC to throw BadMatch when fed a
GC with no client clip.

v2: Fix Xnest and some variable names (Keith)

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:46:05 -04:00
Adam Jackson
e7b9295551 fb: Hide fbPush{Pattern,Fill}
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:45:57 -04:00
Adam Jackson
e31d16a82d fb: Hide fbDots
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:45:55 -04:00
Adam Jackson
5db0f067ed fb: Hide Bresenham line details
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-27 15:45:53 -04:00