* Failed to compile xserver-xorg-video-ati from git
@ 2016-09-17 15:50 Pali Rohár
2016-09-20 9:04 ` [PATCH xf86-video-ati] Use local implementation of RegionDuplicate for older xserver Michel Dänzer
2016-09-20 9:04 ` Michel Dänzer
0 siblings, 2 replies; 4+ messages in thread
From: Pali Rohár @ 2016-09-17 15:50 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 762 bytes --]
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...
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH xf86-video-ati] Use local implementation of RegionDuplicate for older xserver
2016-09-17 15:50 Failed to compile xserver-xorg-video-ati from git Pali Rohár
2016-09-20 9:04 ` [PATCH xf86-video-ati] Use local implementation of RegionDuplicate for older xserver Michel Dänzer
@ 2016-09-20 9:04 ` Michel Dänzer
1 sibling, 0 replies; 4+ messages in thread
From: Michel Dänzer @ 2016-09-20 9:04 UTC (permalink / raw)
To: amd-gfx; +Cc: Pali Rohár
From: Michel Dänzer <michel.daenzer@amd.com>
It was only added in xserver 1.15. Fixes build against older xserver.
Reported-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
configure.ac | 6 ++++++
src/radeon.h | 19 +++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/configure.ac b/configure.ac
index 394f45a..8dc55d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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>
diff --git a/src/radeon.h b/src/radeon.h
index f3a3e1c..590966f 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH xf86-video-ati] Use local implementation of RegionDuplicate for older xserver
2016-09-17 15:50 Failed to compile xserver-xorg-video-ati from git Pali Rohár
@ 2016-09-20 9:04 ` Michel Dänzer
[not found] ` <20160920090426.11597-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-09-20 9:04 ` Michel Dänzer
1 sibling, 1 reply; 4+ messages in thread
From: Michel Dänzer @ 2016-09-20 9:04 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Pali Rohár
From: Michel Dänzer <michel.daenzer@amd.com>
It was only added in xserver 1.15. Fixes build against older xserver.
Reported-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
configure.ac | 6 ++++++
src/radeon.h | 19 +++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/configure.ac b/configure.ac
index 394f45a..8dc55d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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>
diff --git a/src/radeon.h b/src/radeon.h
index f3a3e1c..590966f 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH xf86-video-ati] Use local implementation of RegionDuplicate for older xserver
[not found] ` <20160920090426.11597-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2016-09-20 16:11 ` Deucher, Alexander
0 siblings, 0 replies; 4+ messages in thread
From: Deucher, Alexander @ 2016-09-20 16:11 UTC (permalink / raw)
To: 'Michel Dänzer', amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Pali Rohár
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Tuesday, September 20, 2016 5:04 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Pali Rohár
> Subject: [PATCH xf86-video-ati] Use local implementation of RegionDuplicate
> for older xserver
>
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> It was only added in xserver 1.15. Fixes build against older xserver.
>
> Reported-by: Pali Rohár <pali.rohar@gmail.com>
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> configure.ac | 6 ++++++
> src/radeon.h | 19 +++++++++++++++++++
> 2 files changed, 25 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 394f45a..8dc55d8 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -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>
> diff --git a/src/radeon.h b/src/radeon.h
> index f3a3e1c..590966f 100644
> --- a/src/radeon.h
> +++ b/src/radeon.h
> @@ -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
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-20 16:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-17 15:50 Failed to compile xserver-xorg-video-ati from git Pali Rohár
2016-09-20 9:04 ` [PATCH xf86-video-ati] Use local implementation of RegionDuplicate for older xserver Michel Dänzer
[not found] ` <20160920090426.11597-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-09-20 16:11 ` Deucher, Alexander
2016-09-20 9:04 ` Michel Dänzer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.