summaryrefslogtreecommitdiff
path: root/package/libdrm/patches
diff options
context:
space:
mode:
Diffstat (limited to 'package/libdrm/patches')
-rw-r--r--package/libdrm/patches/patch-include_drm_drm_sarea_h12
-rw-r--r--package/libdrm/patches/patch-xf86drm_h42
2 files changed, 54 insertions, 0 deletions
diff --git a/package/libdrm/patches/patch-include_drm_drm_sarea_h b/package/libdrm/patches/patch-include_drm_drm_sarea_h
new file mode 100644
index 000000000..d7d557dcf
--- /dev/null
+++ b/package/libdrm/patches/patch-include_drm_drm_sarea_h
@@ -0,0 +1,12 @@
+ Fix for lemote.
+--- libdrm-2.4.20.orig/include/drm/drm_sarea.h 2010-03-06 00:21:13.000000000 +0100
++++ libdrm-2.4.20/include/drm/drm_sarea.h 2010-06-12 20:44:24.812809619 +0200
+@@ -37,6 +37,8 @@
+ /* SAREA area needs to be at least a page */
+ #if defined(__alpha__)
+ #define SAREA_MAX 0x2000U
++#elif defined(__mips__)
++#define SAREA_MAX 0x4000U
+ #elif defined(__ia64__)
+ #define SAREA_MAX 0x10000U /* 64kB */
+ #else
diff --git a/package/libdrm/patches/patch-xf86drm_h b/package/libdrm/patches/patch-xf86drm_h
new file mode 100644
index 000000000..aa3f49cca
--- /dev/null
+++ b/package/libdrm/patches/patch-xf86drm_h
@@ -0,0 +1,42 @@
+ Fix for lemote.
+--- libdrm-2.4.20.orig/xf86drm.h 2010-03-06 00:21:13.000000000 +0100
++++ libdrm-2.4.20/xf86drm.h 2010-06-12 20:43:01.324916826 +0200
+@@ -374,6 +374,29 @@ typedef struct _drmSetVersion {
+ : "memory"); \
+ } while (0)
+
++#elif defined(__mips__)
++
++#define DRM_CAS(lock, old, new, ret) \
++ do { \
++ __asm__ __volatile__( \
++ " .set mips3;.set noreorder;\n" \
++ " sync; \n" \
++ " ll %1, %0;\n" \
++ " bne %1, %2, 1f;\n" \
++ " li %1, 1; \n" \
++ " move %1, %3; \n" \
++ " sc %1, %0;\n" \
++ " xori %1, %1, 1\n" \
++ "1: \n" \
++ " .set mips0; .set reorder;\n" \
++ : "=m" (__drm_dummy_lock(lock)),\
++ "=&r" (ret) \
++ : "r" (old), \
++ "r" (new) \
++ : "memory","$8" \
++ ); \
++ } while(0)
++
+ #elif defined(__sparc__)
+
+ #define DRM_CAS(lock,old,new,__ret) \
+@@ -457,7 +480,7 @@ do { register unsigned int __old __asm("
+
+ #if defined(__alpha__)
+ #define DRM_CAS_RESULT(_result) long _result
+-#elif defined(__powerpc__)
++#elif defined(__powerpc__) || defined(__mips__)
+ #define DRM_CAS_RESULT(_result) int _result
+ #else
+ #define DRM_CAS_RESULT(_result) char _result