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@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1290>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-02-09 17:42:35 +01:00 committed by Marge Bot
parent df33e1c51b
commit 013eaacdd0
7 changed files with 36 additions and 17 deletions

View File

@ -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 */

View File

@ -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 */

View File

@ -44,7 +44,7 @@
#include "dpmsproc.h"
#endif
#ifdef XSERVER_LIBPCIACCESS
#include "xf86VGAarbiter.h"
#include "xf86VGAarbiter_priv.h"
#endif
#ifdef DPMSExtension

View File

@ -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"

View File

@ -30,7 +30,7 @@
#include "xorg-config.h"
#include "xf86VGAarbiter.h"
#include "xf86VGAarbiter_priv.h"
#include "xf86VGAarbiterPriv.h"
#include "xf86Bus.h"
#include "xf86Priv.h"

View File

@ -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);

View File

@ -0,0 +1,32 @@
/* SPDX-License-Identifier: MIT OR X11
*
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@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 */