Commit Graph

2339 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
9678c60ad1 dix: deprecate GetFontPath()
The function isn't used anymore, but still part of SDK/ABI. And it shouldn't
be used by drivers, ever. Marking it as deprecated now, so we can remove it later.

(it's also not present in recent proprietary NVidia drivers, btw)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-05 08:44:49 +02:00
Enrico Weigelt, metux IT consult
f32d06a101 dix: drop obsolete SGenericReply()
Not used anywhere, neither exported, so no need to keep it around
any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 17:23:16 +02:00
Enrico Weigelt, metux IT consult
f6bd4ab3d3 dix: drop obsolete CopySwap16Write()
Not used anywhere, neither exported, so no need to keep it
around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-04 11:39:16 +02:00
Enrico Weigelt, metux IT consult
065f8d4d75 dix: unexport internal QueryFont() function
This function is internal to DIX (used for assembling XQueryFont replies
and not used by any drivers (not even proprietary NVidia), and really
shouldn't ever called by them at all. It's been one the many victims of a
really unthoughtful mass export back 17 years ago.

That'S a necessary step for refactoring the RPC reply mechanics.

Since it's never used by any driver at all, we can easily to this change
within the current ABI level.

Fixes: d6cbd4511e
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 09:31:44 +02:00
Enrico Weigelt, metux IT consult
7655ee2631 dix: drop unused CopySwap32Write()
Not used anywhere, neither exported, so no need to keep it
around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-03 09:29:35 +02:00
Enrico Weigelt, metux IT consult
ae4912f837 dix: drop obsolete Swap32Write()
Not used anywhere, neither exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-31 15:55:40 +02:00
Enrico Weigelt, metux IT consult
c3e83fa555 include: os.h: fix extra ;
Fix pedantic warnings:

> ../include/os.h:144:71: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
>   144 | XNFalloc(unsigned long /*amount */ ) __attribute__((returns_nonnull));;

> ../include/os.h:158:76: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
>   158 | XNFcallocarray(size_t nmemb, size_t size) __attribute__((returns_nonnull));;

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-29 15:52:49 +02:00
stefan11111
cef7cda851 include: modesetting: rename LIBDRM_PLANE_SIZE_HINTS to LIBDRM_HAS_PLANE_SIZE_HINTS
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-08-29 12:01:18 +02:00
notbabaisyou
e6c980f08e hw/modesetting: Fix up cursor size probing.
modesetting has a sort of broken concept of getting the cursor dimensions since 1f41320e1c, which causes issues on virtual machines and older AMD hardware. Our solution is to use SIZE_HINTS which is available in i915 since 2023 otherwise fallback to getting the cursor size provided by the driver, if a driver wants to have a more optimal cursor size, it is more than welcome to implement SIZE_HINTS in it's DRM interface.

Taken from my own fork of Xorg.

v2: Fix some bugs in the implemenation.
2025-08-28 16:56:25 +02:00
Oleh Nykyforchyn
3817846c6d xserver: hw/xfree86,include: add a missed ifdef
It is patch 1/7 of a series that provides a convenient way to specify
IgnoreABI and module search paths on a per-driver basis.

It adds #ifdef CONFIG_LEGACY_NVIDIA_PADDING wherever it should be but
is missed.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-08-24 12:40:19 +02:00
stefan11111
90846d49cc xfree86: add (optional) ScreenRec padding for legacy Nvidia driver
Commit 3cb3024fea removed pScratchPixmap field
in ScreenRec, which broke legacy Nvidia (proprietary) drivers (470.x), thus
we should add an empty/dummy field here, to ensure correct padding. But this
would break ABI again - can't do that within minor release line.

As compromise, adding a *build time* option CONFIG_LEGACY_NVIDIA_PADDING for
this, so operators/packagers can opt-in to this change.

As it breaks ABI, the option is disabled by default until the next major release
and intended for EXPERTS ONLY who need nvidia390 or nvidia470 drivers.

Note that ALL DRIVERS should be rebuild if it is applied!

This compile-time option, along with the hacks needed to support it
in a non-abi-breaking way, should be droppen in the next major release.

Co-authored-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 17:02:12 +02:00
Enrico Weigelt, metux IT consult
7c3ddc80ef dix: drop obsolete WriteSwappedDataToClient() macro
This macro isn't and shouldn't be used anymore, so get rid of it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 15:45:47 +02:00
Enrico Weigelt, metux IT consult
e93dd75dd8 dix: fix int type mismatch on CURSOR_REC_SIZE and CURSOR_BITS_SIZE
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-15 12:55:40 +02:00
Enrico Weigelt, metux IT consult
34c3a9c7e2 treewide: fix serverGeneration int type mismatch
The global (exported) serverGeneration field is `unsigned long`, while
many other places copy it and compare it two other integer types, eg.
plain `int` (which is signed). Even if it's unlikely ever reaching such
high number of generations that it will ever make trouble, it's still
a good idea to clean this up and use the same type everywhere.

For clearity, introducing a typedef `x_server_generation_t` which is
used everywhere, instead of raw `unsigned long`.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-13 11:52:03 +02:00
Enrico Weigelt, metux IT consult
8d2860fd35 include: regionstr.h: fix int type mismatch in RegionNumRects() and RegionSize()
Fix compiler warnings by explicit type casts.

In this case, we know that those values can't be bigger than int can take,
neither become negative.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 20:13:01 +02:00
Enrico Weigelt, metux IT consult
566f961fd4 dix: fix int-type mismatches related to dixClientIdForXID()
The client index (in the client table) can never be negative, thus
make it an unsigned short.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-11 13:02:14 +02:00
b-aaz
6574903366 include: meson.build: Fixed broken dependency on epoll-shim on FreeBSD.
The epoll-shim dependency did not get detected on FreeBSD,
because of missing prefix and dependency arguments in has_function()
call in include/meson.build.
Also added the path of epoll-shim headers include directory
(/usr/local/include/libepoll-shim/) to the compiler include search
paths for proper detection and build.

Signed-off-by: b-aaz <b-aazbsd@proton.me>
2025-08-05 14:04:05 +02:00
Enrico Weigelt, metux IT consult
bbabd96e6c meson: rename symbol MITSHM to CONFIG_MITSHM
some bit better naming for config symbols.
Yet leaving the old one defined, until all drivers have kept up.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 11:39:28 +02:00
Enrico Weigelt, metux IT consult
c25a0a533e glx: fix duplicate typedef
../glx/indirect_table.c
  In file included from ../glx/indirect_table.c:28:
  In file included from ../glx/glxserver.h:66:
  ../include/glx_extinit.h:33:28: warning: redefinition of typedef '__GLXscreen' is a C11 feature [-Wtypedef-redefinition]
     33 | typedef struct __GLXscreen __GLXscreen;
        |                            ^
  ../glx/glxscreens.h:113:28: note: previous definition is here
    113 | typedef struct __GLXscreen __GLXscreen;
        |                            ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-05 10:18:19 +02:00
Enrico Weigelt, metux IT consult
967ae609b6 dix: drop DDXBEFORERESET symbol
Reduce complexity for things that really don't matter much:

The ddxBeforeReset() function is called when the Xserver going to reset
(new server generation). Right now, the only DDX really needing that is
Xwin, on all the others it's just no-op.

We've got an extra complicated build logic, which ifdef's out this all when
Xwin isn't built at all. The saving is extremely minimal - just skipping
few stub functions, which in most sessions aren't even called.

Therefore, get rid of this extra complexity that isn't giving us any
notable gain.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-04 11:41:48 +02:00
Enrico Weigelt, metux IT consult
9986e17950 meson: move MAXCLIENTS and LIMITCLIENTS into dix-config.h
Both are potentially tunable variables, and MAXCLIENTS is (still) used by
intel-driver, but also by os specific parts that must not include misc.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-30 14:55:40 +02:00
Enrico Weigelt, metux IT consult
2bee97548e os: move X_NOTIFY_* defines to separate header
These defines are already public, used by consumers of SetNotifyFd(),
but also needed in places where os.h cannot be included.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-25 15:21:13 +02:00
Enrico Weigelt, metux IT consult
731ace6c13 dix: ProcGetMotionEvents(): simplify writing out xTimecoord
The swapping is so trivial, we don't need several extra functions
for that - just do it right where the header fields are swapped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-24 11:57:19 +02:00
Enrico Weigelt, metux IT consult
dcf7890076 Xace: always build xace
Xace callbacks are needed in many places, and the their overhead (when not
actually used) is really minimal. So it doesn't make much sense having
extra complexity for disabling it at build time.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-24 10:49:54 +02:00
Enrico Weigelt, metux IT consult
8d9d37935f include: dix.h: drop NullClient macro
Not used anymore, and not part of ABI.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 22:24:55 +02:00
Enrico Weigelt, metux IT consult
e3acb2454c include: drop obsolete WriteReplyToClient() macro
Not used anymore, and not part of ABI, so no need to keep it around
any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 05:25:56 +02:00
Enrico Weigelt, metux IT consult
030745a0e7 dix: move inpututils.h and rename it to inpututil_privs.h
it's a private header, thus should not be in public include directory.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 04:51:30 +02:00
Enrico Weigelt, metux IT consult
ce89617074 os: move probes.h and rename it to probes_priv.h
Private headers should not be in public include directory.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 04:51:30 +02:00
Enrico Weigelt, metux IT consult
56650ba873 dix: add screen hook for post-close
In contrast to the already existing ScreenClose hook, this one is
called *after* the driver's CloseScreen() proc. That's required for
some extensions (eg. damage) where drivers still need to call in
inside of their CloseScreen procs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-02 15:41:37 +02:00
Mike Gelfand
f5e00916aa include: add/fix include guards where missing/broken
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:58:05 +02:00
Enrico Weigelt, metux IT consult
fe4bc433a4 sdk: reinstate COMPOSITE symbol
Composite extension is always enabled for pretty long time now, but some
drivers (eg. xf86-video-intel) still relying on this symbol being set,
otherwise assuming to run w/o composite and doing crazy things.

Fixes: d708b28adc
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-19 11:21:31 +02:00
Enrico Weigelt, metux IT consult
c8b81fdbc5 drop Xwayland
It always had it's own lifecycle (not been part of Xorg releases),
doesn't make sense to maintain a competing implementation that we
won't use anyways.

Once that's gone, we can also drop few things in core/dix that had
been added just for xwayland only.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-17 12:51:36 +02:00
dasha_uwu
1489474583 dix: remove unused NAMESPACE private type
in struct _Screen (include/scrnintstr.h) there is a PRIVATE_LAST-sized array,
having another private increases PRIVATE_LAST, the array increases in size,
moving everything below it down. this breaks ABI for nvidia driver

Signed-off-by: dasha_uwu <dasha@linuxping.win>
2025-06-16 10:32:48 +02:00
Enrico Weigelt, metux IT consult
9f8ef921ad Xnamespace: add basic namespace config structures
Adding data structure and initial data for namespace configuration.

Built-in namespaces are ROOT and ANONYMOUS.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult
4379f7cc87 Xnamespace: namespace extension skeleton
Add tiny skeleton for the namespace extension. Disabled by default,
can be enabled via +extension arg, but doesn't actually do something yet.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult
349d13961d include: list.h: add duplicate checking add/append functions
Simplify cases where callers need to check whether an entry already is
in a list before adding / appending.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult
536c3c7765 include: list.h: add xorg_list_present()
This function walks through the list and checks whether an entry is already
present. This check sometimes is neccessary, since trying to add an entry
twice has catastrophic consequences: iteration will become endless loop.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult
9461072ab4 include: list.h: allow zero-initialization of struct xorg_list
Up until now, xorg_list's always need to be explicitly initialized by
calling xorg_list_init(), otherwise next access attempt will segfault.
This is adding extra complexity and risk of subtle bugs.

Adding some extra NULL check are trivial and their cost is so tiny
that it's even hard to practically measure.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult
74766ee6bd include: list.h: document things that must not be done
Add some warnings that list entries must not be added twice.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult
fc428a78a2 include: list.h: fix inline docs for xorg_list_append()
The docs stated it's prepending, while it's actually appending.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult
e6467895f9 dix: add dixAllocServerXID()
Adding a separate function for allocating server-client's XIDs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult
8966b04224 dix: unexport MakeWindowOptional()
Really internal, should not be used by drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult
d5dc80aebe xkb: unexport XkbRF_VarDefsRec struct
No used outside of xkb, so no need to keep it in public API header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:47 +02:00
Enrico Weigelt, metux IT consult
14e0b1715b dix: unexport ResizeVisualArray()
Not used by any drivers, and shouldn't be used by them.
Needs to _X_EXPORT'ed, as long as glx is a separate module.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:46 +02:00
Enrico Weigelt, metux IT consult
b04aeed760 Xi: unexport AssignTypeAndName()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:46 +02:00
Enrico Weigelt, metux IT consult
5c0cbd0f92 os: drop own implementation of strcasecmp() and strncasecmp()
These are POSIX standard since 2001, so shouldn't be needed anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:46 +02:00
Enrico Weigelt, metux IT consult
945edb0186 meson.build: move writing conf_data into tail of main meson file
This allows us to do further probing in the included meson files:
Individual subdirectories (eg. DDXes, extensions, OS layer, ...)
can now probe things that are only relevant to them - no need to fill
the already too fat includes/meson.build with even more things.

Preparation for upcoming commits that'll make us of that.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:46 +02:00
Enrico Weigelt, metux IT consult
7c51bcb093 os: unexport internal logging functions
Lots of logging functions, especially init and teardown aren't called
by any drivers/modules, so no need to keep them exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:46 +02:00
Enrico Weigelt, metux IT consult
9a82f5c30b drop remains of cygwin support
Cygwin support doesn't seem to be used anymore, so it can be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:46 +02:00
Enrico Weigelt, metux IT consult
9741f0a256 move systemd-logind.h to hw/xfree86/os-support/linux
systemd is linux specific and the actual implementation is under the
os-support layer of xfree86 ddx. Thus no need to keep it in global
include directory, putting it onto the linux specific os-support instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:46 +02:00