* hw/kdrive/ephyr/ephyrglxext.c:
fixed various logging functions
(ephyrGLXGetStringReal): make sure all the string is sent to clients
including the ending zero.
* hw/kdrive/ephyr/ephyrhostglx.c:
(ephyrHostGLXGetStringFromServer): better error handling.
(ephyrHostGLXSendClientInfo): ditto.
(ephyrHostGLXMakeCurrent): ditto
* hw/kdrive/ephyr/ephyr.c:
(EphyrDuplicateVisual): when duplicating the
visual, copy the color component masks and the class
from the hostX
(EphyrMirrorHostVisuals): don't mix blue and green mask.
* hw/kdrive/ephyr/ephyrdri.c: add more logs.
(ephyrDRICreateDrawable): actually implement this.
for the moment it creates a DRI drawable for the hostX window,
no matter what drawable this call was issued for.
(ephyrDRIGetDrawableInfo): actually implemented this.
for the moment the drawable info queried for its attrs is the
Xephyr main main window.
* hw/kdrive/ephyr/ephyrdriext.c:
(ProcXF86DRIGetDrawableInfo): properly hook this dispatch
function to the ephyrDRIGetDrawableInfo() function.
* hw/kdrive/ephyr/ephyrglxext.c: add a bunch of GLX implementation hooks
here. Hijack some of the xserver GLX hooks with them. Still need to
properly support byteswapped clients though.
* hw/kdrive/ephyr/ephyrhostglx.c,h: actually implemented the protocol
level forwarding functions used by the GLX entr points in
ephyrglxext.c. Here as well, there are a bunch of them, but we are
far from having implemented all the GLX calls.
* hw/kdrive/ephyr/hostx.c,h:
(hostx_get_window_attributes): added this new entry point
(hostx_allocate_resource_id_peer): added this to keep track of
resource IDs peers: one member of the peer is in Xephyr, the other
is in host X.
(hostx_get_resource_id_peer): ditto.
* hw/kdrive/ephyr/ephyr.c: make Xephyr mirror
the visuals of the host X upon startup. This
is important for GLX client apps.
* hw/kdrive/ephyr/hostx.c,h: add a hostx_get_visuals_info()
to get the visuals of the host X.
* hw/kdrive/ephyr/ephyrglxext.c:
(ephyrGLXGetFBConfigsSGIX): proxy the GLXGetFBConfigsSGIX call.
It is a vendor extension to get the visual configs as a list of
name/value pairs.
(ephyrHijackGLXExtension): hijack the VendorPriv_dispatch_info
dispatch table to register our implementation of GLXGetFBConfigsSGIX
(ephyrGLXGetFBConfigsSGIXReal): added this where the real
implementation of GLXGetFBConfigsSGIX is. It support bytes swapping.
(ephyrGLXGetFBConfigsSGIX,ephyrGLXGetFBConfigsSGIXSwap): these are
the dispatch entry points. They just call
ephyrGLXGetFBConfigsSGIXReal.
* hw/kdrive/ephyr/ephyrhostglx.c,h: reorganize the proxies to get
visual params from the host so that they clearly support the different
methods of doing so.
* hw/kdrive/ephyr/Makefile.am: add the proxy extension to
ephyr. The proxy extension is an experimental extension that
forwards protocol packets targeted at a given extension to the
host X.
* hw/kdrive/ephyr/ephyr.c: init proxy ext.
* hw/kdrive/ephyr/ephyrhostproxy.c,h: added this new file as part of the
proxy extension.
* hw/kdrive/ephyr/ephyrproxyext.c,h: ditto
* hw/kdrive/ephyr/hostx.c: add the hostx_get_get_extension_info() entry
point.
* hw/kdrive/ephyr/XF86dri.c: re format this correctly.
Make function decls honour the Ansi-C standard.
* hw/kdrive/ephyr/ephyr.c: protect glx/dri related
extension initialisation with the XEPHYR_DRI
macro. Initialize the GLX ext hijacking
at startup.
* hw/kdrive/ephyr/ephyrdri.c: add more logging to ease debugging
* hw/kdrive/ephyr/ephyrdriext.c: ditto. reformat.
* hw/kdrive/ephyr/ephyrglxext.c,h: add this extension to
proxy GLX requests to the host X. started to proxy those nedded to
make glxinfo work with fglrx. Not yet finished.
* hw/kdrive/ephyr/ephyrhostglx.c,h: put here the actual
Xlib code used to hit the host X server because Xlib stuff cannot be
mixed with xserver internal code, otherwise compilation erros due to
type clashes happen. So no Xlib type should be exported by the
entrypoints defined here.
* hw/kdrive/ephyr/ephyrhostvideo.c/h:
(ephyrHostXVStopVideo): add this entry point.
* hw/kdrive/ephyr/ephyrvideo.c:
Basically add ReputImage and StopVideo implementations.
Now, when other windows obscur the video window, the reclipping
seems to be well handled using StopVideo and ReputImage.
To do this, I was obliged to save the frame in PutImage, so
that I could resend it un ReputImage.
* hw/kdrive/ephyr/ephyrvideo.c:
(ephyrXVPrivQueryHostAdaptors): properly set
port private luke. This fixes a crash when
the host Xv supports multiple ports.
Make sure number of ports cannot be zero.
* configure.ac,include/dix-config.h.in: define the XEPHYR_DRI macro.
define it when --enable-xephyr and --enable-dri are both turned on.
* hw/kdrive/ephyr/XF86dri.c: copy this from mesa source to enable
Xephyr to talk DRI protocol the host X. In mesa, this is used by libGL.so to
talk DRI protocol with the server.
* hw/kdrive/ephyr/ephyr.c: finally initialise the DRI extension
in the ephyrInitScreen() function.
* hw/kdrive/ephyr/ephyrdri.c,ephyrdriext.c: safeguard the compilation
using the XEPHYR_DRI macro.
* hw/kdrive/ephyr/ephyrdriext.c: added this to implement a DRI extension
into Xephyr. Normally the DRI extension is only present in the
xfree86 server, but I have ported it to Xephyr. The extension calls
functions that declared/defined in ephyrdri.h ephyrdri.c that
forwards the DRI calls to the host X. It does not work yet, as this
entry is just to put the big bricks in place.
* hw/kdrive/ephyr/ephyrdri.c,h: declaration & definition of the
DRI client API that would hit the hostX server.
* hw/kdrive/ephyr/GL/internal/dri_interface.h: added this, otherwise
inclusion of /usr/include/X11/dri/xf86dri.h won't compile
* hw/kdrive/ephyr/ephyrhostvideo.c,h:
(ephyrHostXVPutImage): make this support clipping region.
The clipping region is propagated to host using XSetClipRectangles.
This changes the API of ephyrHostXVPutImage.
* hw/kdrive/ephyr/ephyrvideo.c:
(ephyrPutImage): propagate the clipping region to the new
ephyrHostXVPutImage() entry point.
* hw/kdrive/ephyr/ephyrvideo.c:
(ephyrInitVideo) make the EphyrXVPriv object be a
singleton instance, otherwise a new object is created at each
generation.
* hw/kdrive/ephyr/ephyrhostvideo.c,h:
(ephyrHostXVAdaptorHasPutVideo): detect if
host X has the PutVideo call.
(ephyrHostXVAdaptorHasPutStill): detect if
host X has the PutStill call
(ephyrHostXVAdaptorHasPutImage): detect if
host X has the PutImage call
* hw/kdrive/ephyr/ephyrvideo.c:
(ephyrXVPrivQueryHostAdaptors): make sure to create
atoms for attribute names otherwise subsequent
calls to get/set attribute from clients won't work.
(ephyrXVPrivSetAdaptorsHooks): don't hardwire advertising
of the PutImage call. Instead, advertise the calls advertised
by the host.
* hw/kdrive/ephyr/ephyrhostvideo.c,h:
(ephyrHostXVLogXErrorEvent): add this to
log X error events. Heavily copied from libx11
(ephyrHostXVErrorHandler): new x error handler that
logs the error but does not exits.
(ephyrHostXVInit): add this to be called at the beginning
of xvideo lifetime. It sets an xerror handler that does not
exit.
* hw/kdrive/ephyr/ephyrvideo.c:
(ephyrXVPrivIsAttrValueValid): this validates an attribute
value.
(ephyrSetPortAttribute): before setting an attribute,
validate the new value so that we don't send a buggy
request to host X.
* hw/kdrive/ephyr/*.c: fix case in ephyrvideo code.
* hw/kdrive/ephyr/ephyr.c: fix a typo
* hw/kdrive/ephyr/ephyrhostvideo.c,h:
(EphyrHostXVPutImage): first implementation. does not
support clipping regions yet.
* hw/kdrive/ephyr/ephyrvideo.c:
(DoSimpleClip): clip using a clipping box. Does not
support regions yet.
(EphyrPutImage): first implementation.
Uses a simple clipping rectangle, no region yet.
* hw/kdrive/ephyr/hostx.c:
(hostx_get_window): added this to get the main
window of the host x.
* hw/kdrive/ephyr/ephyrhostvideo.c,h:
(EphyrHostXVQueryImageAttributes): add this call. It calls
XvQueryBestSize xserver entry point. It uses the protocol
level machinery because Xvlib does not expose that entry point
as a C function.
(EphyrHostXVQueryBestSize): added this wrapper around XvQueryBestSize().
(EphyrHostGetAtom, EphyrHostGetAtomName): added this to get
an atom or atom name from the host server
* hw/kdrive/ephyr/ephyrvideo.c:
(EphyrSetPortAttribute): convert the atom into an host server
server atom before attacking the host server with it, because in
in its current form, the input atom is only valid in xephyr.
This fix makes this call work.
(EphyrGetPortAttribute): ditto.
(EphyrQueryBestSize): implement this.
(EphyrQueryImageAttributes): implement this.
* hw/kdrive/ephyr/ephyrhostvideo.c:
(EphyrHostXVAdaptorGetVideoFormats): properly get visual class instead of
returning the visual id.
(EphyrHostXVQueryEncodings): properly copy the fields because simple casting does
truncate some fields.
(EphyrHostAttributesDelete): XFree the whole array instead of trying to free invidial members.
* hw/kdrive/ephyr/ephyrvideo.c:
(ephyrInitVideo): fix a typo
(EphyrXVPrivQueryHostAdaptors): set XvWindowMask mask to adaptors type.
use host adaptor name. Don't forget to set nImages field.
(EphyrXVPrivRegisterAdaptors): report an error when KdXVScreenInit() fails.
* This patch adds multiscreen support to Xephyr. For instance,
the command line : "Xephyr :4 -ac -screen 320x240 -screen 640x480"
will launch with two "screens" - namely two main windows.
The first main window represents a screen that has the number :4.0, with
a geometry of 320x240 pixels, and the second one represents a screen
that has the number :4.1 with a geometry of 640x480.
The command line: "DISPLAY=:4.1 xclock" will launch the xclock program
on the second screen, for intance.
* this patch was edited by Dodji Seketeli <dodji@openedhand.com> for:
- better style compliance with the rest of the Xephyr code
- make sure Xephyr could be launched with no -screen option. By
default that creates a default screen of 640x480 pixel like before
- display full titles on the windows - with insctructions to grab
keyboard and mouse - like before.
Removes "LookupKeyboardDevice" and "LookupPointerDevice" in favor of
inputInfo.keyboard and inputInfo.pointer, respectively; all use cases
are non-XI compliant anyway.
This was an attempt to avoid scratch gc creation and validation for paintwin
because that was expensive. This is not the case in current servers, and the
danger of failure to implement it correctly (as seen in all previous
implementations) is high enough to justify removing it. No performance
difference detected with x11perf -create -move -resize -circulate on Xvfb.
Leave the screen hooks for PaintWindow* in for now to avoid ABI change.
* configure.ac: re-sort Kdrive libs so that symbols get properly resolved.
Basically, all some libs are present in both $KDRIVE_LIBS and $XSERVER_LIBS,
and some libs orders are not correct. So I made sure Kdrive servers don't have
to link against $KDRIVE_LIBS *and* $XSERVER_LIBS. They just have to link
against $KDRIVE_LIBS now.
* hw/kdrive/*/Makefile.am: update those makefile to reflect the change in configure.ac
Licensing issues of these files include:
- They claim to be licensed under the GPL, yet we haven't allowed that in the
xserver repository in the past.
- They refer the user to the top of the tree for GPL license text, yet it isn't
there.
- They claim to be derived from the (MIT-licensed) ati kdrive code, yet don't
follow the licensing terms of those files.
over to new system.
Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
Composite's automatic redirection is a more general mechanism than the
ad-hoc BS machinery, so it's much prettier to implement the one in terms
of the other. Composite now wraps ChangeWindowAttributes and activates
automatic redirection for windows with backing store requested. The old
backing store infrastructure is completely gutted: ABI-visible structures
retain the function pointers, but they never get called, and all the
open-coded conditionals throughout the DIX layer to implement BS are gone.
Note that this is still not a strictly complete implementation of backing
store, since Composite will throw the bits away on unmap and therefore
WhenMapped and Always hints are equivalent.
I exported the evdev driver to Xephyr server. I'm running it using something
like:
$ ./hw/kdrive/ephyr/Xephyr :1 -mouse evdev,,device=/dev/input/event4 -keybd \
evdev,,device=/dev/input/event1,xkbmodel=abnt2,xkblayout=br
It also closes /#5668.
and the Xephyr virtual mouse keeps alive. With this patch the semantic changes
turning '-pointer' && 'Xephyr virtual mouse' always false.
Now we can open a device pointer and pass its options in Xephyr's command line
without having other pointer unused.
The former <X11/extensions/XKBsrv.h> has been pulled into the server now as
include/xkbsrv.h, and the world updated to look for it in the new place,
since it made no sense to define server API in an extension header. Any
further work along this line will need to do similar things with XKBgeom.h
and friends.
Only try to build Linux support on Linux. We should probably disable all
OS-dependent DDXes if we don't have a workable OS (and only build
Xephyr/Xfake), but that's future work.
Move the bell into an OS function, and use that if it's declared; else,
fall back to using the driver's function.
Remove the Linux keyboard bell function; just move it into the OS layer.
Use named initialisers when converting the old structures, and eliminate
unused functions.
Add KdOsAddInputDrivers, which adds all relevant input drivers.
Could possibly be refactored to KdAddInputDrivers, which called through
OsFuncs to a new function, if it existed.
Move the keymap copying to event processing time (in
ProcessInputEvents), instead of being at event enqueuing time.
Break SetCore{Pointer,Keyboard} out into separate functions.
Change mieqEnqueue to take a device pointer, that asks for the
_original_ device associated with this event.
Don't allocate events on every GKE/GKVE/GPE call, just have the DDX manage
it instead. Introduce GetMaximumEventsNum(), which is the maximum number
of events these functions will ever produce.
Add the 'ephyr' mouse and keyboard drivers to the driver list so we can
re-add devices.
Set the names properly in Ephyr{Keyboard,Mouse}Init, not in InitInput.
Do a linear n -> n initialisation on the map up until KD_MAX_BUTTON in
KdNewPointer, moving it out of both KdParsePointer, and KdPointerProc.
Also remove dead pointer acceleration code.
Initialise our axes properly in the DIX, and make sure we don't
unnecessarily clip maxval when it's not set.
Fix keymap copying in Xephyr (to some degree: it's still broken),
and set nAxes and nButtons properly.
Convert KDrive to GPE/GKE interface.
Add first-class drivers and enumerate every device separately through
Xi, instead of lamely attempting to aggregate them.
Add XKB support to the Linux keyboard driver.
Add 'thumb button' support to the tslib driver.
Rejig InitInput, so each DDX has to add a list of drivers it supports.
Support NewInputDeviceRequest, et al.
Add #include <sys/file.h> on Solaris for FNONBLOCK/FASYNC definitions
hw/kdriver/linux/Makefile.am Move agp.c & agp.h to KDRIVE_HW_SOURCES since
they're not needed for Xephyr-only builds
Add -lrt to XEPHYR_LIBS if needed to get nanosleep().
down into an OutReverse and an Add. Turn off the fallback to software
glyphs when component alpha, now that we expect all (new) drivers to be
able to support it. Also, make Xephyr fall back in the CA Over case to
exercise this code. This speeds up my rgb24text and ls -lR in
gnome-terminal by a factor of 5.
lack of a better name. This one behaves somewhat between Greedy and
Always. It moves in if we can accelerate, unless the destination is
clean and shouldn't be kept in framebuffer according to the score, in
which case we migrate out (and force-migrate anything where migration
is free). This should help fix lack of acceleration for drivers without
UTS since removing exaAsyncPixmapGCOps, and has removed one performance
trap with Radeon I'd noticed. It is the new default.
devPrivate.ptr when pointing at offscreen memory, outside of
exaPrepare/FinishAccess(). This was used with fakexa to find (by NULL
dereference) many instances of un-Prepared CPU access to the
framebuffer:
- GC tiles used in several ops when fillStyle == FillTiled were never
Prepared.
- Migration could lead to un-Prepared access to mask data in render's
Trapezoids and Triangles
- PutImage's UploadToScreen failure fallback failed to Prepare.
acceleration, and set the migration scheme to Always on init (since
this is all for testing, and Always should make migration happen more
frequently than Greedy).
same width/height for front-buffer drawing. The fakexa code then uses
this extra space for offscreen pixmaps. Note that this tones down the
absurdity of fakexa's offscreen pixmap alignment requirements (odd
alignment is too weird, so stick with "24", which is still strange but
exists out there). It also fixes a couple of bugs in the fakexa
implementation revealed by using offscreen pixmaps.
when extending the driver interface. The card and accel structures are
merged into the ExaDriverRec, which is to be allocated using
exaDriverAlloc(). The driver structure also grows exa_major and
exa_minor, which drivers fill in and have checked by EXA
(double-checking that the driver really did check that the EXA version
was correct). Removes exaInitCard(), which is replaced by the driver
filling in the rec by hand, and the exaGetVersion() and related
EXA_*VERSION which are replaced by always using the XFree86 loadable
module versioning.
implementation that calls fb to get its work done. The purpose is to
have a trusted EXA driver for use with testing changes to the core of
EXA. However, fakexa has not received much testing yet, lacks offscreen
pixmaps support, and doesn't reliably provide garbage when EXA doesn't
get its syncing right. All of these should be fixed soon.
Attempt to build xeglmodule.c, not xglxmodule.c.
Add xf86Sbus.h to EXTRA_DIST, as _HEADERS doesn't appear to get the same
treatment as _SOURCES in terms of automatically DISTing.
Changed the semantics of the Convolution filter a bit. It now doesn't try
to normalize the filter values but leaves this to the client. This
gives more reasonable behaviour in the limit where the filter
parameters sum up to 0.
implementation. Includes cache flushing to prevent bad first reads of
the framebuffer, fixing blending of many formats, falling back on many
unsupported operations, and falling back early to prevent migration.
Passes all of rendercheck except some of the blend (!) tests.
in the kaa structure: markSync and waitMarker. The first, if set,
returns a hardware-dependent marker number which can then be waited for
with waitMarker. If markSync is absent (which is the case on all
drivers currently), waitMarker must wait for idle on any given marker
number. The intention is to allow for more parallelism when we get
downloading from framebuffer, or more fine-grained idling.
- Replace the KdMarkSync/KdCheckSync functions with kaaMarkSync and
kaaWaitSync. These will need to be refined when KAA starts being smart
about using them. Merge kpict.c into kasync.c since kasyn.c has all the
rest of these fallback funcs.
- Restructure all drivers to initialize a KaaInfo structure by hand rather
than statically in dubious order.
- Whack the i810 driver into shape in hopes that it'll work after this
change (it certainly wouldn't have before this). Doesn't support my
i845 though.
- Make a new KXV helper to avoid duplicated code to fill the region with
the necessary color key. Use it in i810 and mach64 (tested).
When COMPOSITE is enabled, call CopyWindow even when the pixels "don't
move" on screen.
Don't reject modes that are not supported by the unused monitor.
but includes debugging to ensure that the reg being submitted is the
one that follows in the packet. Convert most uses of OUT_RING to it,
and convert a couple of OUT_REG sets to DMA_PACKET0/OUT_RING_REG. Also,
add checking to see if more registers are submitted to a DMA_PACKET0
than should be, to avoid hangs during stupid mistakes (checking for
less isn't done).
reading a register/attempting DMA. Now it'll wait for a certain number
of seconds rather than a certain number of times through the loop
before deciding that it's timed out and resetting the hardware. Also,
add more timeout handling, and reset the draw state after resetting the
engine.