The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / libdrm / 0001-update-arm.patch
1 [Adapted from yocto project]
2
3 Add ARM support into xf86drm.h.  This provides support for Xorg interface.
4 Without this the vivante samples will hang during close requiring a reboot
5
6 Upstream-Status: Pending
7
8 Signed-off-by: Lauren Post <lauren.post@freescale.com>
9 Signed-off-by: Evan Kotara <evan.kotara@freescale.com>
10
11 diff --git a/xf86drm.h b/xf86drm.h
12 --- a/xf86drm.h
13 +++ b/xf86drm.h
14 @@ -461,6 +461,23 @@ do {       register unsigned int __old __asm("
15                 : "cr0", "memory");                     \
16         } while (0)
17  
18 +#elif defined(__arm__)
19 +       #undef DRM_DEV_MODE
20 +       #define DRM_DEV_MODE     (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
21 +
22 +       #define DRM_CAS(lock,old,new,__ret)             \
23 +       do {                                            \
24 +               __asm__ __volatile__ (                  \
25 +                       "1: ldrex %0, [%1]\n"           \
26 +                       "   teq %0, %2\n"               \
27 +                       "   ite eq\n"                   \
28 +                       "   strexeq %0, %3, [%1]\n"     \
29 +                       "   movne   %0, #1\n"           \
30 +               : "=&r" (__ret)                         \
31 +               : "r" (lock), "r" (old), "r" (new)      \
32 +               : "cc","memory");                       \
33 +       } while (0)
34 +
35  #endif /* architecture */
36  #endif /* __GNUC__ >= 2 */
37