diff options
author | Andreas Müller <schnitzeltony@googlemail.com> | 2012-08-23 18:22:52 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2012-08-30 10:42:11 +0200 |
commit | 624dcdc1fd83643323ecf0b426bd2ad5032f13ac (patch) | |
tree | 7e3924fae1b3f8c15d99ff93438384e21a08d699 /meta-oe | |
parent | cc5eda871fcb68fcd36d578b3fe4b52df2dac568 (diff) | |
download | meta-openembedded-624dcdc1fd83643323ecf0b426bd2ad5032f13ac.tar.gz |
pixman: fix qemu workaround
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-graphics/xorg-lib/pixman-0.27.2/0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch | 63 | ||||
-rw-r--r-- | meta-oe/recipes-graphics/xorg-lib/pixman_0.27.2.bbappend | 2 |
2 files changed, 33 insertions, 32 deletions
diff --git a/meta-oe/recipes-graphics/xorg-lib/pixman-0.27.2/0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch b/meta-oe/recipes-graphics/xorg-lib/pixman-0.27.2/0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch index 8a1c524a83..4569dca01e 100644 --- a/meta-oe/recipes-graphics/xorg-lib/pixman-0.27.2/0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch +++ b/meta-oe/recipes-graphics/xorg-lib/pixman-0.27.2/0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch | |||
@@ -1,25 +1,27 @@ | |||
1 | From d140e69c1d76ed61d1feb53b79820951707ee5a6 Mon Sep 17 00:00:00 2001 | 1 | From a0f53e1dbb3851bb0f0efcfdbd565b05e4be9cac Mon Sep 17 00:00:00 2001 |
2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> | 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> |
3 | Date: Sun, 19 Aug 2012 15:15:45 +0200 | 3 | Date: Thu, 23 Aug 2012 18:10:57 +0200 |
4 | Subject: [PATCH 1/2] ARM: qemu related workarounds in cpu features detection | 4 | Subject: [PATCH 1/2] ARM: qemu related workarounds in cpu features detection |
5 | code | 5 | code |
6 | MIME-Version: 1.0 | 6 | MIME-Version: 1.0 |
7 | Content-Type: text/plain; charset=UTF-8 | 7 | Content-Type: text/plain; charset=UTF-8 |
8 | Content-Transfer-Encoding: 8bit | 8 | Content-Transfer-Encoding: 8bit |
9 | 9 | ||
10 | This was ported from meta-oe's patch [1] | 10 | This was ported from meta-oe's patch [1]. The original pixman patch is found |
11 | at [2]. | ||
11 | 12 | ||
12 | [1] http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-graphics/xorg-lib/pixman-0.26.2/0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch | 13 | [1] http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-graphics/xorg-lib/pixman-0.26.2/0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch |
14 | [2] http://lists.freedesktop.org/archives/pixman/2011-January/000906.html | ||
13 | 15 | ||
14 | Upstream-Status: Inappropriate [other] qemu fix | 16 | Upstream-Status: Inappropriate [other] qemu fix |
15 | 17 | ||
16 | Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> | 18 | Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> |
17 | --- | 19 | --- |
18 | pixman/pixman-arm.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++--- | 20 | pixman/pixman-arm.c | 82 ++++++++++++++++++++++++++++++++++++++++---------- |
19 | 1 files changed, 69 insertions(+), 5 deletions(-) | 21 | 1 files changed, 65 insertions(+), 17 deletions(-) |
20 | 22 | ||
21 | diff --git a/pixman/pixman-arm.c b/pixman/pixman-arm.c | 23 | diff --git a/pixman/pixman-arm.c b/pixman/pixman-arm.c |
22 | index 23374e4..d0771fd 100644 | 24 | index 23374e4..d98bda6 100644 |
23 | --- a/pixman/pixman-arm.c | 25 | --- a/pixman/pixman-arm.c |
24 | +++ b/pixman/pixman-arm.c | 26 | +++ b/pixman/pixman-arm.c |
25 | @@ -129,16 +129,35 @@ detect_cpu_features (void) | 27 | @@ -129,16 +129,35 @@ detect_cpu_features (void) |
@@ -58,40 +60,34 @@ index 23374e4..d0771fd 100644 | |||
58 | 60 | ||
59 | fd = open ("/proc/self/auxv", O_RDONLY); | 61 | fd = open ("/proc/self/auxv", O_RDONLY); |
60 | if (fd >= 0) | 62 | if (fd >= 0) |
61 | @@ -147,22 +166,23 @@ detect_cpu_features (void) | 63 | @@ -147,32 +166,61 @@ detect_cpu_features (void) |
62 | { | 64 | { |
63 | if (aux.a_type == AT_HWCAP) | 65 | if (aux.a_type == AT_HWCAP) |
64 | { | 66 | { |
65 | - uint32_t hwcap = aux.a_un.a_val; | 67 | - uint32_t hwcap = aux.a_un.a_val; |
66 | + hwcap = aux.a_un.a_val; | 68 | - |
67 | 69 | - /* hardcode these values to avoid depending on specific | |
68 | /* hardcode these values to avoid depending on specific | 70 | - * versions of the hwcap header, e.g. HWCAP_NEON |
69 | * versions of the hwcap header, e.g. HWCAP_NEON | 71 | - */ |
70 | */ | ||
71 | - if ((hwcap & 64) != 0) | 72 | - if ((hwcap & 64) != 0) |
72 | + if ((hwcap & ARM_HWCAP_VFP) != 0) | 73 | - features |= ARM_VFP; |
73 | features |= ARM_VFP; | ||
74 | - if ((hwcap & 512) != 0) | 74 | - if ((hwcap & 512) != 0) |
75 | + if ((hwcap & ARM_HWCAP_IWMMXT) != 0) | 75 | - features |= ARM_IWMMXT; |
76 | features |= ARM_IWMMXT; | 76 | - /* this flag is only present on kernel 2.6.29 */ |
77 | /* this flag is only present on kernel 2.6.29 */ | ||
78 | - if ((hwcap & 4096) != 0) | 77 | - if ((hwcap & 4096) != 0) |
79 | + if ((hwcap & ARM_HWCAP_NEON) != 0) | 78 | - features |= ARM_NEON; |
80 | features |= ARM_NEON; | 79 | + hwcap = aux.a_un.a_val; |
81 | } | 80 | } |
82 | else if (aux.a_type == AT_PLATFORM) | 81 | else if (aux.a_type == AT_PLATFORM) |
83 | { | 82 | { |
84 | - const char *plat = (const char*) aux.a_un.a_val; | 83 | - const char *plat = (const char*) aux.a_un.a_val; |
84 | - | ||
85 | - if (strncmp (plat, "v7l", 3) == 0) | ||
85 | + plat = (const char*) aux.a_un.a_val; | 86 | + plat = (const char*) aux.a_un.a_val; |
86 | + plat_cnt++; | 87 | + plat_cnt++; |
87 | 88 | + } | |
88 | if (strncmp (plat, "v7l", 3) == 0) | 89 | + } |
89 | features |= (ARM_V7 | ARM_V6); | 90 | + close (fd); |
90 | @@ -171,8 +191,52 @@ detect_cpu_features (void) | ||
91 | } | ||
92 | } | ||
93 | close (fd); | ||
94 | + | ||
95 | + if (plat == NULL || plat_cnt != 1 || *plat != 'v') | 91 | + if (plat == NULL || plat_cnt != 1 || *plat != 'v') |
96 | + { | 92 | + { |
97 | + /* | 93 | + /* |
@@ -106,17 +102,19 @@ index 23374e4..d0771fd 100644 | |||
106 | + { | 102 | + { |
107 | + if (strcmp (u.machine, "armv7l") == 0) | 103 | + if (strcmp (u.machine, "armv7l") == 0) |
108 | + { | 104 | + { |
109 | + features |= (ARM_V7 | ARM_V6); | 105 | features |= (ARM_V7 | ARM_V6); |
106 | - else if (strncmp (plat, "v6l", 3) == 0) | ||
110 | + hwcap |= ARM_HWCAP_VFP; /* qemu is supposed to emulate vfp */ | 107 | + hwcap |= ARM_HWCAP_VFP; /* qemu is supposed to emulate vfp */ |
111 | + hwcap |= ARM_HWCAP_NEON; /* qemu is supposed to emulate neon */ | 108 | + hwcap |= ARM_HWCAP_NEON; /* qemu is supposed to emulate neon */ |
112 | + } | 109 | + } |
113 | + else if (strcmp (u.machine, "armv6l") == 0) | 110 | + else if (strcmp (u.machine, "armv6l") == 0) |
114 | + { | 111 | + { |
115 | + features |= ARM_V6; | 112 | features |= ARM_V6; |
116 | + hwcap |= ARM_HWCAP_VFP; /* qemu is supposed to emulate vfp */ | 113 | + hwcap |= ARM_HWCAP_VFP; /* qemu is supposed to emulate vfp */ |
117 | + } | 114 | + } |
118 | + } | 115 | } |
119 | + } | 116 | } |
117 | - close (fd); | ||
120 | + else if (strncmp (plat, "v7l", 3) == 0) | 118 | + else if (strncmp (plat, "v7l", 3) == 0) |
121 | + { | 119 | + { |
122 | + features |= (ARM_V7 | ARM_V6); | 120 | + features |= (ARM_V7 | ARM_V6); |
@@ -134,6 +132,7 @@ index 23374e4..d0771fd 100644 | |||
134 | + features |= ARM_VFP; | 132 | + features |= ARM_VFP; |
135 | + if ((hwcap & ARM_HWCAP_IWMMXT) != 0) | 133 | + if ((hwcap & ARM_HWCAP_IWMMXT) != 0) |
136 | + features |= ARM_IWMMXT; | 134 | + features |= ARM_IWMMXT; |
135 | + /* this flag is only present on kernel 2.6.29 */ | ||
137 | + if ((hwcap & ARM_HWCAP_NEON) != 0) | 136 | + if ((hwcap & ARM_HWCAP_NEON) != 0) |
138 | + features |= ARM_NEON; | 137 | + features |= ARM_NEON; |
139 | + | 138 | + |
@@ -141,5 +140,5 @@ index 23374e4..d0771fd 100644 | |||
141 | } | 140 | } |
142 | 141 | ||
143 | -- | 142 | -- |
144 | 1.7.4.4 | 143 | 1.7.6.5 |
145 | 144 | ||
diff --git a/meta-oe/recipes-graphics/xorg-lib/pixman_0.27.2.bbappend b/meta-oe/recipes-graphics/xorg-lib/pixman_0.27.2.bbappend index a04a549a5c..c677167248 100644 --- a/meta-oe/recipes-graphics/xorg-lib/pixman_0.27.2.bbappend +++ b/meta-oe/recipes-graphics/xorg-lib/pixman_0.27.2.bbappend | |||
@@ -1,5 +1,7 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${P}:" | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${P}:" |
2 | 2 | ||
3 | PRINC := "${@int(PRINC) + 1}" | ||
4 | |||
3 | SRC_URI += " \ | 5 | SRC_URI += " \ |
4 | file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \ | 6 | file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \ |
5 | file://0002-Generic-C-implementation-of-pixman_blt-with-overlapp.patch \ | 7 | file://0002-Generic-C-implementation-of-pixman_blt-with-overlapp.patch \ |