Commit Graph

10332 Commits

Author SHA1 Message Date
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
stefan11111
5acd66c8ee modesetting: Port backing bo the the gbm wrapper
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
12eceb7999 modesetting: Use gbm for probing the depth and bpp of the primary plane
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
26f2887008 modsetting: Port the cursor bo's to the gbm bo wrapper
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
26aa7c0d7e modesetting: Port drmmode_create_front_bo to the new gbm bo wrapper
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
a1872f51fb modesetting: Add infrastructure for creating and mapping gbm bo's
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
55eba2385c modesetting: Create a gbm device even without glamor
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
stefan11111
8be62ebcae modesetting: strip some trailing whitespaces
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-09 14:19:16 +01:00
Enrico Weigelt, metux IT consult
571be2f014 Xext: vidmode: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-06 12:03:08 +01:00
stefan11111
2e31b2fdc0 modesetting: Check for unaligned pixmaps in modesetting's check_flip2 proc
If we do this in the generic present `check_flip`, we would have to
do it before we call the driver's `check_flip`.
This means that we wouldn't get a reason for the flip failure,
which we still need to report if we are in the middle of a flip.

Thanks to @nkalkhof For helping bisect this in
https://github.com/X11Libre/xserver/issues/1812

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-06 12:03:01 +01:00
stefan11111
1762a02331 modesetting/present.c: Initialze '*reason' in the check_flip2 proc
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-06 12:03:01 +01:00
Enrico Weigelt, metux IT consult
54993683d2 xquartz: drop ifdef DAMAGE
It's always set anyways and planned to be removed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-05 11:58:11 +01:00
stefan11111
a7454facc6 modesetting: Don't rely on gl for setting the cursor mask interleave
If glamor isn't used, gl isn't initialized.
This can lead to the wrong cursor mask interleave value to be used.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-02-04 19:32:36 +01:00
Enrico Weigelt, metux IT consult
d05e018a59 xfree86: xlibre-server.h: announce new EDID parsing feature
Adding a #define in xlibre-server.h that drivers can #ifdef on,
in order to check for the new EDID parsing API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-04 17:25:13 +01:00
Enrico Weigelt, metux IT consult
e8ec547b93 xfree86: vgahw: rename scrninfp to pScrnInfo
Improve naming consisency.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-03 17:16:17 +01:00
Enrico Weigelt, metux IT consult
3cb0735a48 xfree86: ddc: new entry point for EDID parsing
The old ones didn't know the block size, so couldn't deduce the block
type version. With upcoming new features, eg. HDR, we need to know the
block type version in order to know what we can extract from it.

This new function should now be used by all drivers, the old ones shall
be phased out.

That commit should be backported to 25.0 and 25.1 releases, so drivers
can remain compatible with all existing release lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-03 16:57:02 +01:00
Enrico Weigelt, metux IT consult
25290ac9ee xfree86: ddc: simplify xf86InterpretEDID()
It's doing nothing but calling xf86InterpretEDID().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-03 16:40:18 +01:00
Enrico Weigelt, metux IT consult
847788ba72 Xnest: drop support for "full regeneration"
This is (rarely used) special mode where, at server regeneration
(when last client exited), Xnest is additionally terminating and
restarting it's upstream connection, thus also recreating it's
main window, etc.

That mode is only meant for special debug scenarios, not suited for
practical use. And the same can be achieved by just terminating the
whole Xnest process (-terminate cmdline arg) and restrting it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-03 15:46:18 +01:00
Enrico Weigelt, metux IT consult
4642d6207f os: unexport SeatId and move it to dix settings
Not used by any external module/driver, so no need to keep it
public. Also move it to the new dix settings code and rename it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-03 11:34:14 +01:00