diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2013-07-16 17:32:15 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2013-08-31 17:54:42 -0300 |
commit | a38622c4d93f54019f20dbdcfd97bb5b00a50910 (patch) | |
tree | 39e568000b322b0a8a17f77b7de90550a2eaa352 /recipes-graphics | |
parent | 13c91f33e30ab1c0d2a20e414753008bbdabca95 (diff) | |
download | meta-fsl-arm-a38622c4d93f54019f20dbdcfd97bb5b00a50910.tar.gz |
libdrm: Add fix to avoid GPU freeze
Add ARM support into xf86drm.h. This provides support for Xorg
interface. Without this the vivante samples will hang during close
requiring a reboot
Change-Id: I60ea3c87c35fadaa00c64baffd24f74f41dfbb9b
Signed-off-by: Lauren Post <lauren.post@freescale.com>
Signed-off-by: Evan Kotara <evan.kotara@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-graphics')
-rw-r--r-- | recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch | 34 | ||||
-rw-r--r-- | recipes-graphics/drm/libdrm_2.4.46.bbappend | 5 |
2 files changed, 39 insertions, 0 deletions
diff --git a/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch b/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch new file mode 100644 index 0000000..4389fe4 --- /dev/null +++ b/recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | Add ARM support into xf86arm.h. This provides support for Xorg interface. | ||
2 | Without this the vivante samples will hang during close requiring a reboot | ||
3 | |||
4 | Upstream-Status: Pending | ||
5 | |||
6 | Signed-off-by: Lauren Post <lauren.post@freescale.com> | ||
7 | Signed-off-by: Evan Kotara <evan.kotara@freescale.com> | ||
8 | |||
9 | diff --git a/xf86drm.h b/xf86drm.h | ||
10 | --- a/xf86drm.h | ||
11 | +++ b/xf86drm.h | ||
12 | @@ -455,6 +455,22 @@ do { register unsigned int __old __asm("o0"); \ | ||
13 | : "cr0", "memory"); \ | ||
14 | } while (0) | ||
15 | |||
16 | +#elif defined(__arm__) | ||
17 | + #undef DRM_DEV_MODE | ||
18 | + #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) | ||
19 | + | ||
20 | + #define DRM_CAS(lock,old,new,__ret) \ | ||
21 | + do { \ | ||
22 | + __asm__ __volatile__ ( \ | ||
23 | + "1: ldrex %0, [%1]\n" \ | ||
24 | + " teq %0, %2\n" \ | ||
25 | + " strexeq %0, %3, [%1]\n" \ | ||
26 | + " movne %0, #1\n" \ | ||
27 | + : "=&r" (__ret) \ | ||
28 | + : "r" (lock), "r" (old), "r" (new) \ | ||
29 | + : "cc","memory"); \ | ||
30 | + } while (0) | ||
31 | + | ||
32 | #endif /* architecture */ | ||
33 | #endif /* __GNUC__ >= 2 */ | ||
34 | |||
diff --git a/recipes-graphics/drm/libdrm_2.4.46.bbappend b/recipes-graphics/drm/libdrm_2.4.46.bbappend new file mode 100644 index 0000000..8c8ea6b --- /dev/null +++ b/recipes-graphics/drm/libdrm_2.4.46.bbappend | |||
@@ -0,0 +1,5 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | SRC_URI_append_mx6 = "file://drm-update-arm.patch" | ||
4 | |||
5 | PACKAGE_ARCH_mx6 = "${MACHINE_ARCH}" | ||