xserver: Branch 'master' - 10 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Feb 6 23:56:13 UTC 2025
hw/xfree86/common/xf86.h | 6 --
hw/xfree86/common/xf86AutoConfig.c | 2
hw/xfree86/common/xf86Bus.c | 2
hw/xfree86/common/xf86Config.c | 3 -
hw/xfree86/common/xf86Configure.c | 3 -
hw/xfree86/common/xf86DPMS.c | 2
hw/xfree86/common/xf86Events.c | 2
hw/xfree86/common/xf86Helper.c | 2
hw/xfree86/common/xf86Init.c | 1
hw/xfree86/common/xf86PM.c | 2
hw/xfree86/common/xf86VGAarbiter.c | 2
hw/xfree86/common/xf86VGAarbiter.h | 8 --
hw/xfree86/common/xf86VGAarbiter_priv.h | 32 +++++++++++
hw/xfree86/common/xf86Xinput.c | 2
hw/xfree86/common/xf86Xinput.h | 7 --
hw/xfree86/common/xf86Xinput_priv.h | 15 +++++
hw/xfree86/common/xf86cmap.c | 2
hw/xfree86/common/xf86sbusBus.h | 4 -
hw/xfree86/common/xf86sbusBus_priv.h | 16 +++++
hw/xfree86/ddc/interpret_edid.c | 2
hw/xfree86/ddc/print_edid.c | 2
hw/xfree86/ddc/xf86DDC.h | 42 --------------
hw/xfree86/ddc/xf86DDC_priv.h | 53 ++++++++++++++++++
hw/xfree86/dri/dri.c | 2
hw/xfree86/dri/dri.h | 2
hw/xfree86/dri/dri_priv.h | 12 ++++
hw/xfree86/dri/xf86dri.c | 2
hw/xfree86/dri2/dri2.c | 2
hw/xfree86/dri2/dri2.h | 3 -
hw/xfree86/dri2/dri2_priv.h | 13 ++++
hw/xfree86/dri2/dri2ext.c | 2
hw/xfree86/int10/generic.c | 2
hw/xfree86/int10/helper_exec.c | 2
hw/xfree86/int10/helper_mem.c | 2
hw/xfree86/int10/xf86int10.c | 2
hw/xfree86/int10/xf86int10.h | 54 ------------------
hw/xfree86/int10/xf86int10_priv.h | 77 +++++++++++++++++++++++++++
hw/xfree86/int10/xf86x86emu.c | 2
hw/xfree86/modes/xf86Crtc.c | 2
hw/xfree86/modes/xf86EdidModes.c | 2
hw/xfree86/modes/xf86RandR12.c | 2
hw/xfree86/modes/xf86RandR12.h | 5 -
hw/xfree86/modes/xf86RandR12_priv.h | 18 ++++++
hw/xfree86/os-support/linux/systemd-logind.c | 2
hw/xfree86/parser/Layout.c | 2
hw/xfree86/parser/read.c | 2
hw/xfree86/parser/scan.c | 1
hw/xfree86/parser/write.c | 2
hw/xfree86/parser/xf86Parser.h | 15 -----
hw/xfree86/parser/xf86Parser_priv.h | 26 +++++++++
hw/xfree86/sdksyms.sh | 3 +
51 files changed, 299 insertions(+), 174 deletions(-)
New commits:
commit 1efb2151e339a0ac78f3503cb41b2701924904d7
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Fri Mar 1 16:31:36 2024 +0100
xfree86: sdksyms.sh: add more headers
Add some headers that are still needed by drivers.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1290>
diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index f2862b074..4176115e6 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -146,6 +146,9 @@ cat > sdksyms.c << EOF
# include "xf86sbusBus.h"
#endif
+// needed for various graphics drivers
+#include "dgaproc.h"
+#include "xf86MatchDrivers.h"
/* hw/xfree86/ramdac/Makefile.am */
#include "xf86Cursor.h"
commit cf039485723608f0b9385bb35461a038f28b755e
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Feb 13 10:43:52 2024 +0100
xfree86: move private definitions out of dri.h
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1290>
diff --git a/hw/xfree86/dri/dri.c b/hw/xfree86/dri/dri.c
index e9c5a24bb..2f584a654 100644
--- a/hw/xfree86/dri/dri.c
+++ b/hw/xfree86/dri/dri.c
@@ -64,7 +64,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <X11/dri/xf86driproto.h>
#include "swaprep.h"
#include "xf86str.h"
-#include "dri.h"
+#include "dri_priv.h"
#include "sarea.h"
#include "dristruct.h"
#include "mi.h"
diff --git a/hw/xfree86/dri/dri.h b/hw/xfree86/dri/dri.h
index 6e09048f4..6ca55405d 100644
--- a/hw/xfree86/dri/dri.h
+++ b/hw/xfree86/dri/dri.h
@@ -195,8 +195,6 @@ extern _X_EXPORT Bool DRIScreenInit(ScreenPtr pScreen,
extern _X_EXPORT void DRICloseScreen(ScreenPtr pScreen);
-extern Bool DRIExtensionInit(void);
-
extern _X_EXPORT void DRIReset(void);
extern _X_EXPORT Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen,
diff --git a/hw/xfree86/dri/dri_priv.h b/hw/xfree86/dri/dri_priv.h
new file mode 100644
index 000000000..e0864c87a
--- /dev/null
+++ b/hw/xfree86/dri/dri_priv.h
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: MIT OR X11
+ *
+ * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
+ */
+#ifndef _XSERVER_DRI_PRIV_H
+#define _XSERVER_DRI_PRIV_H
+
+#include "dri.h"
+
+extern Bool DRIExtensionInit(void);
+
+#endif /* _XSERVER_DRI_PRIV_H */
diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
index ba7bbd6e9..bf8b356ca 100644
--- a/hw/xfree86/dri/xf86dri.c
+++ b/hw/xfree86/dri/xf86dri.c
@@ -57,7 +57,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <X11/dri/xf86driproto.h>
#include "swaprep.h"
#include "xf86str.h"
-#include "dri.h"
+#include "dri_priv.h"
#include "sarea.h"
#include "dristruct.h"
#include "xf86drm.h"
commit 1d3c26446d0fc283c9bedfab29d1652fbff4a10e
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Feb 13 10:00:35 2024 +0100
xfree86: move private definitions out of dri2.h
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1290>
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index 3397bb50c..1325f1f9f 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -42,7 +42,7 @@
#include "scrnintstr.h"
#include "windowstr.h"
#include "dixstruct.h"
-#include "dri2.h"
+#include "dri2_priv.h"
#include "dri2int.h"
#include "damage.h"
#include "xf86.h"
diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h
index 4c14b705d..c17a3a27c 100644
--- a/hw/xfree86/dri2/dri2.h
+++ b/hw/xfree86/dri2/dri2.h
@@ -46,9 +46,6 @@ typedef struct {
void *driverPrivate;
} DRI2BufferRec, *DRI2BufferPtr;
-extern CARD8 dri2_major; /* version of DRI2 supported by DDX */
-extern CARD8 dri2_minor;
-
typedef DRI2BufferRec DRI2Buffer2Rec, *DRI2Buffer2Ptr;
typedef void (*DRI2SwapEventPtr) (ClientPtr client, void *data, int type,
CARD64 ust, CARD64 msc, CARD32 sbc);
diff --git a/hw/xfree86/dri2/dri2_priv.h b/hw/xfree86/dri2/dri2_priv.h
new file mode 100644
index 000000000..f54aaa163
--- /dev/null
+++ b/hw/xfree86/dri2/dri2_priv.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: MIT OR X11
+ *
+ * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
+ */
+#ifndef _XSERVER_DRI2_PRIV_H_
+#define _XSERVER_DRI2_PRIV_H_
+
+#include "dri2.h"
+
+extern CARD8 dri2_major; /* version of DRI2 supported by DDX */
+extern CARD8 dri2_minor;
+
+#endif /* _XSERVER_DRI2_PRIV_H_ */
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
index b1d604a9e..a683bb818 100644
--- a/hw/xfree86/dri2/dri2ext.c
+++ b/hw/xfree86/dri2/dri2ext.c
@@ -46,7 +46,7 @@
#include "pixmapstr.h"
#include "extnsionst.h"
#include "xfixes.h"
-#include "dri2.h"
+#include "dri2_priv.h"
#include "dri2int.h"
#include "protocol-versions.h"
commit 00c2a8fb0a329eeb7893479934956b22fff4d2a0
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Fri Feb 9 19:12:42 2024 +0100
xfree86: ddc: move private definitions from xf86DDC.h to xf86DDC_priv.h
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1290>
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index ea1ddcfb3..58b7e2707 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -38,7 +38,7 @@
#include "xf86Priv.h"
#define IN_XSERVER
#include "Configint.h"
-#include "xf86DDC.h"
+#include "xf86DDC_priv.h"
#include "xf86pciBus.h"
#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
#include "xf86Bus.h"
diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
index 0ded3ff71..28d7497f1 100644
--- a/hw/xfree86/ddc/interpret_edid.c
+++ b/hw/xfree86/ddc/interpret_edid.c
@@ -32,7 +32,7 @@
#include "xf86.h"
#include "xf86_OSproc.h"
#define _PARSE_EDID_
-#include "xf86DDC.h"
+#include "xf86DDC_priv.h"
#include <string.h>
static void get_vendor_section(Uchar *, struct vendor *);
diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c
index f5215bd1c..464c11c5a 100644
--- a/hw/xfree86/ddc/print_edid.c
+++ b/hw/xfree86/ddc/print_edid.c
@@ -34,7 +34,7 @@
#include "misc.h"
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86DDC.h"
+#include "xf86DDC_priv.h"
#include "edid.h"
#define EDID_WIDTH 16
diff --git a/hw/xfree86/ddc/xf86DDC.h b/hw/xfree86/ddc/xf86DDC.h
index 6eb2f0ba2..37ffb335d 100644
--- a/hw/xfree86/ddc/xf86DDC.h
+++ b/hw/xfree86/ddc/xf86DDC.h
@@ -56,46 +56,4 @@ FindDMTMode(int hsize, int vsize, int refresh, Bool rb);
extern _X_EXPORT const DisplayModeRec DMTModes[];
-/*
- * Quirks to work around broken EDID data from various monitors.
- */
-typedef enum {
- DDC_QUIRK_NONE = 0,
- /* First detailed mode is bogus, prefer largest mode at 60hz */
- DDC_QUIRK_PREFER_LARGE_60 = 1 << 0,
- /* 135MHz clock is too high, drop a bit */
- DDC_QUIRK_135_CLOCK_TOO_HIGH = 1 << 1,
- /* Prefer the largest mode at 75 Hz */
- DDC_QUIRK_PREFER_LARGE_75 = 1 << 2,
- /* Convert detailed timing's horizontal from units of cm to mm */
- DDC_QUIRK_DETAILED_H_IN_CM = 1 << 3,
- /* Convert detailed timing's vertical from units of cm to mm */
- DDC_QUIRK_DETAILED_V_IN_CM = 1 << 4,
- /* Detailed timing descriptors have bogus size values, so just take the
- * maximum size and use that.
- */
- DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE = 1 << 5,
- /* Monitor forgot to set the first detailed is preferred bit. */
- DDC_QUIRK_FIRST_DETAILED_PREFERRED = 1 << 6,
- /* use +hsync +vsync for detailed mode */
- DDC_QUIRK_DETAILED_SYNC_PP = 1 << 7,
- /* Force single-link DVI bandwidth limit */
- DDC_QUIRK_DVI_SINGLE_LINK = 1 << 8,
-} ddc_quirk_t;
-
-typedef void (*handle_detailed_fn) (struct detailed_monitor_section *, void *);
-
-void xf86ForEachDetailedBlock(xf86MonPtr mon, handle_detailed_fn, void *data);
-
-ddc_quirk_t xf86DDCDetectQuirks(int scrnIndex, xf86MonPtr DDC, Bool verbose);
-
-void xf86DetTimingApplyQuirks(struct detailed_monitor_section *det_mon,
- ddc_quirk_t quirks, int hsize, int vsize);
-
-typedef void (*handle_video_fn) (struct cea_video_block *, void *);
-
-void xf86ForEachVideoBlock(xf86MonPtr, handle_video_fn, void *);
-
-struct cea_data_block *xf86MonitorFindHDMIBlock(xf86MonPtr mon);
-
#endif
diff --git a/hw/xfree86/ddc/xf86DDC_priv.h b/hw/xfree86/ddc/xf86DDC_priv.h
new file mode 100644
index 000000000..0eea134f3
--- /dev/null
+++ b/hw/xfree86/ddc/xf86DDC_priv.h
@@ -0,0 +1,53 @@
+/* SPDX-License-Identifier: MIT OR X11
+ *
+ * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
+ * Copyright © 1998 by Egbert Eich <Egbert.Eich at Physik.TU-Darmstadt.DE>
+ */
+#ifndef _XSERVER_XF86_DDC_PRIV_H
+#define _XSERVER_XF86_DDC_PRIV_H
+
+#include "xf86DDC.h"
+
+/*
+ * Quirks to work around broken EDID data from various monitors.
+ */
+typedef enum {
+ DDC_QUIRK_NONE = 0,
+ /* First detailed mode is bogus, prefer largest mode at 60hz */
+ DDC_QUIRK_PREFER_LARGE_60 = 1 << 0,
+ /* 135MHz clock is too high, drop a bit */
+ DDC_QUIRK_135_CLOCK_TOO_HIGH = 1 << 1,
+ /* Prefer the largest mode at 75 Hz */
+ DDC_QUIRK_PREFER_LARGE_75 = 1 << 2,
+ /* Convert detailed timing's horizontal from units of cm to mm */
+ DDC_QUIRK_DETAILED_H_IN_CM = 1 << 3,
+ /* Convert detailed timing's vertical from units of cm to mm */
+ DDC_QUIRK_DETAILED_V_IN_CM = 1 << 4,
+ /* Detailed timing descriptors have bogus size values, so just take the
+ * maximum size and use that.
+ */
+ DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE = 1 << 5,
+ /* Monitor forgot to set the first detailed is preferred bit. */
+ DDC_QUIRK_FIRST_DETAILED_PREFERRED = 1 << 6,
+ /* use +hsync +vsync for detailed mode */
+ DDC_QUIRK_DETAILED_SYNC_PP = 1 << 7,
+ /* Force single-link DVI bandwidth limit */
+ DDC_QUIRK_DVI_SINGLE_LINK = 1 << 8,
+} ddc_quirk_t;
+
+typedef void (*handle_detailed_fn) (struct detailed_monitor_section *, void *);
+
+void xf86ForEachDetailedBlock(xf86MonPtr mon, handle_detailed_fn, void *data);
+
+ddc_quirk_t xf86DDCDetectQuirks(int scrnIndex, xf86MonPtr DDC, Bool verbose);
+
+void xf86DetTimingApplyQuirks(struct detailed_monitor_section *det_mon,
+ ddc_quirk_t quirks, int hsize, int vsize);
+
+typedef void (*handle_video_fn) (struct cea_video_block *, void *);
+
+void xf86ForEachVideoBlock(xf86MonPtr, handle_video_fn, void *);
+
+struct cea_data_block *xf86MonitorFindHDMIBlock(xf86MonPtr mon);
+
+#endif /* _XSERVER_XF86_DDC_PRIV_H */
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 902a39104..7b0401eae 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -30,7 +30,7 @@
#include <stdio.h>
#include "xf86.h"
-#include "xf86DDC.h"
+#include "xf86DDC_priv.h"
#include "xf86Crtc.h"
#include "xf86Modes.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index b0f93e2b7..c480657e1 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -33,7 +33,7 @@
#define _PARSE_EDID_
#include "xf86.h"
-#include "xf86DDC.h"
+#include "xf86DDC_priv.h"
#include <X11/Xatom.h>
#include "property.h"
#include "propertyst.h"
commit d4724009ceca465f4895e3838e083a913c8e3ee4
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Fri Feb 9 18:00:36 2024 +0100
xfree86: parser: move private defs from xf86Parser.h to xf86Parser_priv.h
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1290>
diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index d49f59085..fc549f34a 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -34,7 +34,7 @@
#endif
#include "xf86.h"
-#include "xf86Parser.h"
+#include "xf86Parser_priv.h"
#include "xf86tokens.h"
#include "xf86Config.h"
#include "xf86MatchDrivers.h"
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index e26399cc7..b042d2a60 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -54,7 +54,7 @@
#include "xf86.h"
#include "xf86Modes.h"
-#include "xf86Parser.h"
+#include "xf86Parser_priv.h"
#include "xf86tokens.h"
#include "xf86Config.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index c59e926de..ea1ddcfb3 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -46,6 +46,7 @@
#endif
#include "misc.h"
#include "loaderProcs.h"
+#include "xf86Parser_priv.h"
typedef struct _DevToConfig {
GDevRec GDev;
diff --git a/hw/xfree86/parser/Layout.c b/hw/xfree86/parser/Layout.c
index 532f318f3..1c2e8f6e0 100644
--- a/hw/xfree86/parser/Layout.c
+++ b/hw/xfree86/parser/Layout.c
@@ -56,7 +56,7 @@
#include <xorg-config.h>
#endif
-#include "xf86Parser.h"
+#include "xf86Parser_priv.h"
#include "xf86tokens.h"
#include "Configint.h"
#include <string.h>
diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c
index a4600bc06..1ee49ac90 100644
--- a/hw/xfree86/parser/read.c
+++ b/hw/xfree86/parser/read.c
@@ -57,7 +57,7 @@
#endif
#include "xf86Config.h"
-#include "xf86Parser.h"
+#include "xf86Parser_priv.h"
#include "xf86tokens.h"
#include "Configint.h"
diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c
index 3655eb777..471e3adb3 100644
--- a/hw/xfree86/parser/scan.c
+++ b/hw/xfree86/parser/scan.c
@@ -66,6 +66,7 @@
#include <X11/Xdefs.h>
#include <X11/Xfuncproto.h>
#include <limits.h>
+#include "xf86Parser_priv.h"
#if !defined(MAXHOSTNAMELEN)
#define MAXHOSTNAMELEN 32
diff --git a/hw/xfree86/parser/write.c b/hw/xfree86/parser/write.c
index 1c8e33dd0..98f0d42b3 100644
--- a/hw/xfree86/parser/write.c
+++ b/hw/xfree86/parser/write.c
@@ -56,7 +56,7 @@
#endif
#include "os.h"
-#include "xf86Parser.h"
+#include "xf86Parser_priv.h"
#include "xf86tokens.h"
#include "Configint.h"
diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h
index 6762edbe1..b9240af12 100644
--- a/hw/xfree86/parser/xf86Parser.h
+++ b/hw/xfree86/parser/xf86Parser.h
@@ -442,17 +442,6 @@ typedef struct {
/*
* prototypes for public functions
*/
-extern void xf86initConfigFiles(void);
-extern char *xf86openConfigFile(const char *path, const char *cmdline,
- const char *projroot);
-extern char *xf86openConfigDirFiles(const char *path, const char *cmdline,
- const char *projroot);
-extern void xf86setBuiltinConfig(const char *config[]);
-extern XF86ConfigPtr xf86readConfigFile(void);
-extern void xf86closeConfigFile(void);
-extern XF86ConfigPtr xf86allocateConfig(void);
-extern void xf86freeConfig(XF86ConfigPtr p);
-extern int xf86writeConfigFile(const char *, XF86ConfigPtr);
extern _X_EXPORT XF86ConfDevicePtr xf86findDevice(const char *ident,
XF86ConfDevicePtr p);
extern _X_EXPORT XF86ConfLayoutPtr xf86findLayout(const char *name,
@@ -472,14 +461,10 @@ extern _X_EXPORT XF86ConfInputPtr xf86findInputByDriver(const char *driver,
extern _X_EXPORT XF86ConfVideoAdaptorPtr xf86findVideoAdaptor(const char *ident,
XF86ConfVideoAdaptorPtr
p);
-extern int xf86layoutAddInputDevices(XF86ConfigPtr config,
- XF86ConfLayoutPtr layout);
-
extern _X_EXPORT GenericListPtr xf86addListItem(GenericListPtr head,
GenericListPtr c_new);
extern _X_EXPORT int xf86itemNotSublist(GenericListPtr list_1,
GenericListPtr list_2);
-
extern _X_EXPORT int xf86pathIsAbsolute(const char *path);
extern _X_EXPORT int xf86pathIsSafe(const char *path);
extern _X_EXPORT char *xf86addComment(char *cur, const char *add);
diff --git a/hw/xfree86/parser/xf86Parser_priv.h b/hw/xfree86/parser/xf86Parser_priv.h
new file mode 100644
index 000000000..455c00c6a
--- /dev/null
+++ b/hw/xfree86/parser/xf86Parser_priv.h
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: MIT OR X11
+ *
+ * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
+ * Copyright © 1997 Metro Link Incorporated
+ */
+#ifndef _XSERVER_XF86_PARSER_PRIV
+#define _XSERVER_XF86_PARSER_PRIV
+
+#include "xf86Parser.h"
+
+void xf86initConfigFiles(void);
+char *xf86openConfigFile(const char *path,
+ const char *cmdline,
+ const char *projroot);
+char *xf86openConfigDirFiles(const char *path,
+ const char *cmdline,
+ const char *projroot);
+void xf86setBuiltinConfig(const char *config[]);
+XF86ConfigPtr xf86readConfigFile(void);
+void xf86closeConfigFile(void);
+XF86ConfigPtr xf86allocateConfig(void);
+void xf86freeConfig(XF86ConfigPtr p);
+int xf86writeConfigFile(const char *filename, XF86ConfigPtr cptr);
+int xf86layoutAddInputDevices(XF86ConfigPtr config, XF86ConfLayoutPtr layout);
+
+#endif /* _XSERVER_XF86_PARSER_PRIV */
commit ac5e95be49ab34119b21264be35b9c9a3eab2861
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Fri Feb 9 17:48:18 2024 +0100
xfree86: modes: move private definitions out of from xf86RandR12.h
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1290>
diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c
index 84f6a495d..6d5f9ac90 100644
--- a/hw/xfree86/common/xf86cmap.c
+++ b/hw/xfree86/common/xf86cmap.c
@@ -47,7 +47,7 @@
#include "xf86_OSproc.h"
#include "xf86str.h"
#include "micmap.h"
-#include "xf86RandR12.h"
+#include "xf86RandR12_priv.h"
#include "xf86Crtc.h"
#ifdef XFreeXDGA
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 2279bf448..ddcf5e748 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -42,7 +42,7 @@
#include "xf86cmap.h"
#include "xf86Crtc.h"
-#include "xf86RandR12.h"
+#include "xf86RandR12_priv.h"
typedef struct _xf86RandR12Info {
int virtualX;
diff --git a/hw/xfree86/modes/xf86RandR12.h b/hw/xfree86/modes/xf86RandR12.h
index 31aaaaf28..e603799be 100644
--- a/hw/xfree86/modes/xf86RandR12.h
+++ b/hw/xfree86/modes/xf86RandR12.h
@@ -40,9 +40,4 @@ extern _X_EXPORT void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn,
extern _X_EXPORT Bool xf86RandR12PreInit(ScrnInfoPtr pScrn);
extern _X_EXPORT void xf86RandR12TellChanged(ScreenPtr pScreen);
-extern void xf86RandR12LoadPalette(ScrnInfoPtr pScrn, int numColors,
- int *indices, LOCO *colors,
- VisualPtr pVisual);
-extern Bool xf86RandR12InitGamma(ScrnInfoPtr pScrn, unsigned gammaSize);
-
#endif /* _XF86_RANDR_H_ */
diff --git a/hw/xfree86/modes/xf86RandR12_priv.h b/hw/xfree86/modes/xf86RandR12_priv.h
new file mode 100644
index 000000000..a3fbab1f6
--- /dev/null
+++ b/hw/xfree86/modes/xf86RandR12_priv.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: MIT OR X11
+ *
+ * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
+ */
+#ifndef _XSERVER_XF86RANDR12_PRIV_H_
+#define _XSERVER_XF86RANDR12_PRIV_H_
+
+#include <X11/extensions/render.h>
+
+#include "randrstr.h"
+#include "xf86RandR12.h"
+
+void xf86RandR12LoadPalette(ScrnInfoPtr pScrn, int numColors,
+ int *indices, LOCO *colors,
+ VisualPtr pVisual);
+Bool xf86RandR12InitGamma(ScrnInfoPtr pScrn, unsigned gammaSize);
+
+#endif /* _XSERVER_XF86RANDR12_PRIV_H_ */
commit 013eaacdd02ac82c0511f72e6dcbc137fc4a5748
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Fri Feb 9 17:42:35 2024 +0100
xfree86: common: move private defs out of xf86VGAarbiter.h
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1290>
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index 48f827069..dae11fb9f 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -126,13 +126,7 @@ extern _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn,
EntityProc leave,
void *private);
#else
-#define xf86VGAarbiterInit() do {} while (0)
-#define xf86VGAarbiterFini() do {} while (0)
-#define xf86VGAarbiterLock(x) do {} while (0)
-#define xf86VGAarbiterUnlock(x) do {} while (0)
-#define xf86VGAarbiterScrnInit(x) do {} while (0)
#define xf86VGAarbiterDeviceDecodes() do {} while (0)
-#define xf86VGAarbiterWrapFunctions() do {} while (0)
#endif
/* xf86Bus.c */
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index af1a8d715..6c3921717 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -50,7 +50,7 @@
#include "xf86_OSproc.h"
#ifdef XSERVER_LIBPCIACCESS
-#include "xf86VGAarbiter.h"
+#include "xf86VGAarbiter_priv.h"
#endif
/* Entity data */
EntityPtr *xf86Entities = NULL; /* Bus slots claimed by drivers */
diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c
index ee495483e..7fec44087 100644
--- a/hw/xfree86/common/xf86DPMS.c
+++ b/hw/xfree86/common/xf86DPMS.c
@@ -44,7 +44,7 @@
#include "dpmsproc.h"
#endif
#ifdef XSERVER_LIBPCIACCESS
-#include "xf86VGAarbiter.h"
+#include "xf86VGAarbiter_priv.h"
#endif
#ifdef DPMSExtension
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 92004dd79..b2dd37510 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -64,6 +64,7 @@
#include "windowstr.h"
#include "scrnintstr.h"
#include "systemd-logind.h"
+#include "xf86VGAarbiter_priv.h"
#include "loaderProcs.h"
#include "xf86Module_priv.h"
diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c
index 9db8d044f..55487b48b 100644
--- a/hw/xfree86/common/xf86VGAarbiter.c
+++ b/hw/xfree86/common/xf86VGAarbiter.c
@@ -30,7 +30,7 @@
#include "xorg-config.h"
-#include "xf86VGAarbiter.h"
+#include "xf86VGAarbiter_priv.h"
#include "xf86VGAarbiterPriv.h"
#include "xf86Bus.h"
#include "xf86Priv.h"
diff --git a/hw/xfree86/common/xf86VGAarbiter.h b/hw/xfree86/common/xf86VGAarbiter.h
index bb52cf78a..260d366d4 100644
--- a/hw/xfree86/common/xf86VGAarbiter.h
+++ b/hw/xfree86/common/xf86VGAarbiter.h
@@ -30,14 +30,6 @@
#include "misc.h"
#include "xf86.h"
-/* Functions */
-extern void xf86VGAarbiterInit(void);
-extern void xf86VGAarbiterFini(void);
-void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn);
-extern Bool xf86VGAarbiterWrapFunctions(void);
-extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn);
-extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn);
-
/* allow a driver to remove itself from arbiter - really should be
* done in the kernel though */
extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc);
diff --git a/hw/xfree86/common/xf86VGAarbiter_priv.h b/hw/xfree86/common/xf86VGAarbiter_priv.h
new file mode 100644
index 000000000..5c23d83d3
--- /dev/null
+++ b/hw/xfree86/common/xf86VGAarbiter_priv.h
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: MIT OR X11
+ *
+ * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
+ */
+#ifndef _XSERVER_XF86VGAARBITERPRIV_H
+#define _XSERVER_XF86VGAARBITERPRIV_H
+
+#include <X11/Xdefs.h>
+
+#include "xf86VGAarbiter.h"
+
+#ifdef XSERVER_LIBPCIACCESS
+
+void xf86VGAarbiterInit(void);
+void xf86VGAarbiterFini(void);
+void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn);
+Bool xf86VGAarbiterWrapFunctions(void);
+void xf86VGAarbiterLock(ScrnInfoPtr pScrn);
+void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn);
+
+#else /* XSERVER_LIBPCIACCESS */
+
+static inline void xf86VGAarbiterInit() {}
+static inline void xf86VGAarbiterFini() {}
+static inline void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn) {}
+static inline void xf86VGAarbiterWrapFunctions(void) { return FALSE; }
+static inline void xf86VGAarbiterLock(ScrnInfoPtr pScrn) {}
+static inline void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn) {}
+
+#endif /* XSERVER_LIBPCIACCESS */
+
+#endif /* _XSERVER_XF86VGAARBITERPRIV_H */
commit df33e1c51bde33d69886e5cc02e866a34fdeb6c4
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Fri Feb 9 17:29:39 2024 +0100
xfree86: common: move private defs from xf86Xinput.h to xf86Xinput_priv.h
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1290>
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 7bb067073..e26399cc7 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -65,6 +65,7 @@
#include "xf86pciBus.h"
#include "xf86Xinput.h"
#include "loaderProcs.h"
+#include "xf86Xinput_priv.h"
#include "xkbsrv.h"
#include "picture.h"
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 2a595b6e3..6d275267d 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -77,7 +77,7 @@
#endif
#include "inputstr.h"
-#include "xf86Xinput.h"
+#include "xf86Xinput_priv.h"
#include "mipointer.h"
#include "xkbsrv.h"
#include "xkbstr.h"
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 9839622f0..b35409921 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -57,7 +57,7 @@
#include "xf86_OSlib.h"
#include "micmap.h"
#include "xf86DDC.h"
-#include "xf86Xinput.h"
+#include "xf86Xinput_priv.h"
#include "xf86InPriv.h"
#include "xf86Config.h"
#include "mivalidate.h"
diff --git a/hw/xfree86/common/xf86PM.c b/hw/xfree86/common/xf86PM.c
index ed7bdbd9f..427e9e0aa 100644
--- a/hw/xfree86/common/xf86PM.c
+++ b/hw/xfree86/common/xf86PM.c
@@ -32,7 +32,7 @@
#include <X11/X.h>
#include "xf86.h"
#include "xf86Priv.h"
-#include "xf86Xinput.h"
+#include "xf86Xinput_priv.h"
#include "xf86_OSproc.h"
int (*xf86PMGetEventFromOs) (int fd, pmEvent * events, int num) = NULL;
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index d0f9db52e..c2bf01968 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -64,7 +64,7 @@
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86Config.h"
-#include "xf86Xinput.h"
+#include "xf86Xinput_priv.h"
#include "XIstubs.h"
#include "xf86Optrec.h"
#include "mipointer.h"
diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h
index 839a3b969..7d3d5e048 100644
--- a/hw/xfree86/common/xf86Xinput.h
+++ b/hw/xfree86/common/xf86Xinput.h
@@ -114,9 +114,6 @@ struct _InputInfoRec {
InputAttributes *attrs;
};
-/* xf86Globals.c */
-extern InputInfoPtr xf86InputDevs;
-
/* xf86Xinput.c */
extern _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute,
int first_valuator, int num_valuators,
@@ -190,10 +187,6 @@ extern _X_EXPORT void xf86DisableDevice(DeviceIntPtr dev, Bool panic);
extern _X_EXPORT void xf86EnableDevice(DeviceIntPtr dev);
extern _X_EXPORT void xf86InputEnableVTProbe(void);
-/* not exported */
-int xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL is_auto);
-InputInfoPtr xf86AllocateInput(void);
-
/* xf86Helper.c */
extern _X_EXPORT void xf86AddInputDriver(InputDriverPtr driver, void *module,
int flags);
diff --git a/hw/xfree86/common/xf86Xinput_priv.h b/hw/xfree86/common/xf86Xinput_priv.h
new file mode 100644
index 000000000..b6fc9836a
--- /dev/null
+++ b/hw/xfree86/common/xf86Xinput_priv.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: MIT OR X11
+ *
+ * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
+ */
+#ifndef _XSERVER__XF86XINPUT_H
+#define _XSERVER__XF86XINPUT_H
+
+#include "xf86Xinput.h"
+
+extern InputInfoPtr xf86InputDevs;
+
+int xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL is_auto);
+InputInfoPtr xf86AllocateInput(void);
+
+#endif /* _XSERVER__XF86XINPUT_H */
diff --git a/hw/xfree86/os-support/linux/systemd-logind.c b/hw/xfree86/os-support/linux/systemd-logind.c
index 791834627..efe710b3c 100644
--- a/hw/xfree86/os-support/linux/systemd-logind.c
+++ b/hw/xfree86/os-support/linux/systemd-logind.c
@@ -39,7 +39,7 @@
#include "linux.h"
#include "xf86.h"
#include "xf86platformBus.h"
-#include "xf86Xinput.h"
+#include "xf86Xinput_priv.h"
#include "xf86Priv.h"
#include "globals.h"
commit a0eea4e0ece48edf21927079df6b6093899adeb9
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Fri Feb 9 17:08:57 2024 +0100
xfree86: int10: move private defs out of xf86int10.h
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1290>
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index 4d8dfb4de..8b9ff07c5 100644
--- a/hw/xfree86/int10/generic.c
+++ b/hw/xfree86/int10/generic.c
@@ -15,7 +15,7 @@
#include "xf86_OSproc.h"
#include "compiler.h"
#define _INT10_PRIVATE
-#include "xf86int10.h"
+#include "xf86int10_priv.h"
#include "int10Defines.h"
#include "Pci.h"
diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
index ccfecf15d..fc4d83c16 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -30,7 +30,7 @@
#include "compiler.h"
#define _INT10_PRIVATE
#include "int10Defines.h"
-#include "xf86int10.h"
+#include "xf86int10_priv.h"
#include "Pci.h"
#ifdef _X86EMU
#include "x86emu/x86emui.h"
diff --git a/hw/xfree86/int10/helper_mem.c b/hw/xfree86/int10/helper_mem.c
index 1b5960e0c..7bd27a3c1 100644
--- a/hw/xfree86/int10/helper_mem.c
+++ b/hw/xfree86/int10/helper_mem.c
@@ -18,7 +18,7 @@
#if 0
#include "int10Defines.h"
#endif
-#include "xf86int10.h"
+#include "xf86int10_priv.h"
#define REG pInt
diff --git a/hw/xfree86/int10/xf86int10.c b/hw/xfree86/int10/xf86int10.c
index 578f461b7..74966207e 100644
--- a/hw/xfree86/int10/xf86int10.c
+++ b/hw/xfree86/int10/xf86int10.c
@@ -11,7 +11,7 @@
#include "xf86.h"
#include "compiler.h"
#define _INT10_PRIVATE
-#include "xf86int10.h"
+#include "xf86int10_priv.h"
#include "int10Defines.h"
#include "Pci.h"
diff --git a/hw/xfree86/int10/xf86int10.h b/hw/xfree86/int10/xf86int10.h
index 83bab7e61..9aacff925 100644
--- a/hw/xfree86/int10/xf86int10.h
+++ b/hw/xfree86/int10/xf86int10.h
@@ -122,70 +122,18 @@ extern _X_EXPORT Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt);
/* int.c */
extern _X_EXPORT xf86Int10InfoPtr Int10Current;
-int int_handler(xf86Int10InfoPtr pInt);
-
-/* helper_exec.c */
-int setup_int(xf86Int10InfoPtr pInt);
-void finish_int(xf86Int10InfoPtr, int sig);
-uint32_t getIntVect(xf86Int10InfoPtr pInt, int num);
-void pushw(xf86Int10InfoPtr pInt, uint16_t val);
-int run_bios_int(int num, xf86Int10InfoPtr pInt);
-void dump_code(xf86Int10InfoPtr pInt);
-void dump_registers(xf86Int10InfoPtr pInt);
-void stack_trace(xf86Int10InfoPtr pInt);
-uint8_t bios_checksum(const uint8_t *start, int size);
-void LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga);
-void UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga);
#if defined (_PC)
extern _X_EXPORT void xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt,
Bool save);
#endif
-int port_rep_inb(xf86Int10InfoPtr pInt,
- uint16_t port, uint32_t base, int d_f, uint32_t count);
-int port_rep_inw(xf86Int10InfoPtr pInt,
- uint16_t port, uint32_t base, int d_f, uint32_t count);
-int port_rep_inl(xf86Int10InfoPtr pInt,
- uint16_t port, uint32_t base, int d_f, uint32_t count);
-int port_rep_outb(xf86Int10InfoPtr pInt,
- uint16_t port, uint32_t base, int d_f, uint32_t count);
-int port_rep_outw(xf86Int10InfoPtr pInt,
- uint16_t port, uint32_t base, int d_f, uint32_t count);
-int port_rep_outl(xf86Int10InfoPtr pInt,
- uint16_t port, uint32_t base, int d_f, uint32_t count);
-
-uint8_t x_inb(uint16_t port);
-uint16_t x_inw(uint16_t port);
-void x_outb(uint16_t port, uint8_t val);
-void x_outw(uint16_t port, uint16_t val);
-uint32_t x_inl(uint16_t port);
-void x_outl(uint16_t port, uint32_t val);
-
-uint8_t Mem_rb(uint32_t addr);
-uint16_t Mem_rw(uint32_t addr);
-uint32_t Mem_rl(uint32_t addr);
-void Mem_wb(uint32_t addr, uint8_t val);
-void Mem_ww(uint32_t addr, uint16_t val);
-void Mem_wl(uint32_t addr, uint32_t val);
-
-/* helper_mem.c */
-void setup_int_vect(xf86Int10InfoPtr pInt);
-int setup_system_bios(void *base_addr);
-void reset_int_vect(xf86Int10InfoPtr pInt);
-void set_return_trap(xf86Int10InfoPtr pInt);
+
extern _X_EXPORT void *xf86HandleInt10Options(ScrnInfoPtr pScrn,
int entityIndex);
-Bool int10skip(const void *options);
-Bool int10_check_bios(int scrnIndex, int codeSeg,
- const unsigned char *vbiosMem);
-Bool initPrimary(const void *options);
extern _X_EXPORT BusType xf86int10GetBiosLocationType(const xf86Int10InfoPtr
pInt);
extern _X_EXPORT Bool xf86int10GetBiosSegment(xf86Int10InfoPtr pInt,
void *base);
-#ifdef DEBUG
-void dprint(unsigned long start, unsigned long size);
-#endif
#endif /* _INT10_PRIVATE */
#endif /* _XF86INT10_H */
diff --git a/hw/xfree86/int10/xf86int10_priv.h b/hw/xfree86/int10/xf86int10_priv.h
new file mode 100644
index 000000000..c0b236ea5
--- /dev/null
+++ b/hw/xfree86/int10/xf86int10_priv.h
@@ -0,0 +1,77 @@
+/* SPDX-License-Identifier: MIT OR X11
+ *
+ * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
+ * Copyright © 1999 Egbert Eich
+ *
+ * XFree86 int10 module
+ * execute BIOS int 10h calls in x86 real mode environment
+ */
+#ifndef _XSERVER_XF86INT10_H
+#define _XSERVER_XF86INT10_H
+
+#include <X11/Xmd.h>
+#include <X11/Xdefs.h>
+#include "xf86Pci.h"
+#include "xf86int10.h"
+
+#ifdef _INT10_PRIVATE
+
+/* int.c */
+int int_handler(xf86Int10InfoPtr pInt);
+
+/* helper_exec.c */
+int setup_int(xf86Int10InfoPtr pInt);
+void finish_int(xf86Int10InfoPtr, int sig);
+uint32_t getIntVect(xf86Int10InfoPtr pInt, int num);
+void pushw(xf86Int10InfoPtr pInt, uint16_t val);
+int run_bios_int(int num, xf86Int10InfoPtr pInt);
+void dump_code(xf86Int10InfoPtr pInt);
+void dump_registers(xf86Int10InfoPtr pInt);
+void stack_trace(xf86Int10InfoPtr pInt);
+uint8_t bios_checksum(const uint8_t *start, int size);
+void LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga);
+void UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga);
+
+int port_rep_inb(xf86Int10InfoPtr pInt,
+ uint16_t port, uint32_t base, int d_f, uint32_t count);
+int port_rep_inw(xf86Int10InfoPtr pInt,
+ uint16_t port, uint32_t base, int d_f, uint32_t count);
+int port_rep_inl(xf86Int10InfoPtr pInt,
+ uint16_t port, uint32_t base, int d_f, uint32_t count);
+int port_rep_outb(xf86Int10InfoPtr pInt,
+ uint16_t port, uint32_t base, int d_f, uint32_t count);
+int port_rep_outw(xf86Int10InfoPtr pInt,
+ uint16_t port, uint32_t base, int d_f, uint32_t count);
+int port_rep_outl(xf86Int10InfoPtr pInt,
+ uint16_t port, uint32_t base, int d_f, uint32_t count);
+
+uint8_t x_inb(uint16_t port);
+uint16_t x_inw(uint16_t port);
+void x_outb(uint16_t port, uint8_t val);
+void x_outw(uint16_t port, uint16_t val);
+uint32_t x_inl(uint16_t port);
+void x_outl(uint16_t port, uint32_t val);
+
+uint8_t Mem_rb(uint32_t addr);
+uint16_t Mem_rw(uint32_t addr);
+uint32_t Mem_rl(uint32_t addr);
+void Mem_wb(uint32_t addr, uint8_t val);
+void Mem_ww(uint32_t addr, uint16_t val);
+void Mem_wl(uint32_t addr, uint32_t val);
+
+/* helper_mem.c */
+void setup_int_vect(xf86Int10InfoPtr pInt);
+int setup_system_bios(void *base_addr);
+void reset_int_vect(xf86Int10InfoPtr pInt);
+void set_return_trap(xf86Int10InfoPtr pInt);
+Bool int10skip(const void *options);
+Bool int10_check_bios(int scrnIndex, int codeSeg,
+ const unsigned char *vbiosMem);
+Bool initPrimary(const void *options);
+#ifdef DEBUG
+void dprint(unsigned long start, unsigned long size);
+#endif
+
+#endif /* _INT10_PRIVATE */
+
+#endif /* _XSERVER_XF86INT10_H */
diff --git a/hw/xfree86/int10/xf86x86emu.c b/hw/xfree86/int10/xf86x86emu.c
index 5a3a5484f..3c1dae7c5 100644
--- a/hw/xfree86/int10/xf86x86emu.c
+++ b/hw/xfree86/int10/xf86x86emu.c
@@ -11,7 +11,7 @@
#include "xf86_OSproc.h"
#include "xf86Pci.h"
#define _INT10_PRIVATE
-#include "xf86int10.h"
+#include "xf86int10_priv.h"
#include "int10Defines.h"
#include <x86emu.h>
commit 50d1a98c6a3b49fb34c9d9efc6aa0bee24e4597f
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Fri Feb 9 16:26:32 2024 +0100
xfree86: common: move private defs out of xf86sbusBus.h
public server module API headers shouldn't be clobbered with non-exported
definitions, so move them out to private header file.
Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1290>
diff --git a/hw/xfree86/common/xf86sbusBus.h b/hw/xfree86/common/xf86sbusBus.h
index 9cfcbc574..acbc6c04d 100644
--- a/hw/xfree86/common/xf86sbusBus.h
+++ b/hw/xfree86/common/xf86sbusBus.h
@@ -104,8 +104,4 @@ extern _X_EXPORT char *sparcPromNode2Pathname(sbusPromNodePtr pnode);
extern _X_EXPORT int sparcPromPathname2Node(const char *pathName);
extern _X_EXPORT char *sparcDriverName(void);
-extern Bool xf86SbusConfigure(void *busData, sbusDevicePtr sBus);
-extern void xf86SbusConfigureNewDev(void *busData, sbusDevicePtr sBus,
- GDevRec * GDev);
-
#endif /* _XF86_SBUSBUS_H */
diff --git a/hw/xfree86/common/xf86sbusBus_priv.h b/hw/xfree86/common/xf86sbusBus_priv.h
new file mode 100644
index 000000000..797044718
--- /dev/null
+++ b/hw/xfree86/common/xf86sbusBus_priv.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: MIT OR X11
+ *
+ * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
+ * Copyright © 2000 Jakub Jelinek (jakub at redhat.com)
+ */
+#ifndef _XSERVER_XF86_SBUSBUS_H
+#define _XSERVER_XF86_SBUSBUS_H
+
+#include <X11/Xdefs.h>
+
+#include "xf86sbusBus.h"
+
+Bool xf86SbusConfigure(void *busData, sbusDevicePtr sBus);
+void xf86SbusConfigureNewDev(void *busData, sbusDevicePtr sBus, GDevRec* GDev);
+
+#endif /* _XSERVER_XF86_SBUSBUS_H */
More information about the xorg-commit
mailing list