Revert "modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD"
This reverts commit 8c455db0eb
.
Since xf86platformBus.h is only included when XSERVER_PLATFORM_BUS is
defined, and configure.ac only defines that on systems with udev, this
commit breaks the build on non-udev systems like Solaris.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
parent
edf08bd654
commit
7fc89251ef
|
@ -244,12 +244,14 @@ probe_hw(const char *dev, struct xf86_platform_device *platform_dev)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
|
#ifdef XF86_PDEV_SERVER_FD
|
||||||
if (platform_dev && (platform_dev->flags & XF86_PDEV_SERVER_FD)) {
|
if (platform_dev && (platform_dev->flags & XF86_PDEV_SERVER_FD)) {
|
||||||
fd = xf86_platform_device_odev_attributes(platform_dev)->fd;
|
fd = xf86_platform_device_odev_attributes(platform_dev)->fd;
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return check_outputs(fd, NULL);
|
return check_outputs(fd, NULL);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
fd = open_hw(dev);
|
fd = open_hw(dev);
|
||||||
if (fd != -1) {
|
if (fd != -1) {
|
||||||
|
@ -710,8 +712,10 @@ FreeRec(ScrnInfoPtr pScrn)
|
||||||
if (ms->pEnt->location.type == BUS_PCI)
|
if (ms->pEnt->location.type == BUS_PCI)
|
||||||
ret = drmClose(ms->fd);
|
ret = drmClose(ms->fd);
|
||||||
else
|
else
|
||||||
|
#ifdef XF86_PDEV_SERVER_FD
|
||||||
if (!(ms->pEnt->location.type == BUS_PLATFORM &&
|
if (!(ms->pEnt->location.type == BUS_PLATFORM &&
|
||||||
(ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)))
|
(ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)))
|
||||||
|
#endif
|
||||||
ret = close(ms->fd);
|
ret = close(ms->fd);
|
||||||
(void) ret;
|
(void) ret;
|
||||||
ms_ent->fd = 0;
|
ms_ent->fd = 0;
|
||||||
|
@ -824,11 +828,13 @@ ms_get_drm_master_fd(ScrnInfoPtr pScrn)
|
||||||
|
|
||||||
#ifdef XSERVER_PLATFORM_BUS
|
#ifdef XSERVER_PLATFORM_BUS
|
||||||
if (pEnt->location.type == BUS_PLATFORM) {
|
if (pEnt->location.type == BUS_PLATFORM) {
|
||||||
|
#ifdef XF86_PDEV_SERVER_FD
|
||||||
if (pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)
|
if (pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)
|
||||||
ms->fd =
|
ms->fd =
|
||||||
xf86_platform_device_odev_attributes(pEnt->location.id.plat)->
|
xf86_platform_device_odev_attributes(pEnt->location.id.plat)->
|
||||||
fd;
|
fd;
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
char *path =
|
char *path =
|
||||||
xf86_platform_device_odev_attributes(pEnt->location.id.plat)->
|
xf86_platform_device_odev_attributes(pEnt->location.id.plat)->
|
||||||
|
@ -1497,9 +1503,11 @@ SetMaster(ScrnInfoPtr pScrn)
|
||||||
modesettingPtr ms = modesettingPTR(pScrn);
|
modesettingPtr ms = modesettingPTR(pScrn);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
#ifdef XF86_PDEV_SERVER_FD
|
||||||
if (ms->pEnt->location.type == BUS_PLATFORM &&
|
if (ms->pEnt->location.type == BUS_PLATFORM &&
|
||||||
(ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))
|
(ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
#endif
|
||||||
|
|
||||||
ret = drmSetMaster(ms->fd);
|
ret = drmSetMaster(ms->fd);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
@ -1744,9 +1752,11 @@ LeaveVT(ScrnInfoPtr pScrn)
|
||||||
|
|
||||||
pScrn->vtSema = FALSE;
|
pScrn->vtSema = FALSE;
|
||||||
|
|
||||||
|
#ifdef XF86_PDEV_SERVER_FD
|
||||||
if (ms->pEnt->location.type == BUS_PLATFORM &&
|
if (ms->pEnt->location.type == BUS_PLATFORM &&
|
||||||
(ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))
|
(ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
drmDropMaster(ms->fd);
|
drmDropMaster(ms->fd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue