We know we're atop fb which is atop micmap, the only thing we need to
hook is InstallColormap to handle the xwd colormap change.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
I was getting segfaults in xi2 tests from trying to copy XKB keyboard
state to NULL pointers with a stack of:
key=key@entry=0) at xkbActions.c:1189
sendevent=sendevent@entry=0 '\000') at devices.c:420
at protocol-xiquerydevice.c:338
which turned out to be due to xkbcomp failure, which was logged in the
test logs as:
XKB: Failed to compile keymap
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
but which was overlooked because the ActivateDevice() return code wasn't
checked and the tests went forward assuming the structures were all
correctly initialized. This catches the failure closer to the point of
failure, to save debugging time.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Remove the error return path from the FLAG_PIXMAP path and leave the
default value in place. There's no point skipping the rest of this
function.
Signed-off-by: Keith Packard <keithp@keithp.com>
Calling present_notify_msc could cancel a pending pixmap presentation.
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
All references to modinit.h have been remove with:
a1d41e3 Move extension initialisation prototypes into extinit.h
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
There's no XPrint extension (anymore).
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
There's no XPrint extension (anymore).
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Otherwise the CPU may end up reading from non-cacheable memory, which is
very slow.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84178
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Markus Wick <markus@selfnet.de>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
==9530== 808,575,600 bytes in 5,904 blocks are definitely lost in loss record 4,602 of 4,602
==9530== at 0x4C28C20: malloc (vg_replace_malloc.c:296)
==9530== by 0xAD29C98: _glamor_upload_bits_to_pixmap_texture (glamor_pixmap.c:771)
==9530== by 0xAD2AE95: glamor_upload_sub_pixmap_to_texture (glamor_pixmap.c:1031)
==9530== by 0xAD2BD55: glamor_upload_pixmap_to_texture (glamor_pixmap.c:1057)
==9530== by 0xAD1C2E6: glamor_composite_choose_shader (glamor_render.c:1025)
==9530== by 0xAD1C629: glamor_composite_with_shader (glamor_render.c:1174)
==9530== by 0xAD1DA77: glamor_composite_clipped_region (glamor_render.c:1542)
==9530== by 0xAD1E849: _glamor_composite (glamor_render.c:1689)
==9530== by 0xAD1ED90: glamor_composite (glamor_render.c:1758)
==9530== by 0x519FD6: damageComposite (damage.c:502)
==9530== by 0xAD27AA3: glamor_trapezoids (glamor_trapezoid.c:147)
==9530== by 0xAD27B51: glamor_trapezoids (glamor_trapezoid.c:101)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84176
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
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>
Nice, but not something our Windows servers build, and not something
that belongs in mi anyway.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
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>
This disables the tcp listen socket by default. Then, it
uses a new xtrans interface, TRANS(Listen), to provide a command line
option to re-enable those if desired.
v2: Leave unix socket enabled by default. Add configure options.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
The dtrace code in the server wants to log the name of each executed
request, which it gets from the registry. Use that as an additional
indication of when that portion of the registry should be included in
the server build.
See:
http://tinderbox.x.org/builds/2014-09-19-0003/logs/xserver/#build
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dave Airlie <airlied@gmail.com>
$ 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>
I can't find any performance benefit to using the GL path and the code
renders this trapezoid incorrectly:
top: FIXED 29.50
bottom: FIXED 30.00
left top: POINT 0.00, 29.50
left bottom: POINT 0.00, 30.50
right top: POINT -127.50, 29.50
right bottom: POINT 52.50, 30.00
This should render a solid line from 0,30 to 52,30 but draws nothing.
The code also uses an area computation for trapezoid coverage which
does not conform to the Render specification which requires a specific
point sampling technique.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This enables the assertion that all users of the large pixmap member
are restricted to pixmaps which are actually large.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
glamor_composite_largepixmap_region is given the job of dealing with
compositing between a mixture of large and small pixmaps. However, it
was assuming that the destination pixmap was large and fetching
members of the large structure even for small pixmaps.
This manifested with assertion failures when compositing from a large
pixmap to a small pixmap.
Fixed by using the pixmap size for the destination block size for
small pixmaps.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
glamor_compute_clipped_regions_ext wants to treat small and large
pixmaps uniformly and did that by writing into the large pixmap
union member in small pixmaps to construct something that looks like a
one texture large pixmap.
Instead of doing that, simply allocate the necessary elements locally
on the stack and use them from there.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
For now, this simply fetches the large member of the pixmap private.
It will be changed to assert that the pixmap is large once bugs
related to that have been fixed.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This is the last function-like macro in glamor_priv.h; change to
static inline like all of the other functions there.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
If a flip is active at server reset time, the associated window will
get destroyed which will queue an unflip operation. If that isn't
synchronous, then it won't have finished by the time CloseScreen is
called.
Calling present_flip_idle will signal the fence and remove the
reference to the fence and pixmap, freeing these in the X server and
allowing a DRM client to clean up as well.
This also rewords other comments in present_flip_destroy, removing
scary words about needing synchronous operation (everything in this
function is synchronous now) and describing what effect we actually
need from present_set_abort_flip.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
We added this option to the present protocol before 1.0 but somehow
never implemented it in the server. It's pretty simple; just don't
ever do flips if the application specifies Copy.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Instead of making the inclusion of the registry code a global
conditional, split the registry into two pieces; the bits required by
the X-Resource extension (the resource names) and the bits required by
the XCSECURITY extension (the protocol names). Build each set of code
if the related extension is being built.
v2: Check for both XCSECURITY and XSELINUX.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Don't leave this file open during the whole server execution process;
close it once all of the extensions are initialized.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
The hash table functions are only included in the server when the
X-Resource extension is built, so don't try to build and test them
unless the X-Resource extension is being built.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
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>
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>
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>
This should have been part of d0da0e9c3b
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
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>
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>