mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 16:20:03 +01: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: a72bdf170 ("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:
parent
7b15321b3b
commit
ec14ecf751
1 changed files with 14 additions and 8 deletions
|
|
@ -81,9 +81,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);
|
||||
|
||||
/* window wrapper functions used to get the notification when
|
||||
|
|
@ -124,8 +126,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
|
||||
|
|
@ -297,6 +304,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)
|
||||
{
|
||||
|
|
@ -339,6 +347,7 @@ probe_hw_pci(const char *dev, struct pci_device *pdev)
|
|||
free(devid);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const OptionInfoRec *
|
||||
AvailableOptions(int chipid, int busid)
|
||||
|
|
@ -1176,14 +1185,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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue