Update to xextproto 7.1 support.

DPMS header was split into dpms.h (client) and dpmsconst.h (server). Drivers
need to include dpmsconst.h if xextproto 7.1 is available.

SHM is now shm.h instead of shmstr. Requires definition of ShmFuncs that's
not exported by the server.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-07-16 11:40:15 +10:00
parent 57c7cbade9
commit 0a4c4c5fe8
7 changed files with 59 additions and 1 deletions

View File

@ -101,6 +101,10 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Checks for pkg-config packages
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6 xproto fontsproto $REQUIRED_MODULES])
PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
HAVE_XEXTPROTO_71="no")
AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
drm_cflags=$(pkg-config --cflags libdrm)

View File

@ -39,8 +39,13 @@
#include "miscstruct.h"
#include "xf86i2c.h"
#include "xf86Crtc.h"
#ifdef HAVE_XEXTPROTO_71
#include <X11/extensions/dpmsconst.h>
#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
#endif
#include "../i2c_vid.h"
#include "ch7017_reg.h"

View File

@ -39,8 +39,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "miscstruct.h"
#include "xf86i2c.h"
#include "xf86Crtc.h"
#ifdef HAVE_XEXTPROTO_71
#include <X11/extensions/dpmsconst.h>
#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
#endif
#include "../i2c_vid.h"
#include "ch7xxx.h"

View File

@ -36,8 +36,13 @@
#include "miscstruct.h"
#include "xf86i2c.h"
#include "xf86Crtc.h"
#ifdef HAVE_XEXTPROTO_71
#include <X11/extensions/dpmsconst.h>
#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
#endif
#include <unistd.h>
#include "../i2c_vid.h"

View File

@ -40,8 +40,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "miscstruct.h"
#include "xf86i2c.h"
#include "xf86Crtc.h"
#ifdef HAVE_XEXTPROTO_71
#include <X11/extensions/dpmsconst.h>
#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
#endif
#include "../i2c_vid.h"
#include "sil164.h"

View File

@ -39,8 +39,13 @@
#include "miscstruct.h"
#include "xf86i2c.h"
#include "xf86Crtc.h"
#ifdef HAVE_XEXTPROTO_71
#include <X11/extensions/dpmsconst.h>
#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
#endif
#include "../i2c_vid.h"
#include "tfp410.h"

View File

@ -42,9 +42,13 @@
#define NEED_EVENTS
#include <X11/Xproto.h>
#ifdef MITSHM
#ifdef HAVE_XEXTPROTO_71
#include <X11/extensions/shm.h>
#else
#define _XSHM_SERVER_
#include <X11/extensions/shmstr.h>
#endif
#endif
#include "scrnintstr.h"
#include "pixmapstr.h"
#include "windowstr.h"
@ -321,9 +325,34 @@ uxa_get_image (DrawablePtr pDrawable, int x, int y, int w, int h,
extern const GCOps uxa_ops;
#ifdef MITSHM
/* XXX these come from shmint.h, which isn't exported by the server */
#ifdef HAVE_XEXTPROTO_71
/* Up to xextproto 7.1, these were provided in shmstr.h */
typedef struct _ShmFuncs {
PixmapPtr (* CreatePixmap)(ScreenPtr pScreen,
int width,
int height,
int depth,
char *addr);
void (* PutImage)(DrawablePtr dst,
GCPtr pGC,
int depth,
unsigned int format,
int w,
int h,
int sx,
int sy,
int sw,
int sh,
int dx,
int dy,
char *data);
} ShmFuncs, *ShmFuncsPtr;
#endif
extern ShmFuncs uxa_shm_funcs;
/* XXX these come from shmint.h, which isn't exported by the server */
void
ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);