View | Details | Raw Unified | Return to bug 236003 | Differences between
and this patch

Collapse All | Expand All

(-)b/x11-drivers/xf86-video-intel/Makefile (-23 / +26 lines)
Lines 2-46 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	xf86-video-intel
4
PORTNAME=	xf86-video-intel
5
PORTVERSION=	2.99.917.20181203
5
DISTVERSION=	2.99.917-865
6
DISTVERSIONSUFFIX=	-g60022507
7
PORTEPOCH=	1
6
CATEGORIES=	x11-drivers
8
CATEGORIES=	x11-drivers
7
MASTER_SITES=	http://cgit.freedesktop.org/xorg/${XORG_CAT}/${PORTNAME}/snapshot/
9
MASTER_SITES=	http://cgit.freedesktop.org/xorg/${XORG_CAT}/${PORTNAME}/snapshot/
8
DISTNAME=	${PORTNAME}-${COMMIT_ID}
9
10
10
MAINTAINER=	x11@FreeBSD.org
11
MAINTAINER=	x11@FreeBSD.org
11
COMMENT=	Driver for Intel integrated graphics chipsets
12
COMMENT=	X.Org legacy driver for Intel integrated graphics chipsets
12
13
13
LICENSE=	MIT	# various
14
LICENSE=	MIT	# various
14
LICENSE_FILE=	${WRKSRC}/COPYING
15
LICENSE_FILE=	${WRKSRC}/COPYING
15
16
16
LIB_DEPENDS=	libxcb-util.so:x11/xcb-util \
17
		libdrm.so:graphics/libdrm
18
19
COMMIT_ID=	e5ff8e1828f97891c819c919d7115c6e18b2eb1f
20
21
ONLY_FOR_ARCHS=	amd64 i386
17
ONLY_FOR_ARCHS=	amd64 i386
22
ONLY_FOR_ARCHS_REASON=	Intel integrated GPU only exists in Intel x86 processors/chipsets
18
ONLY_FOR_ARCHS_REASON=	Only Intel integrated GPUs on x86 are supported
23
19
24
USE_GL=		gl
20
LIB_DEPENDS=	libxcb-util.so:x11/xcb-util \
21
		libdrm_intel.so:graphics/libdrm
25
22
26
USE_LDCONFIG=	yes
23
USES=		autoreconf cpe gl localbase
27
XORG_CAT=	driver
24
USE_GL=		gl
28
USE_XORG=	pciaccess pixman x11 xcb xext xrender xv xvmc
25
USE_XORG=	pciaccess pixman x11 xcb xext xrender xv xvmc
29
26
USE_LDCONFIG=	yes
30
USES+=		cpe autoreconf
31
CPE_VENDOR=	x
27
CPE_VENDOR=	x
28
XORG_CAT=	driver
29
CONFIGURE_ARGS=	--with-builderstring="${DISTVERSIONFULL}"
30
TEST_TARGET=	check
32
31
33
OPTIONS_SINGLE=	ACCEL
32
# XXX bug 214593: SNA crashes on pre-SandyBridge hardware
34
OPTIONS_SINGLE_ACCEL=	SNA UXA
33
CONFIGURE_ARGS+=--with-default-accel=uxa
35
OPTIONS_DEFAULT=	UXA
34
# XXX Remove after FreeBSD 11 EOL
35
CPPFLAGS+=	-D_WITH_GETLINE
36
36
37
ACCEL_DESC=	Default AccelMethod (if not specified in xorg.conf)
37
OPTIONS_DEFINE=	UDEV
38
SNA_DESC=	SandyBridge's New Acceleration
38
OPTIONS_DEFAULT=UDEV
39
UXA_DESC=	Unified Acceleration Architecture
40
39
41
CONFIGURE_ARGS+=	--disable-udev
40
UDEV_DESC=		udev-based monitor hotplug detection
41
UDEV_LIB_DEPENDS=	libudev.so:devel/libudev-devd
42
UDEV_CONFIGURE_ENABLE=	udev
42
43
43
SNA_CONFIGURE_ON=	--with-default-accel=sna
44
post-patch:
44
UXA_CONFIGURE_ON=	--with-default-accel=uxa
45
.if ${CONFIGURE_ARGS:M--with-default-accel=uxa}
46
	@${REINPLACE_CMD} '/^Default/s/SNA/UXA/' ${WRKSRC}/man/intel.man
47
.endif
45
48
46
.include <bsd.port.mk>
49
.include <bsd.port.mk>
(-)b/x11-drivers/xf86-video-intel/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1543827685
1
TIMESTAMP = 1562759950
2
SHA256 (xorg/driver/xf86-video-intel-e5ff8e1828f97891c819c919d7115c6e18b2eb1f.tar.bz2) = 11b7e70c6efecad6540eda24c7370b47597f92dea9b24ca031d83b89eb6a8337
2
SHA256 (xorg/driver/xf86-video-intel-2.99.917-865-g60022507.tar.bz2) = 3c457e76cefd7a22a767d6b87013800eb4fa0dea9756c08239ebb24b11f4db72
3
SIZE (xorg/driver/xf86-video-intel-e5ff8e1828f97891c819c919d7115c6e18b2eb1f.tar.bz2) = 1247314
3
SIZE (xorg/driver/xf86-video-intel-2.99.917-865-g60022507.tar.bz2) = 1248765
(-)b/x11-drivers/xf86-video-intel/files/patch-benchmarks_dri3-swap.c (+25 lines)
Added Link Here
1
dri3-swap.c:237:24: error: variable 'tmp' is uninitialized when used here [-Werror,-Wuninitialized]
2
                        list_for_each_entry(tmp, &mru, link) {
3
                                            ^~~
4
dri3-swap.c:117:45: note: expanded from macro 'list_for_each_entry'
5
    for (pos = __container_of((head)->next, pos, member);               \
6
                                            ^~~
7
dri3-swap.c:114:41: note: expanded from macro '__container_of'
8
    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
9
                                        ^~~~~~
10
dri3-swap.c:236:22: note: initialize the variable 'tmp' to silence this warning
11
                        struct buffer *tmp, *b = NULL;
12
                                          ^
13
                                           = NULL
14
15
--- benchmarks/dri3-swap.c.orig	2019-02-21 22:26:50 UTC
16
+++ benchmarks/dri3-swap.c
17
@@ -233,7 +233,7 @@ static void run(Display *dpy, Window win)
18
 	clock_gettime(CLOCK_MONOTONIC, &start);
19
 	do {
20
 		for (n = 0; n < 1000; n++) {
21
-			struct buffer *tmp, *b = NULL;
22
+			struct buffer *tmp = NULL, *b = NULL;
23
 			list_for_each_entry(tmp, &mru, link) {
24
 				if (!tmp->busy) {
25
 					b = tmp;
(-)b/x11-drivers/xf86-video-intel/files/patch-hyphen (+24 lines)
Added Link Here
1
Add hyphen to RANDR output names for consistency with modesetting(4x)
2
3
--- src/sna/sna_display.c.orig	2018-12-03 09:01:25 UTC
4
+++ src/sna/sna_display.c
5
@@ -5126,7 +5126,7 @@ sna_output_add(struct sna *sna, unsigned id, unsigned 
6
 		output_name = output_names[compat_conn.conn.connector_type];
7
 	else
8
 		output_name = "UNKNOWN";
9
-	len = snprintf(name, 32, "%s%d", output_name, compat_conn.conn.connector_type_id);
10
+	len = snprintf(name, 32, "%s-%d", output_name, compat_conn.conn.connector_type_id);
11
 	if (output_ignored(scrn, name))
12
 		return 0;
13
 
14
--- src/uxa/intel_display.c.orig	2018-12-03 09:01:25 UTC
15
+++ src/uxa/intel_display.c
16
@@ -1484,7 +1484,7 @@ drmmode_create_name(ScrnInfoPtr pScrn, drmModeConnecto
17
 		else
18
 			output_name = "UNKNOWN";
19
 
20
-		snprintf(name, 32, "%s%d",
21
+		snprintf(name, 32, "%s-%d",
22
 			 output_name, koutput->connector_type_id);
23
 	}
24
 }
(-)b/x11-drivers/xf86-video-intel/files/patch-src_intel__device.c (-12 / +5 lines)
Lines 1-16 Link Here
1
--- src/intel_device.c.orig	2017-02-28 20:52:19 UTC
1
i915 requires KMS, so FreeBSD uses suffix to distinguish drm1 and drm2 drivers.
2
drm-kmod kept the same name at the cost of conflict with in-base drm2.
3
4
--- src/intel_device.c.orig	2019-02-21 22:26:50 UTC
2
+++ src/intel_device.c
5
+++ src/intel_device.c
3
@@ -28,6 +28,9 @@
6
@@ -204,6 +204,7 @@ static inline struct intel_device *intel_device(ScrnIn
4
 #include "config.h"
5
 #endif
6
 
7
+#define _WITH_GETLINE	/* to expose getline() in stdio.h on FreeBSD */
8
+#include <stdio.h>	/* for getline() */
9
+
10
 #include <sys/types.h>
11
 #include <sys/stat.h>
12
 #include <assert.h>
13
@@ -204,6 +207,7 @@ static inline struct intel_device *intel
14
 }
7
 }
15
 
8
 
16
 static const char *kernel_module_names[] ={
9
 static const char *kernel_module_names[] ={
(-)b/x11-drivers/xf86-video-intel/files/patch-src_intel__list.h (-12 / +121 lines)
Lines 1-15 Link Here
1
--- src/intel_list.h.orig	2017-02-28 20:52:19 UTC
1
kgem.c:2864:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
2
        list_for_each_entry(bo, &kgem->snoop, list) {
3
                            ^~
4
../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
5
    for (pos = __container_of((head)->next, pos, member);               \
6
                                            ^~~
7
../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
8
    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
9
                                        ^~~~~~
10
kgem.c:2849:20: note: initialize the variable 'bo' to silence this warning
11
        struct kgem_bo *bo, *first = NULL;
12
                          ^
13
                           = NULL
14
kgem.c:3118:27: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
15
        list_for_each_entry_safe(bo, next, &kgem->flushing, request) {
16
                                 ^~
17
../../src/intel_list.h:345:45: note: expanded from macro 'list_for_each_entry_safe'
18
    for (pos = __container_of((head)->next, pos, member),               \
19
                                            ^~~
20
../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
21
    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
22
                                        ^~~~~~
23
kgem.c:3115:20: note: initialize the variable 'bo' to silence this warning
24
        struct kgem_bo *bo, *next;
25
                          ^
26
                           = NULL
27
kgem.c:3429:27: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
28
        list_for_each_entry_safe(bo, next, &rq->buffers, request) {
29
                                 ^~
30
../../src/intel_list.h:345:45: note: expanded from macro 'list_for_each_entry_safe'
31
    for (pos = __container_of((head)->next, pos, member),               \
32
                                            ^~~
33
../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
34
    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
35
                                        ^~~~~~
36
kgem.c:3425:20: note: initialize the variable 'bo' to silence this warning
37
        struct kgem_bo *bo, *next;
38
                          ^
39
                           = NULL
40
kgem.c:3541:27: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
41
        list_for_each_entry_safe(bo, next, &kgem->batch_buffers, base.list) {
42
                                 ^~
43
../../src/intel_list.h:345:45: note: expanded from macro 'list_for_each_entry_safe'
44
    for (pos = __container_of((head)->next, pos, member),               \
45
                                            ^~~
46
../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
47
    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
48
                                        ^~~~~~
49
kgem.c:3539:24: note: initialize the variable 'bo' to silence this warning
50
        struct kgem_buffer *bo, *next;
51
                              ^
52
                               = NULL
53
kgem.c:3930:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
54
        list_for_each_entry(bo, list, list) {
55
                            ^~
56
../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
57
    for (pos = __container_of((head)->next, pos, member);               \
58
                                            ^~~
59
../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
60
    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
61
                                        ^~~~~~
62
kgem.c:3928:20: note: initialize the variable 'bo' to silence this warning
63
        struct kgem_bo *bo;
64
                          ^
65
                           = NULL
66
kgem.c:4670:23: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
67
                list_for_each_entry(bo, cache, vma) {
68
                                    ^~
69
../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
70
    for (pos = __container_of((head)->next, pos, member);               \
71
                                            ^~~
72
../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
73
    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
74
                                        ^~~~~~
75
kgem.c:4576:20: note: initialize the variable 'bo' to silence this warning
76
        struct kgem_bo *bo, *first = NULL;
77
                          ^
78
                           = NULL
79
kgem.c:5411:31: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
80
                list_for_each_entry_reverse(bo, &kgem->scanout, list) {
81
                                            ^~
82
../../src/intel_list.h:333:45: note: expanded from macro 'list_for_each_entry_reverse'
83
    for (pos = __container_of((head)->prev, pos, member);               \
84
                                            ^~~
85
../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
86
    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
87
                                        ^~~~~~
88
kgem.c:5380:20: note: initialize the variable 'bo' to silence this warning
89
        struct kgem_bo *bo;
90
                          ^
91
                           = NULL
92
kgem.c:7225:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
93
        list_for_each_entry(bo, buffers, request) {
94
                            ^~
95
../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
96
    for (pos = __container_of((head)->next, pos, member);               \
97
                                            ^~~
98
../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
99
    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
100
                                        ^~~~~~
101
kgem.c:7223:20: note: initialize the variable 'bo' to silence this warning
102
        struct kgem_bo *bo;
103
                          ^
104
                           = NULL
105
kgem.c:7517:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
106
        list_for_each_entry(bo, &kgem->batch_buffers, base.list) {
107
                            ^~
108
../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
109
    for (pos = __container_of((head)->next, pos, member);               \
110
                                            ^~~
111
../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
112
    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
113
                                        ^~~~~~
114
kgem.c:7503:24: note: initialize the variable 'bo' to silence this warning
115
        struct kgem_buffer *bo;
116
                              ^
117
                               = NULL
118
119
--- src/intel_list.h.orig	2019-02-21 22:26:50 UTC
2
+++ src/intel_list.h
120
+++ src/intel_list.h
3
@@ -305,8 +305,6 @@ list_is_empty(const struct list *head)
121
@@ -325,12 +325,12 @@ list_is_empty(const struct list *head)
4
 #define list_last_entry(ptr, type, member) \
5
     list_entry((ptr)->prev, type, member)
6
 
7
-#define __container_of(ptr, sample, member)				\
8
-    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
9
 /**
10
  * Loop through the list given by head and set pos to struct in the list.
11
  *
12
@@ -325,12 +323,12 @@ list_is_empty(const struct list *head)
13
  *
122
  *
14
  */
123
  */
15
 #define list_for_each_entry(pos, head, member)				\
124
 #define list_for_each_entry(pos, head, member)				\
Lines 25-31 Link Here
25
 	 &pos->member != (head);					\
134
 	 &pos->member != (head);					\
26
 	 pos = __container_of(pos->member.prev, pos, member))
135
 	 pos = __container_of(pos->member.prev, pos, member))
27
 
136
 
28
@@ -342,7 +340,7 @@ list_is_empty(const struct list *head)
137
@@ -342,7 +342,7 @@ list_is_empty(const struct list *head)
29
  * See list_for_each_entry for more details.
138
  * See list_for_each_entry for more details.
30
  */
139
  */
31
 #define list_for_each_entry_safe(pos, tmp, head, member)		\
140
 #define list_for_each_entry_safe(pos, tmp, head, member)		\
(-)b/x11-drivers/xf86-video-intel/files/patch-src_sna_kgem.c (-11 / +13 lines)
Lines 1-12 Link Here
1
--- src/sna/kgem.c.orig	2017-02-28 20:52:19 UTC
1
I915_USERPTR_UNSYNCHRONIZED is broken since drm-v4.11
2
https://github.com/FreeBSDDesktop/kms-drm/issues/32
3
4
--- src/sna/kgem.c.orig	2019-02-21 22:26:50 UTC
2
+++ src/sna/kgem.c
5
+++ src/sna/kgem.c
3
@@ -29,6 +29,9 @@
6
@@ -69,7 +69,7 @@ search_snoop_cache(struct kgem *kgem, unsigned int num
4
 #include "config.h"
7
 #define DBG_NO_CPU 0
5
 #endif
8
 #define DBG_NO_CREATE2 0
6
 
9
 #define DBG_NO_USERPTR 0
7
+#define _WITH_GETLINE	/* to expose getline() in stdio.h on FreeBSD */
10
-#define DBG_NO_UNSYNCHRONIZED_USERPTR 0
8
+#include <stdio.h>	/* for getline() */
11
+#define DBG_NO_UNSYNCHRONIZED_USERPTR 1
9
+
12
 #define DBG_NO_COHERENT_MMAP_GTT 0
10
 #include "sna.h"
13
 #define DBG_NO_LLC 0
11
 #include "sna_reg.h"
14
 #define DBG_NO_SEMAPHORES 0
12
 
(-)a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__threads.c (-12 lines)
Removed Link Here
1
--- src/sna/sna_threads.c.orig	2017-02-28 20:52:19 UTC
2
+++ src/sna/sna_threads.c
3
@@ -29,6 +29,9 @@
4
 #include "config.h"
5
 #endif
6
 
7
+#define _WITH_GETLINE	/* to expose getline() in stdio.h on FreeBSD */
8
+#include <stdio.h>	/* for getline() */
9
+
10
 #include "sna.h"
11
 
12
 #include <unistd.h>
(-)a/x11-drivers/xf86-video-intel/files/patch-src_sna_sna__video.c (-19 lines)
Removed Link Here
1
sna_video.c:62:10: fatal error: 'byteswap.h' file not found
2
#include <byteswap.h>
3
         ^~~~~~~~~~~~
4
5
--- src/sna/sna_video.c.orig	2018-12-03 09:01:25 UTC
6
+++ src/sna/sna_video.c
7
@@ -59,7 +59,12 @@
8
 #include "intel_options.h"
9
 
10
 #include <xf86xv.h>
11
+#if defined(__linux__) || defined(__GLIBC__)
12
 #include <byteswap.h>
13
+#else
14
+#include <sys/endian.h>
15
+#define bswap_32 bswap32
16
+#endif
17
 
18
 #ifdef SNA_XVMC
19
 #define _SNA_XVMC_SERVER_
(-)b/x11-drivers/xf86-video-intel/files/patch-test_present-speed.c (+99 lines)
Added Link Here
1
present-speed.c:317:23: error: variable 'b' is uninitialized when used here [-Werror,-Wuninitialized]
2
                list_for_each_entry(b, &mru, link)
3
                                    ^
4
present-speed.c:115:45: note: expanded from macro 'list_for_each_entry'
5
    for (pos = __container_of((head)->next, pos, member);               \
6
                                            ^~~
7
present-speed.c:112:41: note: expanded from macro '__container_of'
8
    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
9
                                        ^~~~~~
10
present-speed.c:297:19: note: initialize the variable 'b' to silence this warning
11
                struct buffer *b;
12
                                ^
13
                                 = NULL
14
present-speed.c:229:19: error: variable 'tmp' is used uninitialized whenever its declaration is reached
15
      [-Werror,-Wsometimes-uninitialized]
16
                        struct buffer *tmp, *b = NULL;
17
                        ~~~~~~~~~~~~~~~^~~
18
present-speed.c:231:24: note: uninitialized use occurs here
19
                        list_for_each_entry(tmp, &mru, link) {
20
                                            ^~~
21
present-speed.c:115:45: note: expanded from macro 'list_for_each_entry'
22
    for (pos = __container_of((head)->next, pos, member);               \
23
                                            ^~~
24
present-speed.c:112:41: note: expanded from macro '__container_of'
25
    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
26
                                        ^~~~~~
27
present-speed.c:229:22: note: initialize the variable 'tmp' to silence this warning
28
                        struct buffer *tmp, *b = NULL;
29
                                          ^
30
                                           = NULL
31
present-speed.c:557:24: error: variable 'b' is uninitialized when used here [-Werror,-Wuninitialized]
32
                        list_for_each_entry(b, &pp[i].mru, link)
33
                                            ^
34
present-speed.c:115:45: note: expanded from macro 'list_for_each_entry'
35
    for (pos = __container_of((head)->next, pos, member);               \
36
                                            ^~~
37
present-speed.c:112:41: note: expanded from macro '__container_of'
38
    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
39
                                        ^~~~~~
40
present-speed.c:537:20: note: initialize the variable 'b' to silence this warning
41
                        struct buffer *b;
42
                                        ^
43
                                         = NULL
44
present-speed.c:467:19: error: variable 'tmp' is used uninitialized whenever its declaration is reached
45
      [-Werror,-Wsometimes-uninitialized]
46
                        struct buffer *tmp, *b = NULL;
47
                        ~~~~~~~~~~~~~~~^~~
48
present-speed.c:469:24: note: uninitialized use occurs here
49
                        list_for_each_entry(tmp, &pp[i].mru, link) {
50
                                            ^~~
51
present-speed.c:115:45: note: expanded from macro 'list_for_each_entry'
52
    for (pos = __container_of((head)->next, pos, member);               \
53
                                            ^~~
54
present-speed.c:112:41: note: expanded from macro '__container_of'
55
    (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
56
                                        ^~~~~~
57
present-speed.c:467:22: note: initialize the variable 'tmp' to silence this warning
58
                        struct buffer *tmp, *b = NULL;
59
                                          ^
60
                                           = NULL
61
62
--- test/present-speed.c.orig	2019-02-21 22:26:50 UTC
63
+++ test/present-speed.c
64
@@ -226,7 +226,7 @@ static void run(Display *dpy, Window win, const char *
65
 	clock_gettime(CLOCK_MONOTONIC, &start);
66
 	do {
67
 		for (n = 0; n < 1000; n++) {
68
-			struct buffer *tmp, *b = NULL;
69
+			struct buffer *tmp = NULL, *b = NULL;
70
 retry:
71
 			list_for_each_entry(tmp, &mru, link) {
72
 				if (tmp->fence.xid)
73
@@ -294,7 +294,7 @@ retry:
74
 	} while (end.tv_sec < start.tv_sec + 10);
75
 
76
 	if (options & DRI3) {
77
-		struct buffer *b;
78
+		struct buffer *b = NULL;
79
 		XID pixmap;
80
 
81
 		pixmap = xcb_generate_id(c);
82
@@ -464,7 +464,7 @@ static void perpixel(Display *dpy,
83
 	clock_gettime(CLOCK_MONOTONIC, &start);
84
 	do {
85
 		for (i = 0; i < sz; i++) {
86
-			struct buffer *tmp, *b = NULL;
87
+			struct buffer *tmp = NULL, *b = NULL;
88
 retry:
89
 			list_for_each_entry(tmp, &pp[i].mru, link) {
90
 				if (tmp->fence.xid)
91
@@ -534,7 +534,7 @@ retry:
92
 	for (i = 0; i < sz; i++) {
93
 		if (options & DRI3) {
94
 			int depth = DefaultDepth(dpy, DefaultScreen(dpy));
95
-			struct buffer *b;
96
+			struct buffer *b = NULL;
97
 			XID pixmap;
98
 
99
 			pixmap = xcb_generate_id(c);

Return to bug 236003