10400 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
a67c578486 xwin: replace putenv() by setenv()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-11 19:00:50 +01:00
Enrico Weigelt, metux IT consult
482a11238f xquartz: dont include dix-config.h in other headers
dix-config.h needs to be included at the very top of all sources,
but it shouldn't be included from other headers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-11 17:04:55 +01:00
Enrico Weigelt, metux IT consult
bf107bc06b xwin: drop obsolete HAVE_XWIN_CONFIG_H
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-11 16:34:22 +01:00
Enrico Weigelt, metux IT consult
daefb2a3ad xwin: win.h: document purpose of NONAMELESSUNION
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-11 15:59:42 +01:00
Enrico Weigelt, metux IT consult
0b436c1ef1 xwin: drop DUMMYUNIONNAME*
No need for weird hacks trying create nameless unions (which aren't
even done consequently), just give them trivial names and done.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-11 15:59:42 +01:00
Enrico Weigelt, metux IT consult
95b6716b6c xwin: winprefs: use safer setenv() instead of putenv()
putenv() is deprecated due several drawbacks: the passed buffer becomes
part of the environment (not copied), thus the caller needs to allocate
a permanent buffer first - and has no way to know whether it might
become used later. And it has to fill in the new entry in the correct
form (<name>+"="+<value>)

setenv() instead is damn simple: pass env variable name and value
separately, and no need to care what's going on under the hood.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-11 14:46:50 +01:00
Enrico Weigelt, metux IT consult
3ea028279a xwin: drop useless including of mman.h
We don't use mmap() anyhwere, so no need for that include.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-11 13:03:57 +01:00
Enrico Weigelt, metux IT consult
14f03de002 xwin: move winsock specific errno checks into ossock
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-11 12:02:44 +01:00
Enrico Weigelt, metux IT consult
9633c44154 xfree86: modes: fix unhandled retval of asprintf()
Compiler complains that return value isn't handled and breaks
the build.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-10 20:10:18 +01:00
Enrico Weigelt, metux IT consult
f78a15531c xfree86: modes: replace XNFasprintf() by standard libc asprintf()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-10 18:58:45 +01:00
Enrico Weigelt, metux IT consult
fc0525f9d3 xquartz: drop support for internal server reset
Not needed anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-10 18:54:29 +01:00
Enrico Weigelt, metux IT consult
62b0add858 mi: move ValidateRec to mi_priv.h and rename to MiValidateRec
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-10 18:27:41 +01:00
Enrico Weigelt, metux IT consult
56b683cd4e kdrive: replace DDXPoint by xPoint
DDXPoint is just an alias to xPoint

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-10 16:00:33 +01:00
Enrico Weigelt, metux IT consult
967e18c987 xquartz: replace DDXPoint by xPoint
DDXPoint is just an alias to xPoint

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-10 16:00:19 +01:00
Enrico Weigelt, metux IT consult
b7e1858e4f xwin: replace DDXPoint by xPoint
DDXPoint is just an alias to xPoint

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-10 15:59:35 +01:00
Enrico Weigelt, metux IT consult
e134e4d7fd xfree: replace DDXPoint by xPoint
DDXPoint is just an alias to xPoint

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-10 15:59:27 +01:00
Enrico Weigelt, metux IT consult
bfa074f066 xwin: drop dead XWIN_XF86CONFIG code pathes
These never seemed to be actually active, ever. Since nobody ever seemed
to have an actual desire to use an xf86-style config file for Xwin,
let's just drop all that ancient dead code.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-10 13:24:19 +01:00
Enrico Weigelt, metux IT consult
e835d2a000 xwin: glx: fix VLA issue
We don't wanna use VLAs, because they're inherently unsafe.
Since the values[] array can never be bigger than attrs,
just use attr's size here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-10 11:47:39 +01:00
stefan11111
4060cd7d59 kdrive/fbdev: Use ARRAY_SIZE from dix.h
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
34d16e48d4 kdrive/fbdev: Use bool instead of Bool
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
c4037d0518 kdrive/fbdev: Call fbdev_glamor_egl_chose_configs from fbdev_glamor_egl_create_context
We only need the config attribute list from the caller,
we can chose the configs and free them ourselves

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
4a9da08a99 kdrive/fbdev: simplify fbdev_glamor_egl_chose_configs
Now that we're first trying no-config contexts,
there is no need to inject an `EGL_NO_CONFIG_KHR`
as the first config in the returned list

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
446485991d kdrive/fbdev: Try creating a no-config egl context first, and skip config chosing
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
29f75ea334 kdrive/fbdev: Get glamor working with the nvidia 390 driver
Only the render acceleation and xv work for some reason.
glx only wants to create indirect contexts, which don't work.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
d65cabb1d3 kdrive/fbdev: Get glamor working with the nvidia 470 driver
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
5adae6c3b3 kdrive/fbdev: Don't try to accelerate rendering with glamor with a sw driver
It will likely be slower that unaccelerated rendering.
Command-line flags were added for overriding this.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
f3c5b41161 kdrive/fbdev: Set glvnd vendor automatically
This makes glamor hw accel work out of the box

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
49800f024d kdrive/fbdev/fb_glamor.c: Check for egl extensions properly
See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14715

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
1f89bcfbdc kdrive/fbdev: Prefer exact GL vendor match when choosing EGLDevices
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
125b7c5bef kdrive/fbdev/fb_glamor.c: Prefix glamor helpers with fbdev_
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
657eb49b85 kdrive/fbdev: Enable X-Video support if available
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
2a898cbaf1 kdrive: Pull ephyr/ephyr_glamor_xv.c into src/ and make generic
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
c4b070319b kdrive/fbdev: Set glvnd vendor with glamor_set_glvnd_vendor
This makes it so that glamor glx can properly initialize and
choose hw accelerated `FBConfig`s, instead of just using softpipe/llvmpipe.

This commit fixes the issue described in https://github.com/X11Libre/xserver/pull/1832#issue-3827524680

Now, `FBConfig`s corresponding to the choosen accelerated `EGLDevice`
are choosen by `glXChooseFBConfig`.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
069fc8f6bb kdrive/fbdev: Uncouple glamor from glx
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
04a30c2719 kdrive/fbdev: Allow forcing glamor to create GL/GLES contexts only
This brings Xfbdev's glamor code in line with glamor/glamor_egl.c

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 19:27:22 +01:00
stefan11111
e30646b37d modesetting: Use more conservative cursor bo flags
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
79aeab95d8 modesetting: drop extra newline
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
531ca18467 modesetting: drop unused enum constant
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
b7bf58922f modesetting: Check for GLAMOR instead of GLAMOR_HAS_GBM
Now gbm required for the modesetting driver.
`GLAMOR_HAS_GBM` is defined even if glamor isn't built.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
0a2568ab3a treewide: Update meson.builds for the changes in the modesetting driver
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
0ac903f4b9 modesetting: Fail in ScreenInit if we can't get a gbm device
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
0de74bf2e9 modesetting: Simplify shadow functions
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
f06d370c70 modesetting: Fully port away from drmmode_bo
There are still things to simplify and fix

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
119ef93615 modesetting: Remove out in-tree dumb buffer implementation
Since libgbm was split from mesa, and a backend that works
with only dumb buffers was written, there is no reason why we
should roll out own dumb buffer implementation.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
f9589b3c3c Further port away from drmmode_bo
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
4e7201796c modesetting: Further port away from drmmode_bo
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
615ca5fd3c modesetting: Further port away from drmmode_bo
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
99dc40ff07 modesetting: fully port drmmode_bo_import to gbm
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
501b60f1d5 modesetting: move drmmode_bo_import to drmmode_bo.c
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
466ec86669 modesetting: Create only gbm front bo's
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00