Skip to contentSkip to conversation

Failed to compile xserver-xorg-video-ati from git

PATCH In review Pali Rohár 4 participants 4 messages Sep 17, 2016 – Sep 20, 2016 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi! Compilation of xserver-xorg-video-ati from git show these problems:

../../src/radeon_kms.c: In function 'radeon_sync_scanout_pixmaps':
../../src/radeon_kms.c:481:2: warning: implicit declaration of function 'RegionDuplicate' [-Wimplicit- function-declaration]
../../src/radeon_kms.c:481:14: warning: assignment makes pointer from integer without a cast [enabled by default]
Function `RegionDuplicate' implicitly converted to pointer at ../../src/radeon_kms.c:481 ../../src/radeon_kms.c: At top level:
../../src/radeon_kms.c:406:1: warning: 'transform_region' defined but not used [-Wunused-function]

Due to error 'Function `RegionDuplicate' implicitly converted to pointer' gcc refuse to accept it...

Signature · 2 lines
Pali Rohár
[email protected]

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

PATCH 1/1 Use local implementation of RegionDuplicate for older xserver

From: Michel Dänzer <[email protected]>

It was only added in xserver 1.15. Fixes build against older xserver.

---
 configure.ac |  6 ++++++
 src/radeon.h | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+)
configure.ac +6 -0
index 394f45a..8dc55d8 100644
@@ -137,6 +137,12 @@ else
 fi
 AM_CONDITIONAL(GLAMOR, test x$GLAMOR != xno)
 
+AC_CHECK_DECL(RegionDuplicate,
+	      [AC_DEFINE(HAVE_REGIONDUPLICATE, 1,
+	      [Have RegionDuplicate API])], [],
+	      [#include <xorg-server.h>
+	       #include <regionstr.h>])
+
 AC_CHECK_DECL(fbGlyphs,
 	      [AC_DEFINE(HAVE_FBGLYPHS, 1, [Have fbGlyphs API])], [],
 	      [#include <X11/Xmd.h>
src/radeon.h +19 -0
index f3a3e1c..590966f 100644
@@ -96,6 +96,25 @@
 
 struct _SyncFence;
 
+#ifndef HAVE_REGIONDUPLICATE
+
+static inline RegionPtr
+RegionDuplicate(RegionPtr pOld)
+{
+    RegionPtr pNew;
+
+    pNew = RegionCreate(&pOld->extents, 0);
+    if (!pNew)
+	return NULL;
+    if (!RegionCopy(pNew, pOld)) {
+	RegionDestroy(pNew);
+	return NULL;
+    }
+    return pNew;
+}
+
+#endif
+
 #ifndef MAX
 #define MAX(a,b) ((a)>(b)?(a):(b))
 #endif
Signature · 6 lines
2.9.3

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#4 lore raw

PATCH 1/1 Use local implementation of RegionDuplicate for older xserver

In reply to Pali Rohár

From: Michel Dänzer <[email protected]>

It was only added in xserver 1.15. Fixes build against older xserver.

---
 configure.ac |  6 ++++++
 src/radeon.h | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+)
configure.ac +6 -0
index 394f45a..8dc55d8 100644
@@ -137,6 +137,12 @@ else
 fi
 AM_CONDITIONAL(GLAMOR, test x$GLAMOR != xno)
 
+AC_CHECK_DECL(RegionDuplicate,
+	      [AC_DEFINE(HAVE_REGIONDUPLICATE, 1,
+	      [Have RegionDuplicate API])], [],
+	      [#include <xorg-server.h>
+	       #include <regionstr.h>])
+
 AC_CHECK_DECL(fbGlyphs,
 	      [AC_DEFINE(HAVE_FBGLYPHS, 1, [Have fbGlyphs API])], [],
 	      [#include <X11/Xmd.h>
src/radeon.h +19 -0
index f3a3e1c..590966f 100644
@@ -96,6 +96,25 @@
 
 struct _SyncFence;
 
+#ifndef HAVE_REGIONDUPLICATE
+
+static inline RegionPtr
+RegionDuplicate(RegionPtr pOld)
+{
+    RegionPtr pNew;
+
+    pNew = RegionCreate(&pOld->extents, 0);
+    if (!pNew)
+	return NULL;
+    if (!RegionCopy(pNew, pOld)) {
+	RegionDestroy(pNew);
+	return NULL;
+    }
+    return pNew;
+}
+
+#endif
+
 #ifndef MAX
 #define MAX(a,b) ((a)>(b)?(a):(b))
 #endif
Signature · 6 lines
2.9.3

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by Alex Deucher
#3 lore raw

RE: [PATCH xf86-video-ati] Use local implementation of RegionDuplicate for older xserver

In reply to a message not in the archive
Quoted 9 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Tuesday, September 20, 2016 5:04 AM
To: [email protected]
Cc: Pali Rohár
Subject: [PATCH xf86-video-ati] Use local implementation of RegionDuplicate for older xserver

Quoted 6 lines

From: Michel Dänzer <[email protected]>

It was only added in xserver 1.15. Fixes build against older xserver.

Quoted 55 lines
---
 configure.ac |  6 ++++++
 src/radeon.h | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+)
configure.ac +6 -0
index 394f45a..8dc55d8 100644
@@ -137,6 +137,12 @@ else
 fi
 AM_CONDITIONAL(GLAMOR, test x$GLAMOR != xno)
 
+AC_CHECK_DECL(RegionDuplicate,
+	      [AC_DEFINE(HAVE_REGIONDUPLICATE, 1,
+	      [Have RegionDuplicate API])], [],
+	      [#include <xorg-server.h>
+	       #include <regionstr.h>])
+
 AC_CHECK_DECL(fbGlyphs,
 	      [AC_DEFINE(HAVE_FBGLYPHS, 1, [Have fbGlyphs API])], [],
 	      [#include <X11/Xmd.h>
src/radeon.h +19 -1
index f3a3e1c..590966f 100644
@@ -96,6 +96,25 @@
 
 struct _SyncFence;
 
+#ifndef HAVE_REGIONDUPLICATE
+
+static inline RegionPtr
+RegionDuplicate(RegionPtr pOld)
+{
+    RegionPtr pNew;
+
+    pNew = RegionCreate(&pOld->extents, 0);
+    if (!pNew)
+	return NULL;
+    if (!RegionCopy(pNew, pOld)) {
+	RegionDestroy(pNew);
+	return NULL;
+    }
+    return pNew;
+}
+
+#endif
+
 #ifndef MAX
 #define MAX(a,b) ((a)>(b)?(a):(b))
 #endif
--

2.9.3

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx