Commit Graph

4093 Commits

Author SHA1 Message Date
Dodji Seketeli
0b85451449 Implement ReputImage and StopVideo
* 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.
2007-10-02 16:55:14 +02:00
Dodji Seketeli
810dc55866 Ephyr-Xv: add a new line to a log
* hw/kdrive/ephyr/ephyrvideo.c:
	  (ephyrQueryImageAttributes): add newline to log.
2007-10-02 16:55:14 +02:00
Dodji Seketeli
47e6dff89e Xephyr-Xv: fix a crash when host X support several ports
* 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.
2007-10-02 16:55:14 +02:00
Dodji Seketeli
a38ad562a6 make xephyr talk DRI protocol with hostX
* 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.
2007-10-02 16:55:14 +02:00
Dodji Seketeli
e4239a4807 Initial dri forwarding big bricks.
* 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
2007-10-02 16:55:14 +02:00
Dodji Seketeli
e01d3dd98d Support clipping region in PutImage.
* 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.
2007-10-02 16:55:14 +02:00
Dodji Seketeli
39d3895469 make EphyrXVPriv be a singleton
* hw/kdrive/ephyr/ephyrvideo.c:
	  (ephyrInitVideo) make the EphyrXVPriv object be a
	   singleton instance, otherwise a new object is created at each
	   generation.
2007-10-02 16:55:14 +02:00
Dodji Seketeli
4ed083095a add [Get/Put]Video and [Get/Put]Still support
* hw/kdrive/ephyr/ephyrhostvideo.c,h:
	  (ephyrHostXVAdaptorHasXXX): fix these.
	  (ephyrHostXVAdaptorHasGetVideo): added this
	  (ephyrHostXVAdaptorHasGetStill): ditto
	  (ephyrHostXVPutVideo): added this
	  (ephyrHostXVGetVideo): ditto
	  (ephyrHostXVPutStill): ditto
	  (ephyrHostXVGetStill): ditto
	* hw/kdrive/ephyr/ephyrvideo.c:
	  (ephyrPutVideo): implement this
	  (ephyrGetVideo): ditto
	  (ephyrPutStill): ditto
	  (ephyrGetStill): ditto
	  (ephyrXVPrivSetAdaptorsHooks): advertise GetVideo and GetStill
	  when the host X supports it.
2007-10-02 16:55:14 +02:00
Dodji Seketeli
6f7961bc21 advertise only the hooks implemented by host X
* 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.
2007-10-02 16:55:14 +02:00
Dodji Seketeli
1de89239bd don't crash when hostX reports an error.
* 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
2007-10-02 16:55:13 +02:00
Dodji Seketeli
207714b60d first implementation of putimage
* 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.
2007-10-02 16:55:13 +02:00
Dodji Seketeli
aa478e09e2 make properties setting/query code work and hopefully complete.
* 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.
2007-10-02 16:55:13 +02:00
Dodji Seketeli
24c837c0be implement setportattribute and getportattribute calls 2007-10-02 16:55:13 +02:00
Dodji Seketeli
b8cd313be4 make xvinfo work
* 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.
2007-10-02 16:55:13 +02:00
Dodji Seketeli
aa2fae7b75 misc fixes.
*(EphyrHostXVQueryAdaptors): return the queried adaptors list
        * (EphyrHostXVQueryPortAttributes): return port attributes number
2007-10-02 16:55:13 +02:00
Dodji Seketeli
2bf7f3c223 link and init xv 2007-10-02 16:55:13 +02:00
Dodji Seketeli
66b28532e5 initial commit of xv support work 2007-10-02 16:55:13 +02:00
Dodji Seketeli
1e8f8b36a5 works with no adaptors
Debug the early code to make work when the host has no video adaptors
2007-10-02 16:55:13 +02:00
Dodji Seketeli
50ff2377ca add -verbosity <level> option to command line 2007-10-02 16:55:13 +02:00
Dodji Seketeli
8426eb2433 link and init xv 2007-10-02 16:55:13 +02:00
Dodji Seketeli
50a64c84e1 initial commit of xv support work 2007-10-02 16:45:01 +02:00
Dodji Seketeli
95fadbd402 Add basic Exa driver entry point validation.
In exaDriverInit(), quickly check if the programmer forgot to set some
mandadory driver hooks, in that case display a meaningful error message.
2007-10-02 16:45:01 +02:00
Andrew Christan
e5e6514ffa Xephyr: add "multiscreen" suport
* 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.
2007-10-02 13:49:17 +02:00
Dodji Seketeli
81692b628f Fix #12650: "windows not receiving mouse events in multiple screens context"
* dix/events.c, include/dix.h:
	  (UpdateSpriteForScreen): added this to update the mouse sprite context
	   when we switch from a pScreen to another.
	* mi/mipointer.c:
	  (miPointerWarpCursor): as we are switching to a new pScreen,
	   don't forget to update the mouse sprite context.
2007-10-02 13:48:48 +02:00
Dave Airlie
dc90d50008 exa: increase minor version number for pixmap allocation hooks 2007-10-02 14:05:07 +10:00
Kristian Høgsberg
f15af2ae60 exa: only setup offscreen allocator if driver doesn't provide CreatePixmap 2007-10-02 14:03:48 +10:00
Dave Airlie
ffb58f4fa8 exa: add hooks for drivers to take over pixmap allocation
This adds hooks for the driver to access Create/DestroyPixmap and ModifyPixmapHe
ader.

It allocates a 0 sized pixmap using fb and calls the driver routine to do
work of allocating the actual memory.

ModifyPixmapHeader is mainly required for hooking the screen pixmap which
isn't create by normal methods
2007-10-02 14:03:39 +10:00
Dave Airlie
31555af000 exa: add a pixmap private pointer for drivers to retrieve. 2007-10-02 13:57:55 +10:00
Alan Coopersmith
2d93e69690 Rework local client id finding code to be more uniform 2007-09-27 16:47:32 -07:00
Alan Coopersmith
c7ead3a68e xorgcfg needs $(DIX_CFLAGS) for pixman-1 include path 2007-09-27 16:47:32 -07:00
Alan Coopersmith
62a9fb4cda Fix PCI rework build on Solaris (copy what BSD does) 2007-09-27 16:47:32 -07:00
Tilman Sauerbeck
cfe549d1ba EXA: Added back the maxPitchPixels initialization code.
This doesn't add real value yet, but it will be useful once I add code
that splits large render operations into smaller parts if necessary.
2007-09-27 22:36:52 +02:00
Alan Hourihane
c11a27ef85 Add the FB_ACCESS_WRAPPER checks 2007-09-27 14:55:40 +01:00
Alan Hourihane
e0bb33b3d2 Fix bug #12286 2007-09-27 14:55:40 +01:00
Michel Dänzer
6d5c1e0d89 EXA: Remove bogus pitch checks.
exaCreatePixmap should handle all cases correctly.
2007-09-27 13:35:23 +02:00
Michel Dänzer
598698678b EXA: Punt for all fallbacks in exaFillRegion*.
Now that PaintWindow is gone, all callers already handle fallbacks.
2007-09-27 13:33:52 +02:00
Michel Dänzer
006f652505 EXA: Make sure tile offsets passed to drivers are never negative.
Thanks to Björn Steinbrink for pointing out the problem on IRC.
2007-09-27 13:30:58 +02:00
Michel Dänzer
da7d9aa1fb EXA: Tile offscreen pixmap coordinate offsets are always 0. 2007-09-27 13:30:48 +02:00
Michel Dänzer
d6f4764bf5 EXA: Remove some clearly bogus code from exaCopyNtoN.
Not sure what I was thinking when I wrote this... it would cause the box
coordinates to be off for exaCopyNtoNTwoDir or fallbacks.

Thanks to Tilman Sauerbeck for pointing out the problem on IRC and testing the
fix.
2007-09-27 13:29:07 +02:00
Michel Dänzer
c7d6d1f589 EXA: Punt on fallback case not handled correctly in exaFillRegionTiled.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=12520 .
2007-09-27 13:20:45 +02:00
Alan Coopersmith
1d938a80fd Remove unused pciAddrHostToBus functions from ix86Pci.c
Matches linuxPci.c changes made in 8279444a54
Fixes compiler errors:
 "ix86Pci.c", line 194: too many struct/union initializers
 "ix86Pci.c", line 204: too many struct/union initializers
 "ix86Pci.c", line 214: too many struct/union initializers
2007-09-26 19:42:46 -07:00
Eamon Walsh
3b114f2603 Input: Properly swap DevicePresenceNotify events. 2007-09-26 07:26:59 -04:00
Eamon Walsh
31a7994ac7 Input: Return errors to the dispatcher instead of sending them ourself.
Also fixed two "unused variable: stuff" warnings.
2007-09-26 07:26:59 -04:00
Tilman Sauerbeck
56ffc381d3 EXA: Removed duplicated exaGetDrawablePixmap() calls. 2007-09-26 16:52:27 +02:00
Dodji Seketeli
aa0325db7e Xephyr: fix compiler warnings
* hw/kdrive/ephyr/ephyr_draw.c:
	  (ephyrDownloadFromScreen),
	  (ephyrUploadToScreen): fix compiler warnings
2007-09-26 15:26:42 +02:00
Tilman Sauerbeck
ae8b4f7dcf EXA: Added pitch limitations.
Drivers can now specify the max pitches that the accelerator supports.
2007-09-25 16:43:06 +02:00
Eric Anholt
988f446fe0 [EDID] Ignore reserved bits in deciding monitor vs detailed timing descriptor.
Even though they're defined to zero by the spec, we've seen an EDID block
where the (empty) ASCII strings were stuffed in a byte early, leading to the
descriptor being considered a detailed timing instead.
2007-09-24 20:26:31 -07:00
Daniel Stone
27ad5d74c2 Input: Generate XKB mapping changes for all core-sending devices (bug #12523)
When we change the mapping on a core device, make sure we propagate this
through to XKB for all extended devices as well.
2007-09-23 17:17:20 +03:00
Daniel Stone
0e800ca465 GetKeyboardEvents: Reject out-of-range keycodes (bug #12528)
We can only deal with keycodes between 8 and 255, so make sure that we never
accept anything out of this range.
2007-09-23 12:43:31 +03:00
Alex Deucher
e1860f241b Document xf86_crtc_clip_video_helper better. 2007-09-22 17:54:51 -04:00