summaryrefslogtreecommitdiffstats
path: root/bsp/meta-freescale/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch
diff options
context:
space:
mode:
authorToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
committerToshikazuOhiwa <toshikazu_ohiwa@mail.toyota.co.jp>2020-03-30 09:24:26 +0900
commit5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch)
treeb4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /bsp/meta-freescale/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch
parent706ad73eb02caf8532deaf5d38995bd258725cb8 (diff)
agl-basesystem
Diffstat (limited to 'bsp/meta-freescale/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch')
-rw-r--r--bsp/meta-freescale/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/bsp/meta-freescale/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch b/bsp/meta-freescale/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch
new file mode 100644
index 00000000..1160cd10
--- /dev/null
+++ b/bsp/meta-freescale/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch
@@ -0,0 +1,35 @@
+Add ARM support into xf86arm.h. This provides support for Xorg interface.
+Without this the vivante samples will hang during close requiring a reboot
+
+Upstream-Status: Pending
+
+Signed-off-by: Lauren Post <lauren.post@freescale.com>
+Signed-off-by: Evan Kotara <evan.kotara@freescale.com>
+
+diff --git a/xf86drm.h b/xf86drm.h
+--- a/xf86drm.h
++++ b/xf86drm.h
+@@ -461,6 +461,23 @@ do { register unsigned int __old __asm("
+ : "cr0", "memory"); \
+ } while (0)
+
++#elif defined(__arm__)
++ #undef DRM_DEV_MODE
++ #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
++
++ #define DRM_CAS(lock,old,new,__ret) \
++ do { \
++ __asm__ __volatile__ ( \
++ "1: ldrex %0, [%1]\n" \
++ " teq %0, %2\n" \
++ " ite eq\n" \
++ " strexeq %0, %3, [%1]\n" \
++ " movne %0, #1\n" \
++ : "=&r" (__ret) \
++ : "r" (lock), "r" (old), "r" (new) \
++ : "cc","memory"); \
++ } while (0)
++
+ #endif /* architecture */
+ #endif /* __GNUC__ >= 2 */
+