modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD

XF86_PDEV_SERVER_FD is defined since:

    commit 5fb641a29b
    Author: Hans de Goede <hdegoede@redhat.com>
    Date:   Mon Jan 13 12:03:46 2014 +0100

        hotplug: Extend OdevAttributes for server-managed fd support

ifdef'ing for it is a leftover from the external xf86-video-modesetting.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Daniel Martin 2017-10-20 10:05:34 +02:00 committed by Adam Jackson
parent 66d8cbf8ce
commit 8c455db0eb

View File

@ -244,14 +244,12 @@ probe_hw(const char *dev, struct xf86_platform_device *platform_dev)
{
int fd;
#ifdef XF86_PDEV_SERVER_FD
if (platform_dev && (platform_dev->flags & XF86_PDEV_SERVER_FD)) {
fd = xf86_platform_device_odev_attributes(platform_dev)->fd;
if (fd == -1)
return FALSE;
return check_outputs(fd, NULL);
}
#endif
fd = open_hw(dev);
if (fd != -1) {
@ -712,10 +710,8 @@ FreeRec(ScrnInfoPtr pScrn)
if (ms->pEnt->location.type == BUS_PCI)
ret = drmClose(ms->fd);
else
#ifdef XF86_PDEV_SERVER_FD
if (!(ms->pEnt->location.type == BUS_PLATFORM &&
(ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)))
#endif
ret = close(ms->fd);
(void) ret;
ms_ent->fd = 0;
@ -828,13 +824,11 @@ ms_get_drm_master_fd(ScrnInfoPtr pScrn)
#ifdef XSERVER_PLATFORM_BUS
if (pEnt->location.type == BUS_PLATFORM) {
#ifdef XF86_PDEV_SERVER_FD
if (pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)
ms->fd =
xf86_platform_device_odev_attributes(pEnt->location.id.plat)->
fd;
else
#endif
{
char *path =
xf86_platform_device_odev_attributes(pEnt->location.id.plat)->
@ -1496,11 +1490,9 @@ SetMaster(ScrnInfoPtr pScrn)
modesettingPtr ms = modesettingPTR(pScrn);
int ret;
#ifdef XF86_PDEV_SERVER_FD
if (ms->pEnt->location.type == BUS_PLATFORM &&
(ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))
return TRUE;
#endif
ret = drmSetMaster(ms->fd);
if (ret)
@ -1749,11 +1741,9 @@ LeaveVT(ScrnInfoPtr pScrn)
pScrn->vtSema = FALSE;
#ifdef XF86_PDEV_SERVER_FD
if (ms->pEnt->location.type == BUS_PLATFORM &&
(ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))
return;
#endif
drmDropMaster(ms->fd);
}