aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierluigi Passaro <pierluigi.p@variscite.com>2018-08-08 09:41:28 +0200
committerOtavio Salvador <otavio@ossystems.com.br>2018-08-30 22:05:26 -0300
commitf60fce7191e20690e923627085797572c6dcf2d3 (patch)
treef735c86316d2aa352b236dde72dc35b7ca014144
parent1771ffdaec3c2ff8602d7896690abd9f0ac250da (diff)
downloadmeta-freescale-f60fce7191e20690e923627085797572c6dcf2d3.tar.gz
meta-freescale-f60fce7191e20690e923627085797572c6dcf2d3.tar.bz2
meta-freescale-f60fce7191e20690e923627085797572c6dcf2d3.zip
Revert "libdrm: Remove unused patches"
This reverts commit dca6c66e5710938a3ea035b09b86ca3d1a6915c6. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> (cherry picked from commit 063154a7783aeafd299739c450e9fef754ead7a8)
-rw-r--r--recipes-graphics/drm/libdrm/mx6/drm-update-arm.patch35
-rw-r--r--recipes-graphics/drm/libdrm/mx7/drm-update-arm.patch35
-rw-r--r--recipes-graphics/drm/libdrm_%.bbappend5
3 files changed, 75 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 00000000..1160cd10
--- /dev/null
+++ b/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 */
+
diff --git a/recipes-graphics/drm/libdrm/mx7/drm-update-arm.patch b/recipes-graphics/drm/libdrm/mx7/drm-update-arm.patch
new file mode 100644
index 00000000..1160cd10
--- /dev/null
+++ b/recipes-graphics/drm/libdrm/mx7/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 */
+
diff --git a/recipes-graphics/drm/libdrm_%.bbappend b/recipes-graphics/drm/libdrm_%.bbappend
new file mode 100644
index 00000000..97b6df92
--- /dev/null
+++ b/recipes-graphics/drm/libdrm_%.bbappend
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_append_imxgpu2d = " file://drm-update-arm.patch"
+
+PACKAGE_ARCH_imxgpu2d = "${MACHINE_SOCARCH}"