summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-02-09pixmap: add wait shared pixmapprime-fixesDave Airlie6-0/+41
With modesetting/glamor/reverse prime setups, we don't have a decent sync mechanism between master and slave drivers. The drivers each have their own driver pixmap/bo for their side of the shared pixmap so nothing is available to synchronise these. Ideally we'd have cross driver sync objects, but those particular pigs can't fly yet. In lieu of this glFinish is pretty close to the best thing we have, it might be possible to use a glSyncObject to make this a bit lighter, but for now lets try this. This just causes glFinish to be called so the first driver has written all its changes to the shared pixmap before the second driver does things to its side of the shared pixmap. This fixes a wierd lag, if you run X across two GPUs, and then run xsetroot -solid and various values, the slave screens end up a slot behind. Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-09present: fail flipping if we have any slave outputs.Dave Airlie1-0/+4
Due to the way present currently works, we don't ever check with the secondary adapters if we can flip at all. We shouldn't flip if the secondary adapters are attached to the pixmap currently, however using the current check_flip callback isn't possible as it passes the Window to the driver (something we shouldn't be doing), so the slave driver can never get it's own screen ptr back. For now to fix the problem just block flips if we have any slaves configured. We can fix the ABI up later, but this fix can be backported to stable. Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-09xfree86/linux: disable using built-in pci id list on Linux.output-class-pciidDave Airlie2-2/+4
This disables the built-in pciid lists on Linux, as we want to start using OutputClass only to pick which drivers to load. Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-09xfree86: add pci id matching to OutputClassDave Airlie4-0/+37
This will be used by drivers to denote PCI ids in the future instead of hardcoding them in the server. Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-09cursor: add hw cursor support for primeDave Airlie4-13/+94
Currently with PRIME if we detect a secondary GPU, we switch to using SW cursors, this isn't optimal, esp for the intel/nvidia combinations, we have no choice for the USB offload devices. This patch checks on each slave screen if hw cursors are enabled, and also calls set cursor and move cursor on all screens. Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-02-08autogen: Set a default subject prefix for patchesAdam Jackson1-0/+3
Per discussion at XDC2015, we want this so we can easily distinguish which module a patch is for. There's no way to set this in the server-side config, so setting a default at autogen time is about the best we can do. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-02-08Fix XineramaQueryScreens for reverse primeJan Burgmeier2-3/+15
Make sure we account for slave CRTCs when building the monitor list, since that's what rrxinerama uses to fake Xinerama geometry. [ajax: Slightly more informative commit message.] Bugzilla: https://bugs.freedesktop.org/92313 Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-02-08xwayland: Clear pending cursor frame callbacks on pointer enterRui Matos1-0/+10
The last cursor frame we commited before the pointer left one of our surfaces might not have been shown. In that case we'll have a cursor surface frame callback pending which we need to clear so that we can continue submitting new cursor frames. Signed-off-by: Rui Matos <tiagomatos@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-02-08dri2: Only invalidate the immediate Window upon SetWindowPixmapChris Wilson1-3/+2
All callers of SetWindowPixmap will themselves be traversing the Window heirarchy updating the backing Pixmap of each child and so we can forgo doing the identical traversal inside the DRI2SetWindowPixmap handler. Reported-by: Loïc Yhuel <loic.yhuel@gmail.com> Link: http://lists.x.org/archives/xorg-devel/2015-February/045638.html Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-02-08ephyr: don't load ephyr input driver if -seat option is passedLaércio de Sousa1-17/+18
When used for single-GPU multi-seat purposes, there's no need to enable ephyr virtual input devices, since Xephyr is supposed to handle its own hardware devices. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-02-08ephyr: ignore Xorg multiseat command line optionsLaércio de Sousa1-0/+7
Multi-seat-capable display managers commonly pass command-line options like "-novtswitch", "-sharevts", or "-layout seatXXXX" to Xorg server, but Xephyr currently refuses to start if these options are passed to it, which may break Xephyr-based single-GPU multiseat setups. [ajax: shortened summary] Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-02-08kdrive: don't let evdev driver overwrite existing device namesLaércio de Sousa1-2/+4
KDrive evdev driver deliberately name grabbed devices as "Evdev mouse" or "Evdev keyboard". This patch will make it skip this step if grabbed devices are already named (i.e. from udev). Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-02-08kdrive: set "evdev" driver for input devices automatically, if available.Laércio de Sousa1-0/+25
If kdrive input driver "evdev" is available, no other driver was explicitly set for a given input device, and its kernel device node is /dev/input/event*, this patch will make kdrive set "evdev" driver automatically for such device. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-02-08kdrive: fix up NewInputDeviceRequest() implementationLaércio de Sousa1-46/+30
This patch simplifies NewInputDeviceRequest() implementation in kinput.c, making use of improved KdParseKbdOptions() / KdParsePointerOptions() and merging several "if (ki)"/"if (pi)" clauses. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
2016-01-29glamor: Flip around conditionals in RepeatNone fixups.Eric Anholt1-2/+2
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Cut down a bunch of conditional handling for RepeatFix.Eric Anholt1-31/+19
For hardware that doesn't do actual jumps for conditionals (i915, current vc4 driver), this reduces the number of texture fetches performed (assuming the driver isn't really smart about noticing that the same sampler is used on each side of an if just with different coordinates). No performance difference on i965 with x11perf -magpixwin100 (n=40). Improves -magpixwin100 by 12.9174% +/- 0.405272% (n=5) on vc4. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Clarify how the repeat values being passed around work.Eric Anholt1-6/+6
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Clean up formatting of RepeatFix shader code.Eric Anholt1-27/+30
All sorts of weird indentation, and some cuddled conditional statements deep in the if tree. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Clarify some logic in RepeatFix handling.Eric Anholt1-14/+7
wh ratios are != 1.0 only when large, so with that we can simplify down how we end up with RepeatFix being used. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Simplify the pixmap box looping.Eric Anholt15-74/+78
We had a double loop across h and w, and passed the current x and y out to callers who then used w to multiply/add to an index. Instead, just single loop across w * h. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Reuse the glamor_program_alpha_* enums for Render.Eric Anholt2-24/+16
This is a step toward using glamor_program.c for Render acceleration. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Drop extra SHADER_IN type for no mask present.Eric Anholt2-12/+6
We can just hand in a constant mask and the driver will optimize away the multiplication for us. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Convert XV to using glamor_program.c.Eric Anholt2-78/+71
One less custom path! By following the common glamor_program.c use pattern, we get the ability to handle large pixmaps as the destination. It's also one less place where glamor_utils.h coordinate transformation happens. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Simplify XV vertex setup.Eric Anholt1-38/+30
We were clipping the drawn rectangle to each clip box, then expanding the box to a big triangle to avoid tearing, then drawing each triangle to the destination through a scissor. If we're using a scissor for clipping, though, then we don't need to clip the drawn primitive on the CPU in the first place. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Set up XV sampler uniforms once at program build time.Eric Anholt1-9/+11
No sense doing it on every draw. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Drop dead glamor_pict_format_is_compatible().Eric Anholt1-20/+0
This hasn't been used since 2f80c7791bb0b11f261cb1e3e0d89163dcdd0342 (GLAMOR_SEPARATE_TEXTURE removal). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Drop comment about dead yInverted flag.Eric Anholt1-2/+0
Wait long enough, and you don't need to think about it at all. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Rename the *y_inverted helpers to not say "inverted".Eric Anholt1-16/+14
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Drop dead *_from_x_coord_y() functions.Eric Anholt1-2/+0
They've been dead since the yInverted removal (e310387f443b6333edf02c8980daa303505382b4). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Clarify when Render fallbacks happen due to an unsupported op.Eric Anholt1-1/+3
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29glamor: Label programs before linking them.Eric Anholt1-11/+11
i965 does most of its compiling at link time, so our debug output for its shaders didn't have the name on. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-29ephyr: Make sure we have GLX_ARB_create_context before calling it.Eric Anholt1-14/+20
This should fix aborts()s from epoxy on old software stacks. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2016-01-28xephyr: Remove DRI1Adam Jackson13-3490/+0
This only worked if the backend server supported DRI1, which is stunningly unlikely these days. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-28xfree86: Build parser for DRI config file subsection unconditionallyAdam Jackson1-8/+0
This applies regardless of which DRI you're asking for. Worse, leaving it out means breaking the config file syntax in a pointless way, since non-DRI servers can safely just parse it and ignore it. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-01-28xfree86: Remove ancient DRI build instructionsAdam Jackson2-552/+0
Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-01-27ephyr: catch X errors if we try to create a core context and fail.Dave Airlie1-0/+10
This stops Xephyr failing on GLXBadFBConfig. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-01-27dri2: Sync i915_pci_ids.h and i965_pci_ids.h from mesaTimo Aaltonen2-6/+54
Adds Skylake, Kabylake and Broxton allowing them to use modesetting + glamor with dri2. Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com> Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2016-01-27modesetting: Require sufficiently new libdrmAdam Jackson1-2/+1
Bugzilla: https://bugs.freedesktop.org/93883 Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2016-01-26xwayland: add support for use core profile for glamor. (v2)Dave Airlie1-1/+14
This adds support to Xwayland to try and use OpenGL core profile for glamor first. v1.1: use version defines. v2: let glamor work out core profile itself. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-26glamor: add core profile support to EGL glamor. (v2)Dave Airlie1-4/+22
v1.1: use version defines. v2: let glamor work it out itself Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-26ephyr: Create 3.1 core profile context if possible (v3)Keith Packard1-1/+17
On desktop GL, ask for a 3.1 core profile context if that's available, otherwise create a generic context. v2: tell glamor the profile is a core one. v2.1: add/use GL version defines v3: let glamor work out core itself Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-26glamor: add core profile support. (v2)Dave Airlie3-1/+12
Glamor works out from the profile if it is core. This flag is used to disable quads for rendering. v1.1: split long line + make whitespace conform (Michel) v1.2: add GL 3.1 version defines v2: move to having glamor work out the profile. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-26glamor: Use GL_RED instead of GL_ALPHA if we have texture_swizzle (v3)Keith Packard8-22/+118
GL_RED is supported by core profiles while GL_ALPHA is not; use GL_RED for one channel objects (depth 1 to 8), and then swizzle them into the alpha channel when used as a mask. [airlied: updated to master, add swizzle to composited glyphs and xv paths] v2: consolidate setting swizzle into the texture creation code, it should work fine there. Handle swizzle when setting color as well. v3: Fix drawing to a8 with Render (changes by anholt, reviewed by airlied). Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-26glamor: Drop duplicated GLAMOR_DEFAULT_PRECISIONs in render accel.Eric Anholt1-13/+4
We only need it once at the top of the shader, so just put it there. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-01-26glamor: don't do copy if we have 0 boxes to copy.Dave Airlie1-0/+3
This happens if you run twm + mplayer + xclock and drag the clock over the mplayer. If we don't catch it, we cause an illegal draw elements command to be passed to GL. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2016-01-26glamor: Add support for CA rendering in a single pass.Dave Airlie6-32/+118
It's been on the list to add dual source blending support to avoid the two pass componentAlpha code. Radeon has done this for a while in EXA, so let's add support to bring glamor up to using it. This adds dual blend to both render and composite glyphs paths. Initial results show close to doubling of speed of x11perf -rgb10text. v2: Fix breakage of all of CA acceleration for systems without GL_ARB_blend_func_extended. Add CA support for all the ops we support in non-CA mode when blend_func_extended is present. Clean up some comments and formatting. (changes by anholt) Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2016-01-26glamor: Drop the composite_with_copy path entirely.Eric Anholt1-92/+0
I originally inherited this from the EXA code, without determining whether it was really needed. Regular composite should end up doing the same thing, since it's all just shaders anyway. To the extent that it doesn't, we should fix composite. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-01-21glamor: Fix copy-like Render operations between 15 and 16 depth.Eric Anholt1-0/+8
Reading and writing to 16-depth pixmaps using PICT_x1r5g5b5 ends up failing, unless you're doing a straight copy at the same bpp where the misinterpretation matches on both sides. Fixes rendercheck/blend/over and renderhceck/blend/src in piglit. Please cherry-pick this to active stable branches. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com>
2016-01-21glx: Fix GLX_EXT_create_context_es2_profile supportAdam Jackson5-26/+13
As of v4 of this extension, any GLES version number may be requested (to enable GLES3 and later). To comply with this, simply remove the API version checks and leave it to the DRI driver to validate. This happens to also enable using GLES1 in direct contexts, so if that's the dire situation you find yourself in, your client driver at least stands a chance of working. v4 also specifies that both extension strings should be advertised for compatibility with clients written against v1 of the extension spec, so add the es_profile bit to the extension list and enable it whenever we would enable es2_profile. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-01-21glamor: Use vertex array objectsKeith Packard4-24/+75
Core contexts require the use of vertex array objects, so switch both glamor and ephyr/glamor over. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>