Cache the screen pointer in local variable, instead of fetching it
from global array several times. Follow-up commits will use some
inline helper for that.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
These are just used locally and always assigned at loop body start,
so it's cleaner to declare them locally inside the loop body.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Bug slipped through: we have to substract the coordinates from the walked
screen to the current one, instead of the walked one from itself :o
Fixes: 97d72431cf
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
The PixmapRec is already calloc()'ed, so no need for additional zero-writes
into individual fields. This also removes some unncessary #ifdefs.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Forgotten to remove an obsolete comment when ancient DGA-1.0 was removed.
Fixes: 4615067264
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This is a relic from the 90s, giving really unsafe direct framebuffer
acccess. The very few known clients ever using this already been ported
to DGA 2.0 decades ago. The code is heavily tied to 32 bit architectures
anyways, so unlikely to even work on non-acient hardware.
So, without any clients left, there's no need to keep, let alone (try to)
repair that old cruft.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
They are all disabled for now, build options for enabling them
will be added when Xfbdev is added.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
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.
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>
The keyboard input driver that will be added to kdrive
only works with old SIGIO code, and doesn't work with
the new threaded input that kdrive uses.
All the code is behind #if's that are never satisfied,
so this commit has no functional changes.
In preparation for adding the Xfbdev X11 kdrive server.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
The keyboard input driver that will be added to kdrive
only works with old SIGIO code, and doesn't work with
the new threaded input that kdrive uses.
All the code is behind #if's that are never satisfied,
so this commit has no functional changes.
In preparation for adding the Xfbdev X11 kdrive server.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
All the code if behind #if's that are never satisfied,
so this commit has no functional changes.
In preparation for adding the Xfbdev X11 kdrive server.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Add definitions for the forward declarations from the previous commit
In preparation for adding the Xfbdev X11 kdrive server
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
There are some forward declarations with no definitions in kdrive.h
This doesn't cause a problem right now and makes it easier
to break up the large Xfbdev pr.
In preparation for adding the Xfbdev X11 kdrive server
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
In preparation for adding the Xfbdev X11 kdrive server
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
and new versions of the proprietary nvidia DDX driver
The 470 driver expects older abi, while the 570 driver
uses different code at runtime depending of the abi version.
This commit tells the new nvdia driver to use the older
abi that the 470 driver expects.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
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>
Add and use macro X_REPLY_HEADER_UNITS() for computing how many
extra protocol units are needed for a reply header (for .length field)
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When iterating screen lists, consistently use the same variable name
`walkScreen` for holding current screen pointer everywhere.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
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>