mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-19 02:20:27 +01:00
st/xorg: Export helper function for detecting modesetting
This commit is contained in:
parent
16cf7e14a6
commit
36fd55f9f0
2 changed files with 23 additions and 0 deletions
|
|
@ -110,6 +110,28 @@ xorg_tracker_set_functions(ScrnInfoPtr scrn)
|
|||
scrn->ValidMode = drv_valid_mode;
|
||||
}
|
||||
|
||||
Bool
|
||||
xorg_tracker_have_modesetting(ScrnInfoPtr pScrn, struct pci_device *device)
|
||||
{
|
||||
char *BusID = xalloc(64);
|
||||
sprintf(BusID, "pci:%04x:%02x:%02x.%d",
|
||||
device->domain, device->bus,
|
||||
device->dev, device->func);
|
||||
|
||||
if (drmCheckModesettingSupported(BusID)) {
|
||||
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
|
||||
"Drm modesetting not supported %s\n", BusID);
|
||||
xfree(BusID);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0,
|
||||
"Drm modesetting supported on %s\n", BusID);
|
||||
|
||||
xfree(BusID);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Internal function definitions
|
||||
|
|
|
|||
|
|
@ -45,5 +45,6 @@
|
|||
|
||||
void xorg_tracker_set_functions(ScrnInfoPtr scrn);
|
||||
const OptionInfoRec * xorg_tracker_available_options(int chipid, int busid);
|
||||
Bool xorg_tracker_have_modesetting(ScrnInfoPtr pScrn, struct pci_device *device);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue