Patch which bumps required xserver version to 1.6.2

2009/8/29 Michel Dänzer <[email protected]>

> On Fri, 2009-08-28 at 20:51 +0300, Pauli Nieminen wrote:
> >
> > 2009/8/28 Michel Dänzer <[email protected]>
> >         On Fri, 2009-08-28 at 17:06 +0300, Pauli Nieminen wrote:
> >         > ---
> >         >  src/radeon_dri2.c |   22 ++++++++++++++--------
> >         >  1 files changed, 14 insertions(+), 8 deletions(-)
> >         >
> >         > diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
> >         > index 613fde8..051cc78 100644
> >         > --- a/src/radeon_dri2.c
> >         > +++ b/src/radeon_dri2.c
> >         > @@ -46,6 +46,12 @@
> >         >  #define USE_DRI2_1_1_0
> >         >  #endif
> >         >
> >         > +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,6,99,0,
> >         0)
> >         > +typedef DRI2BufferPtr BufferPtr;
> >         > +#else
> >         > +typedef DRI2Buffer2Ptr BufferPtr;
> >         > +#endif
> >
> >
> >         Will this work with xserver 1.6.1 and older? Not sure it
> >         matters, just
> >         so we're clear.
> >
> > I don't know. Is there simple workaround? If not we should only
> > support 1.6.2 and above in ddx master. If we decide not to support
> > older xserver in master then I can look atadding configure check for
> > xserver version.
>
> Only supporting DRI2 as of xserver 1.6.2 sounds good to me.
>
>
> --
> Earthling Michel Dänzer           |                http://www.vmware.com
> Libre software enthusiast         |          Debian, X and DRI developer
>
From 4e3c21696ab59d63e064c45dec103c73c7428a17 Mon Sep 17 00:00:00 2001
From: Pauli Nieminen <[email protected]>
Date: Fri, 28 Aug 2009 17:05:44 +0300
Subject: [PATCH 2/2] radeon: Fix DRI2BufferPtr to be DRI2Buffer2Ptr for xserver 1.6.

Bump requirement for xserver in KMS mode to 1.6.2 for DRI2Buffer2Ptr.
---
 configure.ac      |    2 +-
 src/radeon_dri2.c |   22 ++++++++++++++--------
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 48375ee..66f76aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,7 +140,7 @@ if test "$DRI" = yes; then
 	   	AC_CHECK_HEADER(xf86drmMode.h,[DRM_MODE=yes],[DRM_MODE=no],[#include <stdint.h>
 #include <stdlib.h>])
 		if test "x$DRM_MODE" = xyes; then
-		   	PKG_CHECK_MODULES(LIBDRM_RADEON, [xorg-server >= 1.6 libdrm_radeon],
+			PKG_CHECK_MODULES(LIBDRM_RADEON, [xorg-server >= 1.6.2 libdrm_radeon],
 			[LIBDRM_RADEON=yes], [LIBDRM_RADEON=no])
 
 			if test "x$LIBDRM_RADEON" = xyes; then
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 613fde8..051cc78 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -46,6 +46,12 @@
 #define USE_DRI2_1_1_0
 #endif
 
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,6,99,0, 0)
+typedef DRI2BufferPtr BufferPtr;
+#else
+typedef DRI2Buffer2Ptr BufferPtr;
+#endif
+
 struct dri2_buffer_priv {
     PixmapPtr   pixmap;
     unsigned int attachment;
@@ -53,13 +59,13 @@ struct dri2_buffer_priv {
 
 
 #ifndef USE_DRI2_1_1_0
-static DRI2BufferPtr
+static BufferPtr
 radeon_dri2_create_buffers(DrawablePtr drawable,
                            unsigned int *attachments,
                            int count)
 {
     ScreenPtr pScreen = drawable->pScreen;
-    DRI2BufferPtr buffers;
+    BufferPtr buffers;
     struct dri2_buffer_priv *privates;
     PixmapPtr pixmap, depth_pixmap;
     struct radeon_exa_pixmap_priv *driver_priv;
@@ -131,13 +137,13 @@ radeon_dri2_create_buffers(DrawablePtr drawable,
     return buffers;
 }
 #else
-static DRI2BufferPtr
+static BufferPtr
 radeon_dri2_create_buffer(DrawablePtr drawable,
                           unsigned int attachment,
                           unsigned int format)
 {
     ScreenPtr pScreen = drawable->pScreen;
-    DRI2BufferPtr buffers;
+    BufferPtr buffers;
     struct dri2_buffer_priv *privates;
     PixmapPtr pixmap, depth_pixmap;
     struct radeon_exa_pixmap_priv *driver_priv;
@@ -214,7 +220,7 @@ radeon_dri2_create_buffer(DrawablePtr drawable,
 #ifndef USE_DRI2_1_1_0
 static void
 radeon_dri2_destroy_buffers(DrawablePtr drawable,
-                            DRI2BufferPtr buffers,
+                            BufferPtr buffers,
                             int count)
 {
     ScreenPtr pScreen = drawable->pScreen;
@@ -232,7 +238,7 @@ radeon_dri2_destroy_buffers(DrawablePtr drawable,
 }
 #else
 static void
-radeon_dri2_destroy_buffer(DrawablePtr drawable, DRI2BufferPtr buffers)
+radeon_dri2_destroy_buffer(DrawablePtr drawable, BufferPtr buffers)
 {
     if(buffers)
     {
@@ -251,8 +257,8 @@ radeon_dri2_destroy_buffer(DrawablePtr drawable, DRI2BufferPtr buffers)
 static void
 radeon_dri2_copy_region(DrawablePtr drawable,
                         RegionPtr region,
-                        DRI2BufferPtr dest_buffer,
-                        DRI2BufferPtr src_buffer)
+                        BufferPtr dest_buffer,
+                        BufferPtr src_buffer)
 {
     struct dri2_buffer_priv *src_private = src_buffer->driverPrivate;
     struct dri2_buffer_priv *dst_private = dest_buffer->driverPrivate;
-- 
1.6.3.3

_______________________________________________
xorg-driver-ati mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-driver-ati

Reply via email to