Skip to content

Commit 7247831

Browse files
committed
x11-drivers/xf86-video-qxl: Resurrect xf86-video-qxl, driver for QXL GPU
1 parent cf16b1c commit 7247831

12 files changed

Lines changed: 168 additions & 1 deletion

MOVED

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15488,7 +15488,6 @@ www/waccess||2020-09-19|Has expired: Uses deprecated version of python
1548815488
www/wadcomblog||2020-09-19|Has expired: Uses deprecated version of python
1548915489
www/webcheck||2020-09-19|Has expired: Uses deprecated version of python
1549015490
www/woof||2020-09-19|Has expired: Uses deprecated version of python
15491-
x11-drivers/xf86-video-qxl||2020-09-19|Has expired: uses deprecated version of python
1549215491
x11-fm/twander||2020-09-19|Has expired: Uses deprecated version of python
1549315492
x11-wm/compizconfig-python||2020-09-19|Has expired: Uses deprecated version of python
1549415493
x11-wm/fvwm-crystal||2020-09-19|Has expired: Uses deprecated version of python

x11-drivers/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
SUBDIR += xf86-video-neomagic
2929
SUBDIR += xf86-video-nv
3030
SUBDIR += xf86-video-openchrome
31+
SUBDIR += xf86-video-qxl
3132
SUBDIR += xf86-video-r128
3233
SUBDIR += xf86-video-rendition
3334
SUBDIR += xf86-video-savage
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
PORTNAME= xf86-video-qxl
2+
DISTVERSION= 0.1.5
3+
PORTREVISION= 5
4+
CATEGORIES= x11-drivers
5+
6+
MAINTAINER= hrs@FreeBSD.org
7+
COMMENT= X.Org X server -- QXL display driver
8+
WWW= https://www.x.org/
9+
10+
LICENSE= MIT
11+
12+
BUILD_DEPENDS= spice-protocol>=0.12.10:devel/spice-protocol \
13+
${LOCALBASE}/include/linux/input.h:devel/evdev-proto
14+
LIB_DEPENDS= libspice-server.so:devel/libspice-server \
15+
libudev.so:devel/libudev-devd
16+
17+
USES= localbase:ldflags pkgconfig python shebangfix xorg \
18+
xorg-cat:driver
19+
USE_XORG= xfont2
20+
21+
CONFIGURE_ARGS+=--enable-xspice
22+
23+
python_OLD_CMD= /usr/bin/python
24+
SHEBANG_FILES= scripts/Xspice
25+
26+
OPTIONS_DEFINE= DOCS
27+
28+
pre-install:
29+
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d
30+
31+
post-install:
32+
${INSTALL_DATA} ${WRKSRC}/examples/spiceqxl.xorg.conf.example \
33+
${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d/spiceqxl.xorg.conf.example
34+
35+
.include <bsd.port.mk>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
TIMESTAMP = 1514372367
2+
SHA256 (xorg/driver/xf86-video-qxl-0.1.5.tar.bz2) = b18682e04503c6326f7bf7190f3ee50a3d4d69758a2a3cc9af102a6b3f114c92
3+
SIZE (xorg/driver/xf86-video-qxl-0.1.5.tar.bz2) = 508266
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- src/spiceqxl_audio.c.bak 2017-09-12 12:00:11 UTC
2+
+++ src/spiceqxl_audio.c
3+
@@ -410,7 +410,10 @@
4+
strcat(fname, "/");
5+
strcat(fname, e->name);
6+
7+
- f->fd = open(fname, O_RDONLY | O_RSYNC | O_NONBLOCK);
8+
+// f->fd = open(fname, O_RDONLY | O_RSYNC | O_NONBLOCK);
9+
+ // POSIX specifies three different flavors for synchronous I/O: O_SYNC, O_DSYNC, and O_RSYNC.
10+
+ // In BSD, these are all equivalent.
11+
+ f->fd = open(fname, O_RDONLY | O_SYNC | O_NONBLOCK);
12+
free(fname);
13+
if (f->fd < 0) {
14+
ErrorF("playback: open FIFO '%s' failed: %s\n", e->name, strerror(errno));
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- src/mspace.h.orig 2023-01-07 19:53:51 UTC
2+
+++ src/mspace.h
3+
@@ -9,7 +9,7 @@ extern "C" {
4+
5+
//typedef unsigned long size_t;
6+
typedef void (*mspace_abort_t)(void *user_data);
7+
-typedef void (*mspace_print_t)(void *user_data, const char *format, ...) __attribute__((format(gnu_printf, 2, 3)));
8+
+typedef void (*mspace_print_t)(void *user_data, const char *format, ...) __attribute__((__format__(__printf__, 2, 3)));
9+
10+
void mspace_set_abort_func(mspace_abort_t f);
11+
void mspace_set_print_func(mspace_print_t f);
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
--- src/qxl_driver.c.orig 2016-12-19 17:25:56 UTC
2+
+++ src/qxl_driver.c
3+
@@ -807,8 +807,8 @@ qxl_screen_init (SCREEN_INIT_ARGS_DECL)
4+
5+
CHECK_POINT ();
6+
7+
- pScreen->width = pScrn->currentMode->HDisplay;
8+
- pScreen->height = pScrn->currentMode->VDisplay;
9+
+ pScreen->width = qxl->primary_mode.x_res;
10+
+ pScreen->height = qxl->primary_mode.y_res;
11+
12+
if (!xf86CrtcScreenInit (pScreen))
13+
return FALSE;
14+
@@ -1005,6 +1005,11 @@ qxl_pre_init_common(ScrnInfoPtr pScrn)
15+
get_bool_option (qxl->options, OPTION_DEBUG_RENDER_FALLBACKS, "QXL_DEBUG_RENDER_FALLBACKS");
16+
qxl->num_heads =
17+
get_int_option (qxl->options, OPTION_NUM_HEADS, "QXL_NUM_HEADS");
18+
+ if (qxl->num_heads == 0) {
19+
+ xf86DrvMsg (scrnIndex, X_INFO, "QXL_NUM_HEADS not configured, "
20+
+ "defaulting to 1\n");
21+
+ qxl->num_heads = 1;
22+
+ }
23+
24+
qxl->deferred_fps = get_int_option(qxl->options, OPTION_SPICE_DEFERRED_FPS, "XSPICE_DEFERRED_FPS");
25+
if (qxl->deferred_fps > 0)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
--- src/qxl_option_helpers.c.orig 2015-10-12 16:31:14 UTC
2+
+++ src/qxl_option_helpers.c
3+
@@ -10,31 +10,32 @@
4+
5+
#include "qxl_option_helpers.h"
6+
7+
-int get_int_option(OptionInfoPtr options, int option_index,
8+
+int get_int_option(OptionInfoPtr options, int token,
9+
const char *env_name)
10+
{
11+
+ int value;
12+
if (env_name && getenv(env_name)) {
13+
return atoi(getenv(env_name));
14+
}
15+
- return options[option_index].value.num;
16+
+ return xf86GetOptValInteger(options, token, &value) ? value : 0;
17+
}
18+
19+
-const char *get_str_option(OptionInfoPtr options, int option_index,
20+
+const char *get_str_option(OptionInfoPtr options, int token,
21+
const char *env_name)
22+
{
23+
if (getenv(env_name)) {
24+
return getenv(env_name);
25+
}
26+
- return options[option_index].value.str;
27+
+ return xf86GetOptValString(options, token);
28+
}
29+
30+
-int get_bool_option(OptionInfoPtr options, int option_index,
31+
+int get_bool_option(OptionInfoPtr options, int token,
32+
const char *env_name)
33+
{
34+
const char* value = getenv(env_name);
35+
36+
if (!value) {
37+
- return options[option_index].value.bool;
38+
+ return xf86ReturnOptValBool(options, token, FALSE);
39+
}
40+
if (strcmp(value, "0") == 0 ||
41+
strcasecmp(value, "off") == 0 ||
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--- src/qxl_option_helpers.h.orig 2023-01-07 19:55:44 UTC
2+
+++ src/qxl_option_helpers.h
3+
@@ -6,13 +6,13 @@
4+
#include <xf86Crtc.h>
5+
#include <xf86Opt.h>
6+
7+
-int get_int_option(OptionInfoPtr options, int option_index,
8+
+int get_int_option(OptionInfoPtr options, int token,
9+
const char *env_name);
10+
11+
-const char *get_str_option(OptionInfoPtr options, int option_index,
12+
+const char *get_str_option(OptionInfoPtr options, int token,
13+
const char *env_name);
14+
15+
-int get_bool_option(OptionInfoPtr options, int option_index,
16+
+int get_bool_option(OptionInfoPtr options, int token,
17+
const char *env_name);
18+
19+
#endif // OPTION_HELPERS_H
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- src/qxl_ums_mode.c.orig 2023-01-07 21:22:08 UTC
2+
+++ src/qxl_ums_mode.c
3+
@@ -65,7 +65,7 @@ qxl_add_mode (qxl_screen_t *qxl, ScrnInfoPtr pScrn, in
4+
DisplayModePtr mode;
5+
6+
mode = screen_create_mode (pScrn, width, height, type);
7+
- qxl->x_modes = xf86ModesAdd (qxl->x_modes, mode);
8+
+ pScrn->modes = qxl->x_modes = xf86ModesAdd (qxl->x_modes, mode);
9+
10+
return mode;
11+
}

0 commit comments

Comments
 (0)