diff options
author | Tom Zanussi <tom.zanussi@intel.com> | 2012-01-12 12:18:50 -0600 |
---|---|---|
committer | Tom Zanussi <tom.zanussi@intel.com> | 2012-01-12 12:27:30 -0600 |
commit | 4b6657ce65e3b15118c663f7b03249560d282cbd (patch) | |
tree | dc0371edd6ff4a8bc38cab780492e29962c9e2f0 /common/recipes-graphics/xorg-xserver/xserver-xorg-1.9.3 | |
parent | 9016be4d8005cfff3fedf4aded4600c6e110263a (diff) | |
download | meta-intel-4b6657ce65e3b15118c663f7b03249560d282cbd.tar.gz |
meta-intel/common: fix ptr->int and Werror=address compile errors1.2_M2.rc11.2_M2.final
A couple of things that had previously been warnings are now errors,
so they need to be fixed up.
The first problem is a comparison between the address of a static
struct and NULL, which can never be valid. A different fix for this
is upstream, which includes an API usage change; we don't need that to
fix this problem.
The second problem is a cast from pointer to integer in fbdevhw.c.
This also is fixed upstream by removing the whole section of code
which is bogus anyway, which is also done here.
This also adds a missing PR to the xserver-xorg recipe.
Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Diffstat (limited to 'common/recipes-graphics/xorg-xserver/xserver-xorg-1.9.3')
-rw-r--r-- | common/recipes-graphics/xorg-xserver/xserver-xorg-1.9.3/ptr-to-int-cast-fix.patch | 92 | ||||
-rw-r--r-- | common/recipes-graphics/xorg-xserver/xserver-xorg-1.9.3/werror-address-fix.patch | 49 |
2 files changed, 141 insertions, 0 deletions
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xorg-1.9.3/ptr-to-int-cast-fix.patch b/common/recipes-graphics/xorg-xserver/xserver-xorg-1.9.3/ptr-to-int-cast-fix.patch new file mode 100644 index 00000000..705cffcb --- /dev/null +++ b/common/recipes-graphics/xorg-xserver/xserver-xorg-1.9.3/ptr-to-int-cast-fix.patch | |||
@@ -0,0 +1,92 @@ | |||
1 | Upstream-Status: Inappropriate [already upstream] | ||
2 | |||
3 | It's broken for devices with BARs above 4G, and the sysfs method should | ||
4 | work everywhere anyway. As a pleasant side effect, this fixes some | ||
5 | warnings: | ||
6 | |||
7 | fbdevhw.c: In function 'fbdev_open_pci': | ||
8 | fbdevhw.c:333:4: warning: cast from pointer to integer of different size | ||
9 | fbdevhw.c:334:4: warning: cast from pointer to integer of different size | ||
10 | fbdevhw.c:336:4: warning: cast from pointer to integer of different size | ||
11 | fbdevhw.c:337:4: warning: cast from pointer to integer of different size | ||
12 | |||
13 | Signed-off-by: Adam Jackson <ajax (a] redhat.com> | ||
14 | Integrated-by: Tom Zanussi <tom.zanussi (a] intel.com> | ||
15 | |||
16 | Index: xorg-server-1.9.3/hw/xfree86/fbdevhw/fbdevhw.c | ||
17 | =================================================================== | ||
18 | --- xorg-server-1.9.3.orig/hw/xfree86/fbdevhw/fbdevhw.c 2012-01-12 10:32:07.097729262 -0600 | ||
19 | +++ xorg-server-1.9.3/hw/xfree86/fbdevhw/fbdevhw.c 2012-01-12 10:32:55.076732780 -0600 | ||
20 | @@ -291,14 +291,7 @@ | ||
21 | { | ||
22 | struct fb_fix_screeninfo fix; | ||
23 | char filename[256]; | ||
24 | - int fd,i,j; | ||
25 | - | ||
26 | - | ||
27 | - /* There are two ways to that we can determine which fb device is | ||
28 | - * associated with this PCI device. The more modern way is to look in | ||
29 | - * the sysfs directory for the PCI device for a file named | ||
30 | - * "graphics/fb*" | ||
31 | - */ | ||
32 | + int fd, i; | ||
33 | |||
34 | for (i = 0; i < 8; i++) { | ||
35 | sprintf(filename, | ||
36 | @@ -331,55 +324,10 @@ | ||
37 | } | ||
38 | } | ||
39 | |||
40 | - | ||
41 | - /* The other way is to examine the resources associated with each fb | ||
42 | - * device and see if there is a match with the PCI device. This technique | ||
43 | - * has some problems on certain mixed 64-bit / 32-bit architectures. | ||
44 | - * There is a flaw in the fb_fix_screeninfo structure in that it only | ||
45 | - * returns the low 32-bits of the address of the resources associated with | ||
46 | - * a device. However, on a mixed architecture the base addresses of PCI | ||
47 | - * devices, even for 32-bit applications, may be higher than 0x0f0000000. | ||
48 | - */ | ||
49 | - | ||
50 | - for (i = 0; i < 8; i++) { | ||
51 | - sprintf(filename,"/dev/fb%d",i); | ||
52 | - if (-1 == (fd = open(filename,O_RDWR,0))) { | ||
53 | - xf86DrvMsg(-1, X_WARNING, | ||
54 | - "open %s: %s\n", filename, strerror(errno)); | ||
55 | - continue; | ||
56 | - } | ||
57 | - if (-1 == ioctl(fd,FBIOGET_FSCREENINFO,(void*)&fix)) { | ||
58 | - close(fd); | ||
59 | - continue; | ||
60 | - } | ||
61 | - for (j = 0; j < 6; j++) { | ||
62 | - const pciaddr_t res_start = pPci->regions[j].base_addr; | ||
63 | - const pciaddr_t res_end = res_start + pPci->regions[j].size; | ||
64 | - | ||
65 | - if ((0 != fix.smem_len && | ||
66 | - (pciaddr_t) fix.smem_start >= res_start && | ||
67 | - (pciaddr_t) fix.smem_start < res_end) || | ||
68 | - (0 != fix.mmio_len && | ||
69 | - (pciaddr_t) fix.mmio_start >= res_start && | ||
70 | - (pciaddr_t) fix.mmio_start < res_end)) | ||
71 | - break; | ||
72 | - } | ||
73 | - if (j == 6) { | ||
74 | - close(fd); | ||
75 | - continue; | ||
76 | - } | ||
77 | - if (namep) { | ||
78 | - *namep = xnfalloc(16); | ||
79 | - strncpy(*namep,fix.id,16); | ||
80 | - } | ||
81 | - return fd; | ||
82 | - } | ||
83 | - | ||
84 | if (namep) | ||
85 | *namep = NULL; | ||
86 | |||
87 | - xf86DrvMsg(-1, X_ERROR, | ||
88 | - "Unable to find a valid framebuffer device\n"); | ||
89 | + xf86DrvMsg(-1, X_ERROR, "Unable to find a valid framebuffer device\n"); | ||
90 | return -1; | ||
91 | } | ||
92 | |||
diff --git a/common/recipes-graphics/xorg-xserver/xserver-xorg-1.9.3/werror-address-fix.patch b/common/recipes-graphics/xorg-xserver/xserver-xorg-1.9.3/werror-address-fix.patch new file mode 100644 index 00000000..49d3f947 --- /dev/null +++ b/common/recipes-graphics/xorg-xserver/xserver-xorg-1.9.3/werror-address-fix.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | Upstream-Status: Inappropriate [yocto-specific] | ||
2 | |||
3 | This is fixed upstream by actually making these tests meaningful. | ||
4 | As they stand, the warning is correct and they're no-ops, so remove | ||
5 | them. | ||
6 | |||
7 | Signed-off-by: Tom Zanussi <tom.zanussi (a] intel.com> | ||
8 | |||
9 | Index: xorg-server-1.9.3/Xext/xvmc.c | ||
10 | =================================================================== | ||
11 | --- xorg-server-1.9.3.orig/Xext/xvmc.c 2012-01-12 09:57:36.306947860 -0600 | ||
12 | +++ xorg-server-1.9.3/Xext/xvmc.c 2012-01-12 10:24:59.286729946 -0600 | ||
13 | @@ -467,7 +467,6 @@ | ||
14 | return Success; | ||
15 | } | ||
16 | |||
17 | - | ||
18 | static int | ||
19 | ProcXvMCListSubpictureTypes(ClientPtr client) | ||
20 | { | ||
21 | @@ -487,9 +486,6 @@ | ||
22 | |||
23 | pScreen = pPort->pAdaptor->pScreen; | ||
24 | |||
25 | - if(XvMCScreenKey == NULL) /* No XvMC adaptors */ | ||
26 | - return BadMatch; | ||
27 | - | ||
28 | if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) | ||
29 | return BadMatch; /* None this screen */ | ||
30 | |||
31 | @@ -668,9 +664,6 @@ | ||
32 | { | ||
33 | ExtensionEntry *extEntry; | ||
34 | |||
35 | - if(XvMCScreenKey == NULL) /* nobody supports it */ | ||
36 | - return; | ||
37 | - | ||
38 | if(!(XvMCRTContext = CreateNewResourceType(XvMCDestroyContextRes, | ||
39 | "XvMCRTContext"))) | ||
40 | return; | ||
41 | @@ -746,8 +739,6 @@ | ||
42 | XvMCAdaptorPtr adaptor = NULL; | ||
43 | int i; | ||
44 | |||
45 | - if(XvMCScreenKey == NULL) return NULL; | ||
46 | - | ||
47 | if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) | ||
48 | return NULL; | ||
49 | |||