1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= xorg-driver-video-intel
8 SDESC[standard]= X.org legacy driver for Intel graphic chipsets
9 HOMEPAGE= https://www.x.org/
13 SITES[main]= https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel/-/archive/
14 DISTFILE[1]= 31486f40f8e8f8923ca0799aea84b58799754564.tar.bz2:main
16 SPKGS[standard]= single
18 OPTIONS_AVAILABLE= SNA UXA XVMC
19 OPTIONS_STANDARD= SNA UXA XVMC
21 OPTDESCR[ACCEL]= Default AccelMethod (if not specified in xorg.conf)
22 OPTGROUP[ACCEL]= SNA UXA
27 BUILDRUN_DEPENDS= xorg-server:single:standard
28 libdrm:single:standard
30 USES= mesa libtool cpe autoreconf
31 XORG_COMPONENTS= xorgproto pciaccess pixman
33 DISTNAME= xf86-video-intel-31486f40f8e8f8923ca0799aea84b58799754564
36 LICENSE_FILE= MIT:{{WRKSRC}}/COPYING
39 CPE_PRODUCT= xf86-video-intel
41 FPC_EQUIVALENT= x11-drivers/xf86-video-intel
44 CONFIGURE_ARGS= --disable-udev
45 --with-builderstring="2.99.917.916"
46 CONFIGURE_ENV= ac_cv_header_sys_sysinfo_h=no
48 INSTALL_TARGET= install-strip
50 CFLAGS= -Wunused-but-set-variable
52 [XVMC].DESCRIPTION= X11 XvMC video extension support
53 [XVMC].BUILDRUN_DEPENDS_ON= xorg-xcb-util:single:standard
54 [XVMC].CONFIGURE_ENABLE_BOTH= xvmc
55 [XVMC].XORG_COMPONENTS_ON= x11
59 [SNA].DESCRIPTION= SandyBridge's New Acceleration
60 [SNA].CONFIGURE_ARGS_ON= --with-default-accel=sna
62 [UXA].DESCRIPTION= Unified Acceleration Architecture
63 [UXA].CONFIGURE_ARGS_ON= --with-default-accel=uxa
66 # Broken by political correctness
68 -e 's|slave_dst|secondary_dst|g' \
69 -e 's|master_pixmap|primary_pixmap|g' \
70 ${WRKSRC}/src/sna/sna_accel.c \
71 ${WRKSRC}/src/uxa/intel_driver.c
73 pre-configure-dragonfly:
74 # Prefer to use dfly specific sigjmp_buf for less errors
75 ${REINPLACE_CMD} -e 's|jmp_buf |sigjmp_buf |g' \
76 ${WRKSRC}/src/sna/sna.h \
77 ${WRKSRC}/src/sna/sna_accel.c
79 [FILE:531:descriptions/desc.single]
80 The xf86-video-intel module is an open-source 2D graphics driver for
81 the X Window System as implemented by X.org. It supports a variety of
82 Intel graphics chipsets including:
84 i810/i810e/i810-dc100,i815,
85 i830M,845G,852GM,855GM,865G,
86 915G/GM,945G/GM/GME,946GZ
88 G/Q33,G/Q35,G41,G/Q43,G/GM/Q45
89 PineView-M (Atom N400 series)
90 PineView-D (Atom D400/D500 series)
92 Intel(R) Iris(TM) Graphics,
93 Intel(R) Iris(TM) Pro Graphics.
97 e47eb678c681d80df138e897ee27c79f9b42e3517d55b1f0684e9a70361c8218 1250745 31486f40f8e8f8923ca0799aea84b58799754564.tar.bz2
100 [FILE:324:manifests/plist.single]
101 %%ONLY-LINUX%%libexec/xf86-video-intel-backlight-helper
102 %%ONLY-LINUX%%share/polkit-1/actions/org.x.xf86-video-intel.backlight-helper.policy
109 libIntelXvMC.so.1.0.0
110 lib/xorg/modules/drivers/intel_drv.so
111 share/man/man4/intel.4.gz
114 [FILE:1202:patches/patch-benchmarks_dri3-swap.c]
115 dri3-swap.c:237:24: error: variable 'tmp' is uninitialized when used here [-Werror,-Wuninitialized]
116 list_for_each_entry(tmp, &mru, link) {
118 dri3-swap.c:117:45: note: expanded from macro 'list_for_each_entry'
119 for (pos = __container_of((head)->next, pos, member); \
121 dri3-swap.c:114:41: note: expanded from macro '__container_of'
122 (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
124 dri3-swap.c:236:22: note: initialize the variable 'tmp' to silence this warning
125 struct buffer *tmp, *b = NULL;
129 --- benchmarks/dri3-swap.c.orig 2019-02-21 22:26:50 UTC
130 +++ benchmarks/dri3-swap.c
131 @@ -233,7 +233,7 @@ static void run(Display *dpy, Window win)
132 clock_gettime(CLOCK_MONOTONIC, &start);
134 for (n = 0; n < 1000; n++) {
135 - struct buffer *tmp, *b = NULL;
136 + struct buffer *tmp = NULL, *b = NULL;
137 list_for_each_entry(tmp, &mru, link) {
142 [FILE:864:patches/patch-hyphen]
143 Add hyphen to RANDR output names for consistency with modesetting(4x)
145 --- src/sna/sna_display.c.orig 2018-12-03 09:01:25 UTC
146 +++ src/sna/sna_display.c
147 @@ -5126,7 +5126,7 @@ sna_output_add(struct sna *sna, unsigned id, unsigned
148 output_name = output_names[compat_conn.conn.connector_type];
150 output_name = "UNKNOWN";
151 - len = snprintf(name, 32, "%s%d", output_name, compat_conn.conn.connector_type_id);
152 + len = snprintf(name, 32, "%s-%d", output_name, compat_conn.conn.connector_type_id);
153 if (output_ignored(scrn, name))
156 --- src/uxa/intel_display.c.orig 2018-12-03 09:01:25 UTC
157 +++ src/uxa/intel_display.c
158 @@ -1484,7 +1484,7 @@ drmmode_create_name(ScrnInfoPtr pScrn, drmModeConnecto
160 output_name = "UNKNOWN";
162 - snprintf(name, 32, "%s%d",
163 + snprintf(name, 32, "%s-%d",
164 output_name, koutput->connector_type_id);
169 [FILE:799:patches/patch-prefer-iris]
170 Chase https://gitlab.freedesktop.org/mesa/mesa/-/commit/adaa3583f507
172 --- src/sna/sna_dri2.c.orig 2020-11-16 15:23:28 UTC
173 +++ src/sna/sna_dri2.c
174 @@ -3707,8 +3707,10 @@ static const char *dri_driver_name(struct sna *sna)
175 return has_i830_dri() ? "i830" : "i915";
176 else if (sna->kgem.gen < 040)
179 + else if (sna->kgem.gen < 0100)
186 --- src/uxa/intel_dri.c.orig 2020-11-16 15:23:28 UTC
187 +++ src/uxa/intel_dri.c
188 @@ -1540,8 +1540,10 @@ static const char *dri_driver_name(intel_screen_privat
189 return has_i830_dri() ? "i830" : "i915";
190 else if (INTEL_INFO(intel)->gen < 040)
193 + else if (INTEL_INFO(intel)->gen < 0100)
202 [FILE:955:patches/patch-src_intel__device.c]
203 i915 requires KMS, so FreeBSD uses suffix to distinguish drm1 and drm2 drivers.
204 drm-kmod kept the same name at the cost of conflict with in-base drm2.
206 --- src/intel_device.c.orig 2021-01-15 20:59:05 UTC
207 +++ src/intel_device.c
208 @@ -204,6 +204,7 @@ static inline struct intel_device *intel
211 static const char *kernel_module_names[] ={
216 @@ -424,6 +425,10 @@ static int __intel_open_device__legacy(c
217 "pci:%04x:%02x:%02x.%d",
218 pci->domain, pci->bus, pci->dev, pci->func);
220 +#if defined(__DragonFly__)
221 + /* assume modesetting for i915, allow multiple loads and no fbcon */
222 + load_i915_kernel_module();
224 ret = drmCheckModesettingSupported(id);
226 if (load_i915_kernel_module() == 0)
227 @@ -433,6 +438,7 @@ static int __intel_open_device__legacy(c
228 /* Be nice to the user and load fbcon too */
229 (void)xf86LoadKernelModule("fbcon");
233 return fd_set_nonblock(drmOpen(NULL, id));
237 [FILE:8142:patches/patch-src_intel__list.h]
238 kgem.c:2864:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
239 list_for_each_entry(bo, &kgem->snoop, list) {
241 ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
242 for (pos = __container_of((head)->next, pos, member); \
244 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
245 (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
247 kgem.c:2849:20: note: initialize the variable 'bo' to silence this warning
248 struct kgem_bo *bo, *first = NULL;
251 kgem.c:3118:27: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
252 list_for_each_entry_safe(bo, next, &kgem->flushing, request) {
254 ../../src/intel_list.h:345:45: note: expanded from macro 'list_for_each_entry_safe'
255 for (pos = __container_of((head)->next, pos, member), \
257 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
258 (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
260 kgem.c:3115:20: note: initialize the variable 'bo' to silence this warning
261 struct kgem_bo *bo, *next;
264 kgem.c:3429:27: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
265 list_for_each_entry_safe(bo, next, &rq->buffers, request) {
267 ../../src/intel_list.h:345:45: note: expanded from macro 'list_for_each_entry_safe'
268 for (pos = __container_of((head)->next, pos, member), \
270 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
271 (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
273 kgem.c:3425:20: note: initialize the variable 'bo' to silence this warning
274 struct kgem_bo *bo, *next;
277 kgem.c:3541:27: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
278 list_for_each_entry_safe(bo, next, &kgem->batch_buffers, base.list) {
280 ../../src/intel_list.h:345:45: note: expanded from macro 'list_for_each_entry_safe'
281 for (pos = __container_of((head)->next, pos, member), \
283 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
284 (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
286 kgem.c:3539:24: note: initialize the variable 'bo' to silence this warning
287 struct kgem_buffer *bo, *next;
290 kgem.c:3930:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
291 list_for_each_entry(bo, list, list) {
293 ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
294 for (pos = __container_of((head)->next, pos, member); \
296 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
297 (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
299 kgem.c:3928:20: note: initialize the variable 'bo' to silence this warning
303 kgem.c:4670:23: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
304 list_for_each_entry(bo, cache, vma) {
306 ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
307 for (pos = __container_of((head)->next, pos, member); \
309 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
310 (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
312 kgem.c:4576:20: note: initialize the variable 'bo' to silence this warning
313 struct kgem_bo *bo, *first = NULL;
316 kgem.c:5411:31: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
317 list_for_each_entry_reverse(bo, &kgem->scanout, list) {
319 ../../src/intel_list.h:333:45: note: expanded from macro 'list_for_each_entry_reverse'
320 for (pos = __container_of((head)->prev, pos, member); \
322 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
323 (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
325 kgem.c:5380:20: note: initialize the variable 'bo' to silence this warning
329 kgem.c:7225:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
330 list_for_each_entry(bo, buffers, request) {
332 ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
333 for (pos = __container_of((head)->next, pos, member); \
335 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
336 (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
338 kgem.c:7223:20: note: initialize the variable 'bo' to silence this warning
342 kgem.c:7517:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized]
343 list_for_each_entry(bo, &kgem->batch_buffers, base.list) {
345 ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry'
346 for (pos = __container_of((head)->next, pos, member); \
348 ../../src/intel_list.h:309:41: note: expanded from macro '__container_of'
349 (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
351 kgem.c:7503:24: note: initialize the variable 'bo' to silence this warning
352 struct kgem_buffer *bo;
356 --- src/intel_list.h.orig 2019-02-21 22:26:50 UTC
358 @@ -325,12 +325,12 @@ list_is_empty(const struct list *head)
361 #define list_for_each_entry(pos, head, member) \
362 - for (pos = __container_of((head)->next, pos, member); \
363 + for (pos = NULL, pos = __container_of((head)->next, pos, member); \
364 &pos->member != (head); \
365 pos = __container_of(pos->member.next, pos, member))
367 -#define list_for_each_entry_reverse(pos, head, member) \
368 - for (pos = __container_of((head)->prev, pos, member); \
369 +#define list_for_each_entry_reverse(pos, head, member) \
370 + for (pos = NULL, pos = __container_of((head)->prev, pos, member); \
371 &pos->member != (head); \
372 pos = __container_of(pos->member.prev, pos, member))
374 @@ -342,7 +342,7 @@ list_is_empty(const struct list *head)
375 * See list_for_each_entry for more details.
377 #define list_for_each_entry_safe(pos, tmp, head, member) \
378 - for (pos = __container_of((head)->next, pos, member), \
379 + for (pos = NULL, pos = __container_of((head)->next, pos, member), \
380 tmp = __container_of(pos->member.next, pos, member); \
381 &pos->member != (head); \
382 pos = tmp, tmp = __container_of(pos->member.next, tmp, member))
385 [FILE:1007:patches/patch-src_sna_kgem.c]
386 --- src/sna/kgem.c.orig 2021-01-15 20:59:05 UTC
388 @@ -71,7 +71,11 @@ search_snoop_cache(struct kgem *kgem, un
389 #define DBG_NO_USERPTR 0
390 #define DBG_NO_UNSYNCHRONIZED_USERPTR 0
391 #define DBG_NO_COHERENT_MMAP_GTT 0
392 +#if defined __DragonFLy__
393 +#define DBG_NO_LLC 1
397 #define DBG_NO_SEMAPHORES 0
398 #define DBG_NO_MADV 0
399 #define DBG_NO_UPLOAD_CACHE 0
400 @@ -1189,13 +1193,18 @@ static int gem_param(struct kgem *kgem,
401 static bool test_has_execbuffer2(struct kgem *kgem)
403 struct drm_i915_gem_execbuffer2 execbuf;
406 memset(&execbuf, 0, sizeof(execbuf));
407 execbuf.buffer_count = 1;
409 - return do_ioctl(kgem->fd,
410 - DRM_IOCTL_I915_GEM_EXECBUFFER2,
411 - &execbuf) == -EFAULT;
412 + ret = do_ioctl(kgem->fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf);
414 + /* XXX FreeBSD returns ENOENT instead of EFAULT. */
415 + if (ret == -ENOENT)
418 + return ret == -EFAULT;
421 static bool test_has_no_reloc(struct kgem *kgem)
424 [FILE:387:patches/patch-src_sna_sna__video.c]
425 --- src/sna/sna_video.c.orig 2021-01-15 20:59:05 UTC
426 +++ src/sna/sna_video.c
428 #include "intel_options.h"
431 -#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
432 +#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
433 #include <sys/types.h>
434 #include <sys/endian.h>
438 [FILE:4765:patches/patch-test_present-speed.c]
439 present-speed.c:317:23: error: variable 'b' is uninitialized when used here [-Werror,-Wuninitialized]
440 list_for_each_entry(b, &mru, link)
442 present-speed.c:115:45: note: expanded from macro 'list_for_each_entry'
443 for (pos = __container_of((head)->next, pos, member); \
445 present-speed.c:112:41: note: expanded from macro '__container_of'
446 (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
448 present-speed.c:297:19: note: initialize the variable 'b' to silence this warning
452 present-speed.c:229:19: error: variable 'tmp' is used uninitialized whenever its declaration is reached
453 [-Werror,-Wsometimes-uninitialized]
454 struct buffer *tmp, *b = NULL;
456 present-speed.c:231:24: note: uninitialized use occurs here
457 list_for_each_entry(tmp, &mru, link) {
459 present-speed.c:115:45: note: expanded from macro 'list_for_each_entry'
460 for (pos = __container_of((head)->next, pos, member); \
462 present-speed.c:112:41: note: expanded from macro '__container_of'
463 (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
465 present-speed.c:229:22: note: initialize the variable 'tmp' to silence this warning
466 struct buffer *tmp, *b = NULL;
469 present-speed.c:557:24: error: variable 'b' is uninitialized when used here [-Werror,-Wuninitialized]
470 list_for_each_entry(b, &pp[i].mru, link)
472 present-speed.c:115:45: note: expanded from macro 'list_for_each_entry'
473 for (pos = __container_of((head)->next, pos, member); \
475 present-speed.c:112:41: note: expanded from macro '__container_of'
476 (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
478 present-speed.c:537:20: note: initialize the variable 'b' to silence this warning
482 present-speed.c:467:19: error: variable 'tmp' is used uninitialized whenever its declaration is reached
483 [-Werror,-Wsometimes-uninitialized]
484 struct buffer *tmp, *b = NULL;
486 present-speed.c:469:24: note: uninitialized use occurs here
487 list_for_each_entry(tmp, &pp[i].mru, link) {
489 present-speed.c:115:45: note: expanded from macro 'list_for_each_entry'
490 for (pos = __container_of((head)->next, pos, member); \
492 present-speed.c:112:41: note: expanded from macro '__container_of'
493 (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample)))
495 present-speed.c:467:22: note: initialize the variable 'tmp' to silence this warning
496 struct buffer *tmp, *b = NULL;
500 --- test/present-speed.c.orig 2019-02-21 22:26:50 UTC
501 +++ test/present-speed.c
502 @@ -226,7 +226,7 @@ static void run(Display *dpy, Window win, const char *
503 clock_gettime(CLOCK_MONOTONIC, &start);
505 for (n = 0; n < 1000; n++) {
506 - struct buffer *tmp, *b = NULL;
507 + struct buffer *tmp = NULL, *b = NULL;
509 list_for_each_entry(tmp, &mru, link) {
511 @@ -294,7 +294,7 @@ retry:
512 } while (end.tv_sec < start.tv_sec + 10);
514 if (options & DRI3) {
516 + struct buffer *b = NULL;
519 pixmap = xcb_generate_id(c);
520 @@ -464,7 +464,7 @@ static void perpixel(Display *dpy,
521 clock_gettime(CLOCK_MONOTONIC, &start);
523 for (i = 0; i < sz; i++) {
524 - struct buffer *tmp, *b = NULL;
525 + struct buffer *tmp = NULL, *b = NULL;
527 list_for_each_entry(tmp, &pp[i].mru, link) {
529 @@ -534,7 +534,7 @@ retry:
530 for (i = 0; i < sz; i++) {
531 if (options & DRI3) {
532 int depth = DefaultDepth(dpy, DefaultScreen(dpy));
534 + struct buffer *b = NULL;
537 pixmap = xcb_generate_id(c);
540 [FILE:284:dragonfly/patch-src_sna_sna__threads.c]
541 --- src/sna/sna_threads.c.orig 2018-12-03 09:01:25 UTC
542 +++ src/sna/sna_threads.c
547 +#define _WITH_GETLINE /* to expose getline() in stdio.h on FreeBSD */
548 +#include <stdio.h> /* for getline() */