Since we're always terminating now, everbody can call UnlockServer()
directly, so we don't need that extra function anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Not used by any driver (not even by xf86 at all), so no need to
keep it exported. Also disposing the now empty nonsdk_extinit.h,
which also isn't used by any drivers.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
ScreenSaverStuffRec is defined in scrnintstr.h, and users of
ScreenSaverStuffPtr already including it, so let's move also this
typedef there.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Not that the entries cannot change anymore, there's no need for having
a separate call table anymore - simply use switch/case.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Drop the -reset flag, so Xserver now either simply continues (w/o going
through internal reset) when last client disconnected or terminates
when -terminate is given.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Turns out that glx does need this one.
Assuming no external modules need this,
it should be fine to keep this in a private header.
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
They aren't used anymore since about two decades, so no need to
keep them around any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Also renamed `drmmode_create_bo` to `drmmode_create_front_bo`,
better reflecting how it is used.
According to the mesa docs: https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/gbm/main/gbm.h :
```
/**
* The buffer will be used for front buffer rendering. On some
* platforms this may (for example) disable framebuffer compression
* to avoid problems with compression flags data being out of sync
* with pixel data.
*/
GBM_BO_USE_FRONT_RENDERING = (1 << 6),
```
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
They're only used inside os/connection.c, so no need to have them
in some header and expose them to other areas.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Now that we don't have any SProc*'s anymore (everything now done by the
corresponding Proc*'s), there's no need for SProcRenderDispatch() entry
point and the SProcRenderVector[] call table anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Move this to a little function (which also has a better name now)
inside the already platform specific ossock.c
Also removing the EMSGSIZE check: we're using TCP or local unix
socket, so EMSGSIZE is never returned.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
It's just a tuning parameter (that nobody touched for aeons) for
DoGetImage(), inside dix/dispatch.c
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
No need for carrying around our own (incomplete) implementation
of a standard libc function.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
When dmabuf_capable is enabled, ms_present_check_unflip may return
with reason PRESENT_FLIP_REASON_BUFFER_FORMAT to be reported back
to client by PresentCompleteModeSuboptimalCopy. We should not
overwrite it by page flip reasons anyway when exit.
This fix also avoid changing vblank->exec_msc in present_scmd_pixmap()
which caused by page flip reasons to prevent a present to be executed
immediatly. So that we can cancel pending vblanks when new vblanks with
same msc arrive. This happens when application just starts.
This problem can be observed at least using radeonsi OGL driver, start
xserver with dmabuf_capable enabled, no window manager, glxgears will
stuck for the first several seconds. If using a composite window manager
like Mutter, we can't observe the glxgears stuck, but the prensent
complete event still shows unexpected Copy mode instead of
PresentCompleteModeSuboptimalCopy or Skip mode.
glxgears window msc is 0 at the beginning, it will send present request
with target msc = 1, 2, 3, ... N before server send back the complete
event for target msc = 1. But server side window msc is way bigger than N,
so it will think all these present requests are outdated and just show the
Nth request at the next vblank. [1 .. N-1] requests should be skipped.
But without this fix, all [1 .. N] presents will be executed with Copy
mode which causes stuck.
Fixes: a94dd953 ("modesetting: add support for TearFree page flips")
Previously it was possible for the invalid modifier to be placed in the IN_FORMATS or IN_FORMATS_ASYNC arrays, this is of course not wanted as this can cause problems with devices that lack support for explicit modifiers.