mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
modesetting: Fix builds with pciaccess or udev_kms disabled
CI meson-disable-options builds were failing with:
```
../hw/xfree86/drivers/modesetting/driver.c:127:5: error: ‘ms_device_match’
undeclared here (not in a function)
127 | ms_device_match,
| ^~~~~~~~~~~~~~~
../hw/xfree86/drivers/modesetting/driver.c: In function ‘ms_get_drm_master_fd’:
../hw/xfree86/drivers/modesetting/driver.c:1179:19: error: variable ‘pEnt’
set but not used [-Werror=unused-but-set-variable]
1179 | EntityInfoPtr pEnt;
| ^~~~
../hw/xfree86/drivers/modesetting/driver.c: At top level:
../hw/xfree86/drivers/modesetting/driver.c:84:13: error: ‘ms_pci_probe’
used but never defined [-Werror]
84 | static Bool ms_pci_probe(DriverPtr driver,
| ^~~~~~~~~~~~
../hw/xfree86/drivers/modesetting/driver.c:313:1: error: ‘probe_hw_pci’
defined but not used [-Werror=unused-function]
313 | probe_hw_pci(const char *dev, struct pci_device *pdev)
| ^~~~~~~~~~~~
```
Fixes: a72bdf17 ("modesetting: rewrite probing based on fbdev.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2056>
This commit is contained in:
committed by
Enrico Weigelt
parent
d8b7a3e46c
commit
b641d8e33e
@@ -82,9 +82,11 @@ static Bool ScreenInit(ScreenPtr pScreen, int argc, char **argv);
|
||||
static Bool PreInit(ScrnInfoPtr pScrn, int flags);
|
||||
|
||||
static Bool Probe(DriverPtr drv, int flags);
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
static Bool ms_pci_probe(DriverPtr driver,
|
||||
int entity_num, struct pci_device *device,
|
||||
intptr_t match_data);
|
||||
#endif
|
||||
static Bool ms_driver_func(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data);
|
||||
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
@@ -117,8 +119,13 @@ _X_EXPORT DriverRec modesetting = {
|
||||
NULL,
|
||||
0,
|
||||
ms_driver_func,
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
ms_device_match,
|
||||
ms_pci_probe,
|
||||
#else
|
||||
NULL,
|
||||
NULL,
|
||||
#endif
|
||||
#ifdef XSERVER_PLATFORM_BUS
|
||||
ms_platform_probe,
|
||||
#endif
|
||||
@@ -290,6 +297,7 @@ probe_hw(const char *dev, struct xf86_platform_device *platform_dev)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
static char *
|
||||
ms_DRICreatePCIBusID(const struct pci_device *dev)
|
||||
{
|
||||
@@ -301,6 +309,7 @@ ms_DRICreatePCIBusID(const struct pci_device *dev)
|
||||
|
||||
return busID;
|
||||
}
|
||||
#endif
|
||||
|
||||
static Bool
|
||||
probe_hw_pci(const char *dev, struct pci_device *pdev)
|
||||
@@ -1063,14 +1072,11 @@ msShouldDoubleShadow(ScrnInfoPtr pScrn, modesettingPtr ms)
|
||||
static Bool
|
||||
ms_get_drm_master_fd(ScrnInfoPtr pScrn)
|
||||
{
|
||||
EntityInfoPtr pEnt;
|
||||
modesettingPtr ms;
|
||||
modesettingEntPtr ms_ent;
|
||||
|
||||
ms = modesettingPTR(pScrn);
|
||||
ms_ent = ms_ent_priv(pScrn);
|
||||
|
||||
pEnt = ms->pEnt;
|
||||
modesettingPtr ms = modesettingPTR(pScrn);
|
||||
modesettingEntPtr ms_ent = ms_ent_priv(pScrn);
|
||||
#if defined(XSERVER_PLATFORM_BUS) || defined(XSERVER_LIBPCIACCESS)
|
||||
EntityInfoPtr pEnt = ms->pEnt;
|
||||
#endif
|
||||
|
||||
if (ms_ent->fd) {
|
||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
||||
|
||||
Reference in New Issue
Block a user