# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= xorg-driver-video-intel VERSION= 2.99.917.916 EPOCH= 1 KEYWORDS= x11_drivers VARIANTS= standard SDESC[standard]= X.org legacy driver for Intel graphic chipsets HOMEPAGE= https://www.x.org/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel/-/archive/ DISTFILE[1]= 31486f40f8e8f8923ca0799aea84b58799754564.tar.bz2:main DF_INDEX= 1 SPKGS[standard]= single OPTIONS_AVAILABLE= SNA UXA XVMC OPTIONS_STANDARD= SNA UXA XVMC OPTGROUP_RADIO= ACCEL OPTDESCR[ACCEL]= Default AccelMethod (if not specified in xorg.conf) OPTGROUP[ACCEL]= SNA UXA OPT_ON[all]= UXA XVMC NOT_FOR_ARCH= aarch64 BUILDRUN_DEPENDS= xorg-server:single:standard libdrm:single:standard USES= mesa libtool cpe autoreconf XORG_COMPONENTS= xorgproto pciaccess pixman DISTNAME= xf86-video-intel-31486f40f8e8f8923ca0799aea84b58799754564 LICENSE= MIT:single LICENSE_FILE= MIT:{{WRKSRC}}/COPYING LICENSE_SCHEME= solo CPE_PRODUCT= xf86-video-intel CPE_VENDOR= x FPC_EQUIVALENT= x11-drivers/xf86-video-intel MUST_CONFIGURE= gnu CONFIGURE_ARGS= --disable-udev --with-builderstring="2.99.917.916" CONFIGURE_ENV= ac_cv_header_sys_sysinfo_h=no INSTALL_TARGET= install-strip CFLAGS= -Wunused-but-set-variable [XVMC].DESCRIPTION= X11 XvMC video extension support [XVMC].BUILDRUN_DEPENDS_ON= xorg-xcb-util:single:standard [XVMC].CONFIGURE_ENABLE_BOTH= xvmc [XVMC].XORG_COMPONENTS_ON= x11 xcb xvmc [SNA].DESCRIPTION= SandyBridge's New Acceleration [SNA].CONFIGURE_ARGS_ON= --with-default-accel=sna [UXA].DESCRIPTION= Unified Acceleration Architecture [UXA].CONFIGURE_ARGS_ON= --with-default-accel=uxa pre-configure: # Broken by political correctness ${SED} -i.PC \ -e 's|slave_dst|secondary_dst|g' \ -e 's|master_pixmap|primary_pixmap|g' \ ${WRKSRC}/src/sna/sna_accel.c \ ${WRKSRC}/src/uxa/intel_driver.c pre-configure-dragonfly: # Prefer to use dfly specific sigjmp_buf for less errors ${REINPLACE_CMD} -e 's|jmp_buf |sigjmp_buf |g' \ ${WRKSRC}/src/sna/sna.h \ ${WRKSRC}/src/sna/sna_accel.c [FILE:531:descriptions/desc.single] The xf86-video-intel module is an open-source 2D graphics driver for the X Window System as implemented by X.org. It supports a variety of Intel graphics chipsets including: i810/i810e/i810-dc100,i815, i830M,845G,852GM,855GM,865G, 915G/GM,945G/GM/GME,946GZ G/GM/GME/Q965, G/Q33,G/Q35,G41,G/Q43,G/GM/Q45 PineView-M (Atom N400 series) PineView-D (Atom D400/D500 series) Intel(R) HD Graphics, Intel(R) Iris(TM) Graphics, Intel(R) Iris(TM) Pro Graphics. [FILE:127:distinfo] e47eb678c681d80df138e897ee27c79f9b42e3517d55b1f0684e9a70361c8218 1250745 31486f40f8e8f8923ca0799aea84b58799754564.tar.bz2 [FILE:324:manifests/plist.single] %%ONLY-LINUX%%libexec/xf86-video-intel-backlight-helper %%ONLY-LINUX%%share/polkit-1/actions/org.x.xf86-video-intel.backlight-helper.policy lib/ libI810XvMC.so libI810XvMC.so.1 libI810XvMC.so.1.0.0 libIntelXvMC.so libIntelXvMC.so.1 libIntelXvMC.so.1.0.0 lib/xorg/modules/drivers/intel_drv.so share/man/man4/intel.4.gz [FILE:1202:patches/patch-benchmarks_dri3-swap.c] dri3-swap.c:237:24: error: variable 'tmp' is uninitialized when used here [-Werror,-Wuninitialized] list_for_each_entry(tmp, &mru, link) { ^~~ dri3-swap.c:117:45: note: expanded from macro 'list_for_each_entry' for (pos = __container_of((head)->next, pos, member); \ ^~~ dri3-swap.c:114:41: note: expanded from macro '__container_of' (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ^~~~~~ dri3-swap.c:236:22: note: initialize the variable 'tmp' to silence this warning struct buffer *tmp, *b = NULL; ^ = NULL --- benchmarks/dri3-swap.c.orig 2019-02-21 22:26:50 UTC +++ benchmarks/dri3-swap.c @@ -233,7 +233,7 @@ static void run(Display *dpy, Window win) clock_gettime(CLOCK_MONOTONIC, &start); do { for (n = 0; n < 1000; n++) { - struct buffer *tmp, *b = NULL; + struct buffer *tmp = NULL, *b = NULL; list_for_each_entry(tmp, &mru, link) { if (!tmp->busy) { b = tmp; [FILE:864:patches/patch-hyphen] Add hyphen to RANDR output names for consistency with modesetting(4x) --- src/sna/sna_display.c.orig 2018-12-03 09:01:25 UTC +++ src/sna/sna_display.c @@ -5126,7 +5126,7 @@ sna_output_add(struct sna *sna, unsigned id, unsigned output_name = output_names[compat_conn.conn.connector_type]; else output_name = "UNKNOWN"; - len = snprintf(name, 32, "%s%d", output_name, compat_conn.conn.connector_type_id); + len = snprintf(name, 32, "%s-%d", output_name, compat_conn.conn.connector_type_id); if (output_ignored(scrn, name)) return 0; --- src/uxa/intel_display.c.orig 2018-12-03 09:01:25 UTC +++ src/uxa/intel_display.c @@ -1484,7 +1484,7 @@ drmmode_create_name(ScrnInfoPtr pScrn, drmModeConnecto else output_name = "UNKNOWN"; - snprintf(name, 32, "%s%d", + snprintf(name, 32, "%s-%d", output_name, koutput->connector_type_id); } } [FILE:799:patches/patch-prefer-iris] Chase https://gitlab.freedesktop.org/mesa/mesa/-/commit/adaa3583f507 --- src/sna/sna_dri2.c.orig 2020-11-16 15:23:28 UTC +++ src/sna/sna_dri2.c @@ -3707,8 +3707,10 @@ static const char *dri_driver_name(struct sna *sna) return has_i830_dri() ? "i830" : "i915"; else if (sna->kgem.gen < 040) return "i915"; - else + else if (sna->kgem.gen < 0100) return "i965"; + else + return "iris"; } return s; --- src/uxa/intel_dri.c.orig 2020-11-16 15:23:28 UTC +++ src/uxa/intel_dri.c @@ -1540,8 +1540,10 @@ static const char *dri_driver_name(intel_screen_privat return has_i830_dri() ? "i830" : "i915"; else if (INTEL_INFO(intel)->gen < 040) return "i915"; - else + else if (INTEL_INFO(intel)->gen < 0100) return "i965"; + else + return "iris"; } return s; [FILE:955:patches/patch-src_intel__device.c] i915 requires KMS, so FreeBSD uses suffix to distinguish drm1 and drm2 drivers. drm-kmod kept the same name at the cost of conflict with in-base drm2. --- src/intel_device.c.orig 2021-01-15 20:59:05 UTC +++ src/intel_device.c @@ -204,6 +204,7 @@ static inline struct intel_device *intel } static const char *kernel_module_names[] ={ + "i915kms", "i915", NULL, }; @@ -424,6 +425,10 @@ static int __intel_open_device__legacy(c "pci:%04x:%02x:%02x.%d", pci->domain, pci->bus, pci->dev, pci->func); +#if defined(__DragonFly__) + /* assume modesetting for i915, allow multiple loads and no fbcon */ + load_i915_kernel_module(); +#else ret = drmCheckModesettingSupported(id); if (ret) { if (load_i915_kernel_module() == 0) @@ -433,6 +438,7 @@ static int __intel_open_device__legacy(c /* Be nice to the user and load fbcon too */ (void)xf86LoadKernelModule("fbcon"); } +#endif return fd_set_nonblock(drmOpen(NULL, id)); } [FILE:8142:patches/patch-src_intel__list.h] kgem.c:2864:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized] list_for_each_entry(bo, &kgem->snoop, list) { ^~ ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry' for (pos = __container_of((head)->next, pos, member); \ ^~~ ../../src/intel_list.h:309:41: note: expanded from macro '__container_of' (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ^~~~~~ kgem.c:2849:20: note: initialize the variable 'bo' to silence this warning struct kgem_bo *bo, *first = NULL; ^ = NULL kgem.c:3118:27: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized] list_for_each_entry_safe(bo, next, &kgem->flushing, request) { ^~ ../../src/intel_list.h:345:45: note: expanded from macro 'list_for_each_entry_safe' for (pos = __container_of((head)->next, pos, member), \ ^~~ ../../src/intel_list.h:309:41: note: expanded from macro '__container_of' (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ^~~~~~ kgem.c:3115:20: note: initialize the variable 'bo' to silence this warning struct kgem_bo *bo, *next; ^ = NULL kgem.c:3429:27: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized] list_for_each_entry_safe(bo, next, &rq->buffers, request) { ^~ ../../src/intel_list.h:345:45: note: expanded from macro 'list_for_each_entry_safe' for (pos = __container_of((head)->next, pos, member), \ ^~~ ../../src/intel_list.h:309:41: note: expanded from macro '__container_of' (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ^~~~~~ kgem.c:3425:20: note: initialize the variable 'bo' to silence this warning struct kgem_bo *bo, *next; ^ = NULL kgem.c:3541:27: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized] list_for_each_entry_safe(bo, next, &kgem->batch_buffers, base.list) { ^~ ../../src/intel_list.h:345:45: note: expanded from macro 'list_for_each_entry_safe' for (pos = __container_of((head)->next, pos, member), \ ^~~ ../../src/intel_list.h:309:41: note: expanded from macro '__container_of' (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ^~~~~~ kgem.c:3539:24: note: initialize the variable 'bo' to silence this warning struct kgem_buffer *bo, *next; ^ = NULL kgem.c:3930:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized] list_for_each_entry(bo, list, list) { ^~ ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry' for (pos = __container_of((head)->next, pos, member); \ ^~~ ../../src/intel_list.h:309:41: note: expanded from macro '__container_of' (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ^~~~~~ kgem.c:3928:20: note: initialize the variable 'bo' to silence this warning struct kgem_bo *bo; ^ = NULL kgem.c:4670:23: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized] list_for_each_entry(bo, cache, vma) { ^~ ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry' for (pos = __container_of((head)->next, pos, member); \ ^~~ ../../src/intel_list.h:309:41: note: expanded from macro '__container_of' (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ^~~~~~ kgem.c:4576:20: note: initialize the variable 'bo' to silence this warning struct kgem_bo *bo, *first = NULL; ^ = NULL kgem.c:5411:31: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized] list_for_each_entry_reverse(bo, &kgem->scanout, list) { ^~ ../../src/intel_list.h:333:45: note: expanded from macro 'list_for_each_entry_reverse' for (pos = __container_of((head)->prev, pos, member); \ ^~~ ../../src/intel_list.h:309:41: note: expanded from macro '__container_of' (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ^~~~~~ kgem.c:5380:20: note: initialize the variable 'bo' to silence this warning struct kgem_bo *bo; ^ = NULL kgem.c:7225:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized] list_for_each_entry(bo, buffers, request) { ^~ ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry' for (pos = __container_of((head)->next, pos, member); \ ^~~ ../../src/intel_list.h:309:41: note: expanded from macro '__container_of' (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ^~~~~~ kgem.c:7223:20: note: initialize the variable 'bo' to silence this warning struct kgem_bo *bo; ^ = NULL kgem.c:7517:22: error: variable 'bo' is uninitialized when used here [-Werror,-Wuninitialized] list_for_each_entry(bo, &kgem->batch_buffers, base.list) { ^~ ../../src/intel_list.h:328:45: note: expanded from macro 'list_for_each_entry' for (pos = __container_of((head)->next, pos, member); \ ^~~ ../../src/intel_list.h:309:41: note: expanded from macro '__container_of' (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ^~~~~~ kgem.c:7503:24: note: initialize the variable 'bo' to silence this warning struct kgem_buffer *bo; ^ = NULL --- src/intel_list.h.orig 2019-02-21 22:26:50 UTC +++ src/intel_list.h @@ -325,12 +325,12 @@ list_is_empty(const struct list *head) * */ #define list_for_each_entry(pos, head, member) \ - for (pos = __container_of((head)->next, pos, member); \ + for (pos = NULL, pos = __container_of((head)->next, pos, member); \ &pos->member != (head); \ pos = __container_of(pos->member.next, pos, member)) -#define list_for_each_entry_reverse(pos, head, member) \ - for (pos = __container_of((head)->prev, pos, member); \ +#define list_for_each_entry_reverse(pos, head, member) \ + for (pos = NULL, pos = __container_of((head)->prev, pos, member); \ &pos->member != (head); \ pos = __container_of(pos->member.prev, pos, member)) @@ -342,7 +342,7 @@ list_is_empty(const struct list *head) * See list_for_each_entry for more details. */ #define list_for_each_entry_safe(pos, tmp, head, member) \ - for (pos = __container_of((head)->next, pos, member), \ + for (pos = NULL, pos = __container_of((head)->next, pos, member), \ tmp = __container_of(pos->member.next, pos, member); \ &pos->member != (head); \ pos = tmp, tmp = __container_of(pos->member.next, tmp, member)) [FILE:1007:patches/patch-src_sna_kgem.c] --- src/sna/kgem.c.orig 2021-01-15 20:59:05 UTC +++ src/sna/kgem.c @@ -71,7 +71,11 @@ search_snoop_cache(struct kgem *kgem, un #define DBG_NO_USERPTR 0 #define DBG_NO_UNSYNCHRONIZED_USERPTR 0 #define DBG_NO_COHERENT_MMAP_GTT 0 +#if defined __DragonFLy__ +#define DBG_NO_LLC 1 +#else #define DBG_NO_LLC 0 +#endif #define DBG_NO_SEMAPHORES 0 #define DBG_NO_MADV 0 #define DBG_NO_UPLOAD_CACHE 0 @@ -1189,13 +1193,18 @@ static int gem_param(struct kgem *kgem, static bool test_has_execbuffer2(struct kgem *kgem) { struct drm_i915_gem_execbuffer2 execbuf; + int ret; memset(&execbuf, 0, sizeof(execbuf)); execbuf.buffer_count = 1; - return do_ioctl(kgem->fd, - DRM_IOCTL_I915_GEM_EXECBUFFER2, - &execbuf) == -EFAULT; + ret = do_ioctl(kgem->fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); +#ifdef __FreeBSD__ + /* XXX FreeBSD returns ENOENT instead of EFAULT. */ + if (ret == -ENOENT) + return true; +#endif + return ret == -EFAULT; } static bool test_has_no_reloc(struct kgem *kgem) [FILE:387:patches/patch-src_sna_sna__video.c] --- src/sna/sna_video.c.orig 2021-01-15 20:59:05 UTC +++ src/sna/sna_video.c @@ -59,7 +59,7 @@ #include "intel_options.h" #include -#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) #include #include #ifdef __OpenBSD__ [FILE:4765:patches/patch-test_present-speed.c] present-speed.c:317:23: error: variable 'b' is uninitialized when used here [-Werror,-Wuninitialized] list_for_each_entry(b, &mru, link) ^ present-speed.c:115:45: note: expanded from macro 'list_for_each_entry' for (pos = __container_of((head)->next, pos, member); \ ^~~ present-speed.c:112:41: note: expanded from macro '__container_of' (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ^~~~~~ present-speed.c:297:19: note: initialize the variable 'b' to silence this warning struct buffer *b; ^ = NULL present-speed.c:229:19: error: variable 'tmp' is used uninitialized whenever its declaration is reached [-Werror,-Wsometimes-uninitialized] struct buffer *tmp, *b = NULL; ~~~~~~~~~~~~~~~^~~ present-speed.c:231:24: note: uninitialized use occurs here list_for_each_entry(tmp, &mru, link) { ^~~ present-speed.c:115:45: note: expanded from macro 'list_for_each_entry' for (pos = __container_of((head)->next, pos, member); \ ^~~ present-speed.c:112:41: note: expanded from macro '__container_of' (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ^~~~~~ present-speed.c:229:22: note: initialize the variable 'tmp' to silence this warning struct buffer *tmp, *b = NULL; ^ = NULL present-speed.c:557:24: error: variable 'b' is uninitialized when used here [-Werror,-Wuninitialized] list_for_each_entry(b, &pp[i].mru, link) ^ present-speed.c:115:45: note: expanded from macro 'list_for_each_entry' for (pos = __container_of((head)->next, pos, member); \ ^~~ present-speed.c:112:41: note: expanded from macro '__container_of' (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ^~~~~~ present-speed.c:537:20: note: initialize the variable 'b' to silence this warning struct buffer *b; ^ = NULL present-speed.c:467:19: error: variable 'tmp' is used uninitialized whenever its declaration is reached [-Werror,-Wsometimes-uninitialized] struct buffer *tmp, *b = NULL; ~~~~~~~~~~~~~~~^~~ present-speed.c:469:24: note: uninitialized use occurs here list_for_each_entry(tmp, &pp[i].mru, link) { ^~~ present-speed.c:115:45: note: expanded from macro 'list_for_each_entry' for (pos = __container_of((head)->next, pos, member); \ ^~~ present-speed.c:112:41: note: expanded from macro '__container_of' (void *)((char *)(ptr) - ((char *)&(sample)->member - (char *)(sample))) ^~~~~~ present-speed.c:467:22: note: initialize the variable 'tmp' to silence this warning struct buffer *tmp, *b = NULL; ^ = NULL --- test/present-speed.c.orig 2019-02-21 22:26:50 UTC +++ test/present-speed.c @@ -226,7 +226,7 @@ static void run(Display *dpy, Window win, const char * clock_gettime(CLOCK_MONOTONIC, &start); do { for (n = 0; n < 1000; n++) { - struct buffer *tmp, *b = NULL; + struct buffer *tmp = NULL, *b = NULL; retry: list_for_each_entry(tmp, &mru, link) { if (tmp->fence.xid) @@ -294,7 +294,7 @@ retry: } while (end.tv_sec < start.tv_sec + 10); if (options & DRI3) { - struct buffer *b; + struct buffer *b = NULL; XID pixmap; pixmap = xcb_generate_id(c); @@ -464,7 +464,7 @@ static void perpixel(Display *dpy, clock_gettime(CLOCK_MONOTONIC, &start); do { for (i = 0; i < sz; i++) { - struct buffer *tmp, *b = NULL; + struct buffer *tmp = NULL, *b = NULL; retry: list_for_each_entry(tmp, &pp[i].mru, link) { if (tmp->fence.xid) @@ -534,7 +534,7 @@ retry: for (i = 0; i < sz; i++) { if (options & DRI3) { int depth = DefaultDepth(dpy, DefaultScreen(dpy)); - struct buffer *b; + struct buffer *b = NULL; XID pixmap; pixmap = xcb_generate_id(c); [FILE:284:dragonfly/patch-src_sna_sna__threads.c] --- src/sna/sna_threads.c.orig 2018-12-03 09:01:25 UTC +++ src/sna/sna_threads.c @@ -29,6 +29,9 @@ #include "config.h" #endif +#define _WITH_GETLINE /* to expose getline() in stdio.h on FreeBSD */ +#include /* for getline() */ + #include "sna.h" #include