From 56c4d68140af0b193d4cf2cb7aa19ab6600e4af4 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 3 Sep 2025 16:57:39 +0200 Subject: [PATCH] treewide: drop ScreenInfoPtr parameter from InitOutput() Nobody's using this pointer anymore, everybody's using the global screenInfo structure. Signed-off-by: Enrico Weigelt, metux IT consult --- dix/main.c | 2 +- dix/screenint_priv.h | 2 ++ doc/Xserver-spec.xml | 6 ++---- hw/kdrive/ephyr/ephyrinit.c | 2 +- hw/vfb/InitOutput.c | 2 +- hw/xfree86/common/xf86Init.c | 2 +- hw/xnest/Init.c | 2 +- hw/xquartz/darwin.c | 2 +- hw/xwin/InitOutput.c | 2 +- include/scrnintstr.h | 4 ---- 10 files changed, 11 insertions(+), 15 deletions(-) diff --git a/dix/main.c b/dix/main.c index 05173847d4..58769b8678 100644 --- a/dix/main.c +++ b/dix/main.c @@ -192,7 +192,7 @@ dix_main(int argc, char *argv[], char *envp[]) dixResetRegistry(); InitFonts(); InitCallbackManager(); - InitOutput(&screenInfo, argc, argv); + InitOutput(argc, argv); if (screenInfo.numScreens < 1) FatalError("no screens found"); diff --git a/dix/screenint_priv.h b/dix/screenint_priv.h index e0554ee4a6..77f327e1f7 100644 --- a/dix/screenint_priv.h +++ b/dix/screenint_priv.h @@ -24,6 +24,8 @@ void DetachUnboundGPU(ScreenPtr unbound); void AttachOffloadGPU(ScreenPtr pScreen, ScreenPtr newScreen); void DetachOffloadGPU(ScreenPtr slave); +void InitOutput(int argc, char **argv); + static inline ScreenPtr dixGetMasterScreen(void) { return screenInfo.screens[0]; } diff --git a/doc/Xserver-spec.xml b/doc/Xserver-spec.xml index e7e3ae3cab..cfe4affe73 100644 --- a/doc/Xserver-spec.xml +++ b/doc/Xserver-spec.xml @@ -1865,14 +1865,12 @@ insists that these must be the same for all screens on the server.
- InitOutput(pScreenInfo, argc, argv) - ScreenInfo *pScreenInfo; + InitOutput(argc, argv) int argc; char **argv;
Upon initialization, your DDX routine InitOutput() is called by DIX. -It is passed a pointer to screenInfo to initialize. It is also passed -the argc and argv from main() for your server for the command-line +It is passed the argc and argv from main() for your server for the command-line arguments. These arguments may indicate what or how many screen device(s) to use or in what way to use them. For instance, your server command line may allow a "-D" flag followed by the name of the diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index 556c7919d4..da78680d9c 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -63,7 +63,7 @@ InitCard(char *name) } void -InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) +InitOutput(int argc, char **argv) { KdInitOutput(argc, argv); } diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c index dad7a96472..076f2ec9ec 100644 --- a/hw/vfb/InitOutput.c +++ b/hw/vfb/InitOutput.c @@ -1046,7 +1046,7 @@ vfbScreenInit(ScreenPtr pScreen, int argc, char **argv) } /* end vfbScreenInit */ void -InitOutput(ScreenInfo *unused, int argc, char **argv) +InitOutput(int argc, char **argv) { int i; int NumFormats = 0; diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index f7abea45f7..893503a049 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -284,7 +284,7 @@ xf86EnsureRANDR(ScreenPtr pScreen) * collecting the pixmap formats. */ void -InitOutput(ScreenInfo *unused, int argc, char **argv) +InitOutput(int argc, char **argv) { int i, j, k, scr_index; const char **modulelist; diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index da9e8fdfd3..894f4fe5d1 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -65,7 +65,7 @@ Bool noGlxExtension = FALSE; #endif void -InitOutput(ScreenInfo * screen_info, int argc, char *argv[]) +InitOutput(int argc, char *argv[]) { int i; diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index 9cb138b375..77a3a49a48 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -636,7 +636,7 @@ void DarwinAdjustScreenOrigins(void) * SetupScreen function can be called to finalize screen setup. */ void -InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) +InitOutput(int argc, char **argv) { int i; diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 2ff3982971..d7470cc3b7 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -786,7 +786,7 @@ ddxUseMsg(void) */ void -InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[]) +InitOutput(int argc, char *argv[]) { int i; diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 216567d3d3..24e2cc8902 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -732,8 +732,4 @@ typedef struct _ScreenInfo { extern _X_EXPORT ScreenInfo screenInfo; -extern _X_EXPORT void InitOutput(ScreenInfo * /*pScreenInfo */ , - int /*argc */ , - char ** /*argv */ ); - #endif /* SCREENINTSTRUCT_H */