Commit Graph

7098 Commits

Author SHA1 Message Date
Carlos Garnacho
d96eccc057 xwayland: Add xwl_touch struct
This struct holds information about each individual, ongoing touchpoint.
A list of these is held by the xwl_seat.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2015-09-18 14:55:00 +02:00
Jasper St. Pierre
c1565f3ca6 xwayland-input: Remove our XYToWindow handler
This was built as a hack for simple Wayland compositors like Weston
which were lazy and didn't want to configure windows server-side when
moved.

Since comboboxes and menus are separate toplevel O-R windows, this hack
breaks input as it needs to be traced normally, not simply sent to the
focused window.

X11 toolkits really do need their windows to be configured correctly
for their O-R windows comboboxes or menus other things, so let's fix
the lazy compositors and remove this.

I have tested this patch with both Weston and Mutter and neither of
them require any changes, and it fixes comboboxes and menus.

If somebody then wants to revert 73698d4, that's fine by me, so we
reduce the amount of API that DDXen have.

Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2015-09-18 14:55:00 +02:00
Ilia Mirkin
139e36dd5c modesetting: fix up output naming convention
A user on a nouveau-driven card ran into a problem where DVI-D-1 and
DVI-I-1 were aliasing. The simplest fix is to provide the full connector
names. While we're at it, rename the output names to match what is in
the kernel, and start counting the connectors from 1 rather than 0. The
only deviation is HDMI vs HDMI-A, which kept its original name.

This will break backwards compatibility with existing xorg.conf's that
reference output names, but the alternative is to create a separate
counting system, further disconnecting from the kernel names.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-09-17 10:48:06 -04:00
Marek Chalupa
a907ead786 xwayland: implement repeat_info event
xwayland windows ignored any key repeating settings
advertised by a compositor

v2. don't hardcode version 4 of seat
    use AutoRepeatModeOn/Off

v3. use min(version, 4) when binding seat

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
2015-09-17 10:11:11 -04:00
Felix Janda
e8e3368298 On linux use <termios.h> instead of <termio.h>
<termio.h> is obsolete. Using <termios.h> instead fixes building with
musl libc.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Felix Janda <felix.janda@posteo.de>
2015-09-17 09:47:25 -04:00
Adam Jackson
dfa8b37cfb glxproxy: Fix an obvious thinko in QueryExtensionsString
gcc 5.1 throws a rather amusing warning here:

glxcmdsswap.c: In function ‘__glXSwapQueryExtensionsString’:
glxcmdsswap.c:439:1: warning: function might be candidate for attribute
‘noreturn’ [-Wsuggest-attribute=noreturn]
 __glXSwapQueryExtensionsString(__GLXclientState * cl, GLbyte * pc)

This is entirely accurate, albeit curiously phrased: swapping some bits
hanging off the end of a null pointer will make Xdmx crash, so from the
perspective of code generation the function will indeed not return.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-09-17 09:43:50 -04:00
Ingo Schwarze
634e357be2 remove bogus \/ escapes
some X manuals use then escape sequence \/ when they want to render
a slash.  That's bad because \/ is not a slash but an italic
correction, never producing any output, having no effect at all in
terminal output, and only changing spacing in a minor way in typeset
output.

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-09-01 20:13:41 -07:00
Jon TURNEY
1f96a0d273 debug output format fix in ephyrProcessMouseMotion()
xorg/xserver/hw/kdrive/ephyr/ephyr.c:979:9: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘ScreenPtr’ [-Werror=format=]

This looks like a genuine bug, and ephyrCursorScreen->myNum was meant here
rather than ephyrCursorScreen

v2:
Insert a ":" as well

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-28 12:07:02 +01:00
Jon TURNEY
8cc88fbe9e debug output format fix in DRISwapContext()
xorg/xserver/hw/xfree86/dri/dri.c:1695:19: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘DRIContextPrivPtr’ [-Werror=format=]                   ^
xorg/xserver/hw/xfree86/dri/dri.c:1695:19: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘DRIContextPrivPtr’ [-Werror=format=]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-28 12:06:51 +01:00
Jon TURNEY
27cf584027 debug output format fix in TI.c
xserver/hw/xfree86/ramdac/TI.c:118:12: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Werror=format=]
xserver/hw/xfree86/ramdac/TI.c:118:12: error: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Werror=format=]
xserver/hw/xfree86/ramdac/TI.c:118:12: error: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘long unsigned int’ [-Werror=format=]

Use %lu for an unsigned long

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-28 12:06:39 +01:00
Jon TURNEY
6cc0f3d95d debug output format fix in xf86Events.c
xserver/hw/xfree86/common/xf86Events.c:183:5: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘void *’ [-Werror=format=]

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-28 12:06:16 +01:00
Olivier Fourdan
d206c240c0 configurable maximum number of clients
Make the maximum number of clients user configurable, either from the command
line or from xorg.conf

This patch works by using the MAXCLIENTS (raised to 512) as the maximum
allowed number of clients, but allowing the actual limit to be set by the
user to a lower value (keeping the default of 256).

There is a limit size of 29 bits to be used to store both the client ID and
the X resources ID, so by reducing the number of clients allowed to connect to
the X server, the user can increase the number of X resources per client or
vice-versa.

Parts of this patch are based on a similar patch from Adam Jackson
<ajax@redhat.com>

This now requires at least xproto 7.0.28

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-08-24 00:00:18 -07:00
Mario Kleiner
a0b4f30b1f modesetting: Add more missing options to man page.
Descriptions for Options PageFlip and SWCursor.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-08-13 00:36:12 +01:00
Dave Airlie
19e1dc8f6e modesetting: add zaphod support (v3)
This adds zaphod and ZaphodHeads support
to the the in-server modesetting driver.

this is based on a request from Mario,
and on the current radeon driver, along
with some patches from Mario to bring things
up to the state of the art in Zaphod.

v2: fixup vblank fd registring.
v3: squash Mario's fixes.
  modesetting: Allow/Fix use of multiple ZaphodHead outputs per x-screen.
  modesetting: Take shift in crtc positions for ZaphodHeads configs into account.
  modesetting: Add ZaphodHeads description to man page.
small cleanups (airlied).

Reviewed-and-tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-08-13 00:36:03 +01:00
Adam Jackson
533fb62739 xwayland: Don't (double) destroy input resources in CloseScreen
By the time we get here we've already done CloseDownDevices, so on the
second regeneration you get:

    Invalid read of size 4
       at 0x43402A: RemoveDevice (devices.c:1125)
       by 0x427902: xwl_seat_destroy (xwayland-input.c:568)
       by 0x42649C: xwl_close_screen (xwayland.c:116)
       by 0x4B7F67: CursorCloseScreen (cursor.c:187)
       by 0x536003: AnimCurCloseScreen (animcur.c:106)
       by 0x539831: present_close_screen (present_screen.c:64)
       by 0x43E486: dix_main (main.c:351)
       by 0x30D70206FF: (below main) (libc-start.c:289)
     Address 0x980e1a0 is 64 bytes inside a block of size 904

       at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
       by 0x434158: RemoveDevice (devices.c:1157)
       by 0x42F77B: CloseDeviceList (devices.c:1017)
       by 0x430246: CloseDownDevices (devices.c:1047)
       by 0x43E3EB: dix_main (main.c:333)
       by 0x30D70206FF: (below main) (libc-start.c:289)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-08-12 08:53:38 -07:00
Adam Jackson
11f4cc47a8 xwayland: Don't (double) destroy RANDR resources in CloseScreen
By the time we get here we've already been through FreeAllResources,
which has already torn down the RANDR objects, so on the second
regeneration you get:

    Invalid read of size 4
       at 0x51C6F0: RRCrtcDestroy (rrcrtc.c:659)
       by 0x4285F5: xwl_output_destroy (xwayland-output.c:191)
       by 0x426464: xwl_close_screen (xwayland.c:112)
       by 0x4B7F77: CursorCloseScreen (cursor.c:187)
       by 0x536013: AnimCurCloseScreen (animcur.c:106)
       by 0x539841: present_close_screen (present_screen.c:64)
       by 0x43E496: dix_main (main.c:351)
       by 0x30D70206FF: (below main) (libc-start.c:289)
     Address 0x4cc6640 is 0 bytes inside a block of size 728 free'd
       at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
       by 0x51BCCF: RRCrtcDestroyResource (rrcrtc.c:689)
       by 0x45CD91: doFreeResource (resource.c:872)
       by 0x45DE56: FreeClientResources (resource.c:1138)
       by 0x45DF06: FreeAllResources (resource.c:1153)
       by 0x43E3BD: dix_main (main.c:321)
       by 0x30D70206FF: (below main) (libc-start.c:289)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-08-12 08:53:38 -07:00
Aaron Plattner
a8a0f6464a xfree86: Bump video driver ABI version to 20
Commit 90db5edf11 modified the signature of
StartPixmapTrackingProcPtr, so drivers implementing that need to use the updated
definition.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2015-07-17 11:02:40 -07:00
Eric Anholt
2fcfa53253 Merge remote-tracking branch 'ajax/xserver-next' into master 2015-07-17 11:02:20 -07:00
Armin K
cb695b0f3b xfree86/os-support/linux: Fix make distcheck
Header was added in 1dba5a0b19
but not in Makefile.am, resulting in missing header in the
distribution tarball.

Signed-off-by: Eric Anholt <eric@anholt.net>
2015-07-16 12:32:38 -07:00
Robert Ancell
29efa905ec modesetting: Use correct types for return values of glamor BO exports.
glamor_name_from_pixmap and glamor_fd_from_pixmap return CARD16 and
CARD32 values via pointers.  The current code uses uint16_t and
uint32_t which will probably be the same but it's safer to use the
datatypes as specified by the function.

Signed-off-by: Robert Ancell <robert.ancell@canonical.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2015-07-16 12:30:16 -07:00
Adam Jackson
cbd3cfbad3 dix: Restore PaintWindow screen hook
Removes the last cpp conditional on ROOTLESS from dix code.

Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 16:41:28 -04:00
Adam Jackson
36fac0dd1a xfixes: Unexport xfixes.h
There's nothing a driver could want to use this for.

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 16:40:58 -04:00
Adam Jackson
4da66d9e03 vidmode: Hide implementation details
Also remove vidmodeproc.h from the SDK since no drivers are using it.

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 16:40:58 -04:00
Adam Jackson
49d7bae7f4 xge: Hide some implementation details
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 16:40:58 -04:00
Adam Jackson
2377690709 dga: Hide a bunch of implementation details
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 16:40:58 -04:00
Adam Jackson
b5fbe9c632 xfree86: Hide some pre-randr mode validation details
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 16:40:57 -04:00
Adam Jackson
b51f7f8582 dix: Unexport various implementation details
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 16:40:57 -04:00
Adam Jackson
91f0d71c18 parser: static cleanup
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 16:40:57 -04:00
Dave Airlie
90db5edf11 prime: add rotation support for offloaded outputs (v2)
One of the lacking features with output offloading was
that screen rotation didn't work at all.

This patch makes 0/90/180/270 rotation work with USB output
and GPU outputs.

When it allocates the shared pixmap it allocates it rotated,
and any updates to the shared pixmap are done using a composite
path that does the rotation. The slave GPU then doesn't need
to know about the rotation and just displays the pixmap.

v2:
rewrite the sync dirty helper to use the dst pixmap, and
avoid any strange hobbits and rotations.

This breaks ABI in two places.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-07-08 11:13:09 -07:00
Keith Packard
991712f1e8 Merge remote-tracking branch 'ofourdan/for-keith' 2015-07-08 10:43:31 -07:00
Jon TURNEY
0cd228073a hw/xwin: printf format fixes for Pixel type
Pixel is CARD32, so inside the server has type unsigned int (x86_64) or unsigned
long (x86)

Cast to unsigned int and use a %u format

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:53 +01:00
Jon TURNEY
e3cfeb949a hw/xwin: printf format fixes for WPARAM and LPARAM types
Some Win32 API types are different fundamental types in the 32-bit and 64-bit

This problem is then further compounded by the fact that whilst both 32-bit
Cygwin and 32-bit MinGW use the ILP32 data model, 64-bit MinGW uses the LLP64
data model, but 64-bit Cygwin uses the LP64 data model.

This makes it impossible to write printf format specifiers which are correct for
all those targets, so we use some macros to provide the correct specifier for
the target.

LPARAM and WPARAM are integer types which can contain a pointer

LPARAM is long in ILP32 and long long in LLP64
WPARAM is unsigned int in ILP32 and unsigned long long in LLP64

Generally, these are just used to passs integer parameters, so for simplicity,
cast to int and use an int-compatible format

In the specific case of WM_CHANGECBCHAIN, they are used to pass HWND, so cast to
that type and print using an appropriate format.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:50 +01:00
Jon TURNEY
4f8661fac9 hw/xwin: printf format fixes for LONG type
Some Win32 API types are different fundamental types in the 32-bit and 64-bit
versions.

This problem is then further compounded by the fact that whilst both 32-bit
Cygwin and 32-bit MinGW use the ILP32 data model, 64-bit MinGW uses the LLP64
data model, but 64-bit Cygwin uses the LP64 data model.

This makes it impossible to write printf format specifiers which are correct for
all those targets

In the Win32 API, DWORD is an signed, 32-bit type.  It is defined in terms of a
long, except in the LP64 data model, where it is an int.

It should always be safe to cast it to int and use %d.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:47 +01:00
Jon TURNEY
aa83c61f51 hw/xwin: printf format fixes for DWORD type
Some Win32 API types are different fundamental types in the 32-bit and 64-bit
versions.

This problem is then further compounded by the fact that whilst both 32-bit
Cygwin and 32-bit MinGW use the ILP32 data model, 64-bit MinGW uses the LLP64
data model, but 64-bit Cygwin uses the LP64 data model.

This makes it impossible to write printf format specifiers which are correct for
all those targets

In the Win32 API, DWORD is an unsigned, 32-bit type.  It is defined in terms of
an unsigned long, except in the LP64 data model, where it is an unsigned int.

It should always be safe to cast it to unsigned int and use %u or %x.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:44 +01:00
Jon TURNEY
487f2595c9 hw/xwin: printf format fixes in xevents.c
Window and Atom types derive from XID, which is always unsigned long in client
code, so use %ld format specifier

XTextProperty.nitems is of type unsigned long, so use %lu format specifier

ulReturnBytesLeft is of type unsigned long, so use %lu format specifier

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:41 +01:00
Jon TURNEY
98798fcf0d hw/xwin: printf format fix in winProcessXEventsTimeout()
remainingTime is computed as a long int, so use %ld format specifier

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:38 +01:00
Jon TURNEY
5b6f511c2f hw/xwin: printf format fix in winCreateDefColormap()
Use %lu for unsigned long

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:35 +01:00
Jon TURNEY
eb67967156 hw/xwin: printf format fixes in winAllocatePrivates()
serverGeneration is of type unsigned long, so use %lu format specifier

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:32 +01:00
Jon TURNEY
0d6c499b99 hw/xwin: printf format fixes in winConfigKeyboard()
struct winInfoRec.keyboard members are of type long, not type int

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:29 +01:00
Jon TURNEY
ba468e003e hw/xwin: printf format fixes for XID type
XID inside the server has type unsigned int (x86_64) or unsigned long (x86)

Follow the example of the rest of the server and cast to unsigned int and use
a %u or %x format.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:26 +01:00
Jon TURNEY
dcb797b31f hw/xwin: printf format fixes for HWND type
HWND derives from HANDLE, a pointer type, so we should use the %p format

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:23 +01:00
Jon TURNEY
f1d1426667 hw/xwin: Ensure format warnings in winclipboard/
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:20 +01:00
Jon TURNEY
38f340b13e hw/xwin: Remove GetTickCount() from various pieces of debugging output
The use of %d format for the DWORD return value of GetTickCount() isn't
portable, but it doesn't seem to be worth fixing it when this information isn't
very useful (and is redundant to the timestamping of log messages we now have)

Instead just remove these uses of GetTickCount()

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2015-07-07 16:52:18 +01:00
Dave Airlie
e3624aa5fd xserver: fix build with glamor disabled.
This fixes modesetting when glamor is disabled.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2015-07-06 12:01:33 -07:00
Keith Packard
8a8d51358c Merge remote-tracking branch 'airlied/for-keithp' 2015-06-29 21:04:53 -07:00
Keith Packard
b22534d8e6 Merge remote-tracking branch 'jwrdecoede/for-keith' 2015-06-29 21:04:11 -07:00
Kenneth Graunke
13c7d53df8 modesetting: Implement page flipping support for Present.
Based on code by Keith Packard, Eric Anholt, and Jason Ekstrand.

v2:
- Fix double free and flip_count underrun (caught by Mario Kleiner).
- Don't leak flip_vblank_event on the error_out path (Mario).
- Use the updated ms_flush_drm_events API (Mario, Ken).

v3: Hack around DPMS shenanigans.  If all monitors are DPMS off, then
    there is no active framebuffer; attempting to pageflip will hit the
    error_undo paths, causing us to drmModeRmFB with no framebuffer,
    which confuses the kernel into doing full modesets and generally
    breaks things.  To avoid this, make ms_present_check_flip check that
    some CRTCs are enabled and DPMS on.  This is an ugly hack that would
    get better with atomic modesetting, or some core Present work.

v4:
- Don't do pageflipping if CRTCs are rotated (caught by Jason Ekstrand).
- Make pageflipping optional (Option "PageFlip" in xorg.conf.d), but
  enabled by default.

v5: Initialize num_crtcs_on to 0 (caught by Michel Dänzer).

[airlied: took over]
v6: merge async flip support from Mario Kleiner
free sequence after failed vblank queue
handle unflip while DPMS'ed off (Michel)
move flip tracking into its own structure, and
fix up reference counting issues, and add comments.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2015-06-30 13:44:09 +10:00
Dave Airlie
4342369e84 modesetting: don't try and load dri2
Since we are shipped with the server and the server has it built-in,
don't bother trying to load it.

Don't remove or invert the if statement on purpose as a later
patch adds stuff in here.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-30 13:44:09 +10:00
Dave Airlie
edec6394a4 modesetting: drop unused struct in vblank.c
this isn't used anywhere here.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-30 13:44:09 +10:00
Kenneth Graunke
bf262b4300 modesetting: Implement an ms_drm_abort_seq() function.
This is a specialization of ms_drm_abort that matches based on the drm
event queue's sequence number.

Based on code by Keith Packard.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2015-06-30 13:44:09 +10:00