summaryrefslogtreecommitdiff
path: root/hw/kdrive
AgeCommit message (Collapse)AuthorFilesLines
2015-08-28debug output format fix in ephyrProcessMouseMotion()Jon TURNEY1-2/+2
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-06-30cursor: drop ARGB_CURSORDave Airlie1-4/+0
I doubt anyone builds with this turned off or has done for a long time. It helps my eyes bleed slightly less when reading the code, I've left the define in place as some drivers use it. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-05-12Xephyr: Fix broken image when endianess of client machine and host-Xserver ↵Egbert Eich1-2/+10
differ The image is created in the native byte order of the machine Xephyr is rendered on however drawn in the image byte order of the Xephyr server. Correct byte order in the xcb_image_t structure and convert to native before updating the window. If depths of Xephyr and host server differ this is already taken care of by the depth conversion routine. It is a terrible wase to always convert and transmit the entire image no matter of the size of the damaged area. One should probably use sub-images here. For now we leave this as an exercise. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-12Xephyr: Fix screen image draw for the non-Glamor & non-XHSM caseEgbert Eich1-1/+1
xcb_image_put() prints the entire image, therefore don't use an offset. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-12Xephyr: Fix compile when debugging is enabledEgbert Eich1-1/+1
Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-12Xephyr: Print default server display number if none is specifiedEgbert Eich1-1/+1
Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-05-12Xephyr: Don't crash when no command line argument is specifiedEgbert Eich3-4/+9
The DDX specific command line parsing function only gets called if command line arguments are present. Therefore this function is not suitable to initialize mandatory global variables. Replace main() instead. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2015-04-21Convert hw/kdrive to new *allocarray functionsAlan Coopersmith6-14/+14
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-03-24ephyr: Avoid a segfault with 'DISPLAY= Xephyr -glamor'Jon TURNEY1-1/+1
ephyr_glamor_connect() returns NULL if we failed, but applying xcb_connection_has_error() to NULL is not permitted. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Daniel Martin <consume.noise@gmail.com>
2015-03-24glamor: Just set the logic op to what we want at the start of all rendering.Eric Anholt1-0/+2
By dropping the unconditional logic op disable at the end of rendering, this fixes GL errors being thrown in GLES2 contexts (which don't have logic ops). On desktop, this also means a little less overhead per draw call from taking one less trip through the glEnable/glDisable switch statement of doom in Mesa. The exchange here is that we end up taking a trip through it in the XV, Render, and gradient-generation paths. If the glEnable() is actually costly, we should probably cache our logic op state in our screen, since there's no way the GL could make that switch statement as cheap as the caller caching it would be. v2: Don't forget to set the logic op in Xephyr's drawing. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2015-03-24glamor: Eliminate GLAMOR_USE_SCREEN and GLAMOR_USE_PICTURE_SCREENKeith Packard1-3/+1
Remove these defines as we start to remove support for non-standard glamor layering as used by the intel driver. v2: Rebase on the blockhandler change and the Xephyr init failure change (by anholt), fix stray NO_DRI3 addition to xwayland. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-24ephyr: Fail if glamor is requested but not usableOlivier Fourdan1-3/+6
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-13Drop valuator mask argument from GetKeyboardEventsPeter Hutterer1-1/+1
Nothing was using it and if anyone had they would've gotten a warning and noticed that it doesn't actually work. Drop this, it has been unused for years. Input ABI 22 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2015-01-07Synchronize capslock in Xnest and XephyrOlivier Fourdan1-1/+7
In Xnest or Xephyr, pressing CapsLock when focus is on another window does not update the state in the nested X server. This is because when synchronizing the lock modifier, sending a keypress or a key release only is not sufficient to toggle the state, unlike regular modifiers, one has to emulate a full press/release to lock or unlock the modifier. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-02ephyr: Implement per-screen colormapsMichele Baldessari4-7/+9
Xephyr's pseudocolor emulation added in: commit 81a3b6fe27567b4f91033ece69996aa6bf8d01a3 Author: Matthew Allum <breakfast@10.am> Date: Mon Nov 8 22:39:47 2004 +0000 Add support to Xephyr for lower depths than hosts only tracks one global colormap for the whole (Xephyr) display. Move this to per-screen state so each screen's colormap can be correct. [ajax: rebased to 1.17, cleaned up commit message] Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Michele Baldessari <michele@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-11-12Drop trailing whitespacesPeter Hutterer16-41/+41
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-10-27dix: Always store GC client clip as a region (v2)Adam Jackson1-1/+1
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-22Xephyr: option to disable grabbing the hostWilliam ML Leslie3-3/+18
This patch makes it possible to use C-S key combinations within Xephyr without losing access to the host window manager's commands. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-10-09Merge remote-tracking branch 'ajax/dead-code'Keith Packard1-13/+0
2014-10-09dix: Drop the third argument from WindowExposuresProcPtrAdam Jackson2-4/+4
A careful read shows that it was always NULL. It hasn't always been; as the DDX spec indicates, it was the "occluded region that has backing store", but since that backing store code is long gone, we can nuke it. mi{,Overlay}WindowExposures get slightly simpler here, and will get even simpler in just a moment. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-08kdrive: Remove vestigial reference to fbInitValidateTreeAdam Jackson1-4/+0
Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-10-08exa, kdrive: Remove redundant BitsPerPixel macrosAdam Jackson1-13/+0
We already get this from servermd.h Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-09-18ephyr: Properly implement hardware cursors (v3)Adam Jackson6-80/+295
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>
2014-08-21ephyr: set screen size & origin from host X server output's CRTC geometryLaércio de Sousa5-7/+174
If a given output is passed via new -output option, Xephyr will query host X server for its info. If the following conditions are met: a. RandR extension is enabled in host X server; b. supported RandR version in host X server is 1.2 or newer; c. the given output name is valid; d. the given output is connected; then Xephyr will get output's CRTC geometry and use it to set its own screen size and origin. It's just like starting Xephyr in fullscreen mode, but restricted to the given output's CRTC geometry (fake "Zaphod mode"). This is the main feature needed for Xephyr-based single-card multiseat setups where we don't have separate screens to start Xephyr in fullscreen mode safely. Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21ephyr: enable screen window placement following kdrive -screen option ↵Laércio de Sousa5-6/+27
extended syntax With this patch, one can launch Xephyr with option "-screen WxH+X+Y" to place its window origin at (X,Y). This patch relies on a previous one that extends kdrive -screen option syntax to parse +X+Y substring as expected. If +X+Y is not passed in -screen argument string, let the WM place the window for us, as before. Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-21kdrive: add support to +X+Y syntax in -screen option parsingLaércio de Sousa2-4/+21
This patch enhances current -screen option parsing for kdrive-based applications. It can parse strings like <WIDTH>x<HEIGHT>+<XOFFSET>+<YOFFSET>, storing X and Y offsets in KdScreenInfo instances. For negative values, this patch supports +-X+-Y (not -X-Y) syntax. It will allow e.g. proper Xephyr window placement for multiseat purposes. Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2014-08-07kdrive: Remove a dead struct.Eric Anholt1-9/+0
It's never been used in the history of the tree. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-07xv: Drop the ClientPtr from the interface to the DDX.Eric Anholt1-29/+20
Nobody was using it. v2: Merge the hunk that was accidentally in the previous commit into this one. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-07xv: Remove the no-op AllocatePort/FreePort interfaces.Eric Anholt1-17/+0
v2: Fix accidentally squashed-in change for dropping client from the arguments, which should have been in the next commit. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> (v2)
2014-08-06kdrive: Don't bother explicitly clearing new window privates to NULL.Eric Anholt2-22/+0
Privates are initially cleared to zero by dixInitPrivates(). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06kdrive: Remove dead KXVPaintRegion().Eric Anholt2-44/+0
It's been unused since mach64 was deleted, and now there's a helper in core XV. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06xv: Move CloseScreen setup from a DIX hook to normal wrapping.Eric Anholt2-13/+6
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06xv: Move the DDX XV screen private allocation into the DDXes.Eric Anholt1-7/+5
XV was going against convention by having the core infrastructure allocate the private on behalf of the DDX. I was interested in this because I was trying to make multiple pieces of DDX be able to allocate adaptors, and that wasn't going to work if DDX-specific code was hung off of a single global screen private. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06xv: Drop the ddQueryAdaptors() interface.Eric Anholt1-16/+2
The core was passing pointers to pxvs's nAdaptors and pAdaptors, and the two hardware implementations were copying pxvs's nAdaptors and pAdaptors into those pointers. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06xv: Move common code for adaptor cleanup to xvmain.cEric Anholt1-27/+1
Since any DDX XV screen cleanup would need this same code for freeing the tree of pointers for xv adaptors, move it to the dix. v2: Unconditionalize the pPorts freeing, to match the block above it. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> (v1)
2014-08-06xv: Remove dead VIDEO_NO_CLIPPING from the xorg and kdrive DDXes.Eric Anholt2-47/+0
As far as I can see, nothing has ever used this flag except possibly the i.mx6 xorg ddx debug during bringup. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-08-06xv: Remove dead VIDEO_INVERT_CLIPLIST from the xorg and kdrive DDXes.Eric Anholt2-25/+0
As far as I can see (looking at trees on my disk, plus googling for the term), nothing has ever used this flag Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-07-29kdrive: Remove some dead bits of the man pageAdam Jackson1-7/+0
Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-17Merge remote-tracking branch 'origin/master' into glamor-nextEric Anholt5-0/+16
I've done this merge manually to resolve the minor conflict in glamor.c. Signed-off-by: Eric Anholt <eric@anholt.net>
2014-07-17glamor: Remove always-true yInverted flag.Eric Anholt1-2/+1
All users of glamor had the same value set, and it complicated things for no reason. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-07-17ephyr: Free damage structure at server reset timeKeith Packard5-0/+16
The usual mechanism for freeing a damage structure when the pixmap is destroyed does not work for the screen pixmap as it isn't freed in the normal way. The existing driver cleanup function, scrfini, is called after the wrapped CloseScreen functions, including damageCloseScreen, are called and thus ephyr can't free the damage structure at that point. Deal with this by providing an early CloseScreen hook in KdCloseScreen which ephyr can use to free the damage structure before damage itself shuts down. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2014-06-16xephyr: Allow initializing glamor with gles2 (on GLX).Eric Anholt2-2/+34
This should be useful for glamor development, so you can test both paths (which are significantly different, and apparently glamor_gradient.c was broken on GLES2 as of the import). Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-15glamor: Share code for put_image handling.Eric Anholt1-89/+6
The difference between the two is that XF86 has the clip helper that lets you upload less data when rendering video that's clipped. I don't think that's really worth the trouble, especially in a world of compositors, so I've dropped it to get to shared code. It turns out the clipping code was broken on xf86-video-intel anyway. To reproduce, run without a compositor, and use another window to clip the top half of your XV output on the glamor XV adaptor: the rendering got confused about which half of the window was being drawn to. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-15ephyr: Add support for XV using glamor.Eric Anholt4-1/+262
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-15kdrive: Mark XV names const to avoid warnings.Eric Anholt1-2/+2
No code modifies it at runtime, and it's common to store string literals to it. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-15kdrive: Simplify the adaptor setup interface.Eric Anholt3-23/+7
Now that we don't have to worry about the generic adaptors code, there's no need to have a list of pointers to different sets of adaptors. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-15kdrive: Remove dead generic XV adaptors code.Eric Anholt3-57/+1
I couldn't find any callers in the history of the tree. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-15kdrive: Do a little more cleanup from the XV struct deduplication.Eric Anholt3-29/+19
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2014-06-12ephyr: Deal with non-root visual for windowKeith Packard1-10/+21
glx will sometimes select a non-root visual, deal with that by creating a suitable colormap and using that instead of attempting to use the default colormap. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-04-18kdrive: Ignore failure to chown console tty to current userKeith Packard1-2/+5
I'm not sure what we'd do in this case anyways, other than fatal error. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>