From nobody Sat Feb 11 06:52:32 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PDLrc6cvVz3p88Q; Sat, 11 Feb 2023 06:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PDLrc69d4z3tvW; Sat, 11 Feb 2023 06:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676098352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JHuiw4jw9NGVqJ9ZUlMDHzeOaN3Li4Vv5/caADfrY+M=; b=AgOHznSjSohK/AwTLD+A3LeQwvGljkkmGHLHz62B+u2oLs+XOp5F/P8EddOBPGsj9MxxjK TuR3YTRzA2p99mDgtjvL3Xnm/LppN6JCJB/KxZhl3hb6/cyr6/7boan+Q86mcG55F/OWLf ygLtgIG+Dje1plwvK2Qrs++RGvDzTyWRaTuQc3J6Laf0hKCnaP1GGdYYvjB3XqnuX9q9xi P0GsAm4MLGYq6vbLyDZoJHU3SS/BEBk9qGZ+ukfSyrHaMxcfLB/mAYtcVU2FIO04lbDRLm w31RdARHHZkU7b2DXtwAOKJ+IMoiI9zQc7djW5Pfsyhwj8yFqOd405+FTofq4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676098352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JHuiw4jw9NGVqJ9ZUlMDHzeOaN3Li4Vv5/caADfrY+M=; b=q8WAVnwYGtaja4Y/QF0vITT/LSQ09DbjW6ouMQx42DbKFqhNv/s07olSEDGRXvT5E8pYB/ zB/HT5De2hyJc2Qeca2HutkIij+QNjGfunfvL9Afp7HDs9ERjn8nbh29IxnAbccoycPN4s M+9Od2It5V/RdWIpROavI3ApCBFPvHXmOGw5PLbKjjtNpIVC6zaYvk88ASRWw86EWVEK0R c1waJeJrQCh4CYB9yq8xRBgrE5Nt9KIv/bCfkNWQAaoUh3Poq6URNhknIoF0s2odKc0HAY DmDCE8JZg0jD9UMttbTRN053qAJzy1vWATTAxNeiX/8ImRwvVbkglgvYhf37+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676098352; a=rsa-sha256; cv=none; b=X0/YBbX1yEf38mVxuh9Bj6MsLUG6YPtyfVCjgfG7Ft4wh6uUA/jiYRMj8hICB4hK+0+Q9l TSEuLQGF4amJK9sMiNsdQ9Njs7Prr8Hc2yuMR63HIf1SgKGa8l6Y40q6jnjQwlQe8SQQtP 6B7e407JG7gApojbsPC+DAl4IteL4ixcXShsvPOZLrxpbQSKC80Kzvr9IL/LwkD2HP20GH DH8lwlO8Gci5SkIzUu+l3FGVDTKwPseir9EsSjqser0RfVsEAlMeSC53x37rjRlgH7+iWd 75lkqCuZmb4kSTEEeHE42CgKq9PN8DQHrtKkjl2eiZUssukkd87cdm6g2039dw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PDLrc5D94zpbN; Sat, 11 Feb 2023 06:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31B6qWZk032024; Sat, 11 Feb 2023 06:52:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31B6qW2q032023; Sat, 11 Feb 2023 06:52:32 GMT (envelope-from git) Date: Sat, 11 Feb 2023 06:52:32 GMT Message-Id: <202302110652.31B6qW2q032023@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Hiroki Sato Subject: git: 72478310d3b0 - main - x11-drivers/xf86-video-qxl: Resurrect xf86-video-qxl, driver for QXL GPU List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hrs X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72478310d3b01ca54f1dfa955544ec88db731ffe Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hrs: URL: https://cgit.FreeBSD.org/ports/commit/?id=72478310d3b01ca54f1dfa955544ec88db731ffe commit 72478310d3b01ca54f1dfa955544ec88db731ffe Author: Hiroki Sato AuthorDate: 2023-02-11 03:57:57 +0000 Commit: Hiroki Sato CommitDate: 2023-02-11 03:57:57 +0000 x11-drivers/xf86-video-qxl: Resurrect xf86-video-qxl, driver for QXL GPU --- MOVED | 1 - x11-drivers/Makefile | 1 + x11-drivers/xf86-video-qxl/Makefile | 35 ++++++++++++++++++ x11-drivers/xf86-video-qxl/distinfo | 3 ++ .../xf86-video-qxl/files/patch-spiceqxl_audio.c | 14 ++++++++ .../xf86-video-qxl/files/patch-src-mspace.h | 11 ++++++ .../xf86-video-qxl/files/patch-src-qxl_driver.c | 25 +++++++++++++ .../files/patch-src-qxl_option_helpers.c | 41 ++++++++++++++++++++++ .../files/patch-src-qxl_option_helpers.h | 19 ++++++++++ .../xf86-video-qxl/files/patch-src-qxl_ums_mode.c | 11 ++++++ x11-drivers/xf86-video-qxl/pkg-descr | 3 ++ x11-drivers/xf86-video-qxl/pkg-plist | 5 +++ 12 files changed, 168 insertions(+), 1 deletion(-) diff --git a/MOVED b/MOVED index 8fa5a3e88cfd..c9880e413bd0 100644 --- a/MOVED +++ b/MOVED @@ -15488,7 +15488,6 @@ www/waccess||2020-09-19|Has expired: Uses deprecated version of python www/wadcomblog||2020-09-19|Has expired: Uses deprecated version of python www/webcheck||2020-09-19|Has expired: Uses deprecated version of python www/woof||2020-09-19|Has expired: Uses deprecated version of python -x11-drivers/xf86-video-qxl||2020-09-19|Has expired: uses deprecated version of python x11-fm/twander||2020-09-19|Has expired: Uses deprecated version of python x11-wm/compizconfig-python||2020-09-19|Has expired: Uses deprecated version of python x11-wm/fvwm-crystal||2020-09-19|Has expired: Uses deprecated version of python diff --git a/x11-drivers/Makefile b/x11-drivers/Makefile index 24e668fc50d8..15c37d7a8a45 100644 --- a/x11-drivers/Makefile +++ b/x11-drivers/Makefile @@ -28,6 +28,7 @@ SUBDIR += xf86-video-neomagic SUBDIR += xf86-video-nv SUBDIR += xf86-video-openchrome + SUBDIR += xf86-video-qxl SUBDIR += xf86-video-r128 SUBDIR += xf86-video-rendition SUBDIR += xf86-video-savage diff --git a/x11-drivers/xf86-video-qxl/Makefile b/x11-drivers/xf86-video-qxl/Makefile new file mode 100644 index 000000000000..6c336ab8ba7f --- /dev/null +++ b/x11-drivers/xf86-video-qxl/Makefile @@ -0,0 +1,35 @@ +PORTNAME= xf86-video-qxl +DISTVERSION= 0.1.5 +PORTREVISION= 5 +CATEGORIES= x11-drivers + +MAINTAINER= hrs@FreeBSD.org +COMMENT= X.Org X server -- QXL display driver +WWW= https://www.x.org/ + +LICENSE= MIT + +BUILD_DEPENDS= spice-protocol>=0.12.10:devel/spice-protocol \ + ${LOCALBASE}/include/linux/input.h:devel/evdev-proto +LIB_DEPENDS= libspice-server.so:devel/libspice-server \ + libudev.so:devel/libudev-devd + +USES= localbase:ldflags pkgconfig python shebangfix xorg \ + xorg-cat:driver +USE_XORG= xfont2 + +CONFIGURE_ARGS+=--enable-xspice + +python_OLD_CMD= /usr/bin/python +SHEBANG_FILES= scripts/Xspice + +OPTIONS_DEFINE= DOCS + +pre-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d + +post-install: + ${INSTALL_DATA} ${WRKSRC}/examples/spiceqxl.xorg.conf.example \ + ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d/spiceqxl.xorg.conf.example + +.include diff --git a/x11-drivers/xf86-video-qxl/distinfo b/x11-drivers/xf86-video-qxl/distinfo new file mode 100644 index 000000000000..0a152f7d5154 --- /dev/null +++ b/x11-drivers/xf86-video-qxl/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1514372367 +SHA256 (xorg/driver/xf86-video-qxl-0.1.5.tar.bz2) = b18682e04503c6326f7bf7190f3ee50a3d4d69758a2a3cc9af102a6b3f114c92 +SIZE (xorg/driver/xf86-video-qxl-0.1.5.tar.bz2) = 508266 diff --git a/x11-drivers/xf86-video-qxl/files/patch-spiceqxl_audio.c b/x11-drivers/xf86-video-qxl/files/patch-spiceqxl_audio.c new file mode 100644 index 000000000000..9ba92890929e --- /dev/null +++ b/x11-drivers/xf86-video-qxl/files/patch-spiceqxl_audio.c @@ -0,0 +1,14 @@ +--- src/spiceqxl_audio.c.bak 2017-09-12 12:00:11 UTC ++++ src/spiceqxl_audio.c +@@ -410,7 +410,10 @@ + strcat(fname, "/"); + strcat(fname, e->name); + +- f->fd = open(fname, O_RDONLY | O_RSYNC | O_NONBLOCK); ++// f->fd = open(fname, O_RDONLY | O_RSYNC | O_NONBLOCK); ++ // POSIX specifies three different flavors for synchronous I/O: O_SYNC, O_DSYNC, and O_RSYNC. ++ // In BSD, these are all equivalent. ++ f->fd = open(fname, O_RDONLY | O_SYNC | O_NONBLOCK); + free(fname); + if (f->fd < 0) { + ErrorF("playback: open FIFO '%s' failed: %s\n", e->name, strerror(errno)); diff --git a/x11-drivers/xf86-video-qxl/files/patch-src-mspace.h b/x11-drivers/xf86-video-qxl/files/patch-src-mspace.h new file mode 100644 index 000000000000..11a5a9dc55ea --- /dev/null +++ b/x11-drivers/xf86-video-qxl/files/patch-src-mspace.h @@ -0,0 +1,11 @@ +--- src/mspace.h.orig 2023-01-07 19:53:51 UTC ++++ src/mspace.h +@@ -9,7 +9,7 @@ extern "C" { + + //typedef unsigned long size_t; + typedef void (*mspace_abort_t)(void *user_data); +-typedef void (*mspace_print_t)(void *user_data, const char *format, ...) __attribute__((format(gnu_printf, 2, 3))); ++typedef void (*mspace_print_t)(void *user_data, const char *format, ...) __attribute__((__format__(__printf__, 2, 3))); + + void mspace_set_abort_func(mspace_abort_t f); + void mspace_set_print_func(mspace_print_t f); diff --git a/x11-drivers/xf86-video-qxl/files/patch-src-qxl_driver.c b/x11-drivers/xf86-video-qxl/files/patch-src-qxl_driver.c new file mode 100644 index 000000000000..1eecfe2c9cb7 --- /dev/null +++ b/x11-drivers/xf86-video-qxl/files/patch-src-qxl_driver.c @@ -0,0 +1,25 @@ +--- src/qxl_driver.c.orig 2016-12-19 17:25:56 UTC ++++ src/qxl_driver.c +@@ -807,8 +807,8 @@ qxl_screen_init (SCREEN_INIT_ARGS_DECL) + + CHECK_POINT (); + +- pScreen->width = pScrn->currentMode->HDisplay; +- pScreen->height = pScrn->currentMode->VDisplay; ++ pScreen->width = qxl->primary_mode.x_res; ++ pScreen->height = qxl->primary_mode.y_res; + + if (!xf86CrtcScreenInit (pScreen)) + return FALSE; +@@ -1005,6 +1005,11 @@ qxl_pre_init_common(ScrnInfoPtr pScrn) + get_bool_option (qxl->options, OPTION_DEBUG_RENDER_FALLBACKS, "QXL_DEBUG_RENDER_FALLBACKS"); + qxl->num_heads = + get_int_option (qxl->options, OPTION_NUM_HEADS, "QXL_NUM_HEADS"); ++ if (qxl->num_heads == 0) { ++ xf86DrvMsg (scrnIndex, X_INFO, "QXL_NUM_HEADS not configured, " ++ "defaulting to 1\n"); ++ qxl->num_heads = 1; ++ } + + qxl->deferred_fps = get_int_option(qxl->options, OPTION_SPICE_DEFERRED_FPS, "XSPICE_DEFERRED_FPS"); + if (qxl->deferred_fps > 0) diff --git a/x11-drivers/xf86-video-qxl/files/patch-src-qxl_option_helpers.c b/x11-drivers/xf86-video-qxl/files/patch-src-qxl_option_helpers.c new file mode 100644 index 000000000000..844ab5e0072c --- /dev/null +++ b/x11-drivers/xf86-video-qxl/files/patch-src-qxl_option_helpers.c @@ -0,0 +1,41 @@ +--- src/qxl_option_helpers.c.orig 2015-10-12 16:31:14 UTC ++++ src/qxl_option_helpers.c +@@ -10,31 +10,32 @@ + + #include "qxl_option_helpers.h" + +-int get_int_option(OptionInfoPtr options, int option_index, ++int get_int_option(OptionInfoPtr options, int token, + const char *env_name) + { ++ int value; + if (env_name && getenv(env_name)) { + return atoi(getenv(env_name)); + } +- return options[option_index].value.num; ++ return xf86GetOptValInteger(options, token, &value) ? value : 0; + } + +-const char *get_str_option(OptionInfoPtr options, int option_index, ++const char *get_str_option(OptionInfoPtr options, int token, + const char *env_name) + { + if (getenv(env_name)) { + return getenv(env_name); + } +- return options[option_index].value.str; ++ return xf86GetOptValString(options, token); + } + +-int get_bool_option(OptionInfoPtr options, int option_index, ++int get_bool_option(OptionInfoPtr options, int token, + const char *env_name) + { + const char* value = getenv(env_name); + + if (!value) { +- return options[option_index].value.bool; ++ return xf86ReturnOptValBool(options, token, FALSE); + } + if (strcmp(value, "0") == 0 || + strcasecmp(value, "off") == 0 || diff --git a/x11-drivers/xf86-video-qxl/files/patch-src-qxl_option_helpers.h b/x11-drivers/xf86-video-qxl/files/patch-src-qxl_option_helpers.h new file mode 100644 index 000000000000..7c4301816014 --- /dev/null +++ b/x11-drivers/xf86-video-qxl/files/patch-src-qxl_option_helpers.h @@ -0,0 +1,19 @@ +--- src/qxl_option_helpers.h.orig 2023-01-07 19:55:44 UTC ++++ src/qxl_option_helpers.h +@@ -6,13 +6,13 @@ + #include + #include + +-int get_int_option(OptionInfoPtr options, int option_index, ++int get_int_option(OptionInfoPtr options, int token, + const char *env_name); + +-const char *get_str_option(OptionInfoPtr options, int option_index, ++const char *get_str_option(OptionInfoPtr options, int token, + const char *env_name); + +-int get_bool_option(OptionInfoPtr options, int option_index, ++int get_bool_option(OptionInfoPtr options, int token, + const char *env_name); + + #endif // OPTION_HELPERS_H diff --git a/x11-drivers/xf86-video-qxl/files/patch-src-qxl_ums_mode.c b/x11-drivers/xf86-video-qxl/files/patch-src-qxl_ums_mode.c new file mode 100644 index 000000000000..1f3b15b63032 --- /dev/null +++ b/x11-drivers/xf86-video-qxl/files/patch-src-qxl_ums_mode.c @@ -0,0 +1,11 @@ +--- src/qxl_ums_mode.c.orig 2023-01-07 21:22:08 UTC ++++ src/qxl_ums_mode.c +@@ -65,7 +65,7 @@ qxl_add_mode (qxl_screen_t *qxl, ScrnInfoPtr pScrn, in + DisplayModePtr mode; + + mode = screen_create_mode (pScrn, width, height, type); +- qxl->x_modes = xf86ModesAdd (qxl->x_modes, mode); ++ pScrn->modes = qxl->x_modes = xf86ModesAdd (qxl->x_modes, mode); + + return mode; + } diff --git a/x11-drivers/xf86-video-qxl/pkg-descr b/x11-drivers/xf86-video-qxl/pkg-descr new file mode 100644 index 000000000000..005c4e802ea4 --- /dev/null +++ b/x11-drivers/xf86-video-qxl/pkg-descr @@ -0,0 +1,3 @@ +X.Org xf86-video-qxl driver, which supports the QXL virtual GPU +found in the RedHat Enterprise Virtualisation system, and also in +the spice project. diff --git a/x11-drivers/xf86-video-qxl/pkg-plist b/x11-drivers/xf86-video-qxl/pkg-plist new file mode 100644 index 000000000000..d6b0686ca6b0 --- /dev/null +++ b/x11-drivers/xf86-video-qxl/pkg-plist @@ -0,0 +1,5 @@ +lib/xorg/modules/drivers/spiceqxl_drv.so +lib/xorg/modules/drivers/qxl_drv.so +bin/Xspice +%%PORTDOCS%%%%DOCSDIR%%/spiceqxl.xorg.conf.example +@sample etc/X11/xorg.conf.d/spiceqxl.xorg.conf.example etc/X11/xorg.conf.d/spiceqxl.xorg.conf