mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
xfree86/modesetting: prevent modesetting driver from
grabbing claimed slots This patch makes modesetting driver use the return value of the extended xf86ClaimFbSlot to prevent crashes. Fixes: https://github.com/X11Libre/xserver/issues/1505 Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
This commit is contained in:
committed by
Enrico Weigelt
parent
9307a252c9
commit
ae689438dc
@@ -499,8 +499,6 @@ Probe(DriverPtr drv, int flags)
|
||||
int i, numDevSections;
|
||||
GDevPtr *devSections;
|
||||
Bool foundScreen = FALSE;
|
||||
const char *dev;
|
||||
ScrnInfoPtr scrn = NULL;
|
||||
|
||||
/* For now, just bail out for PROBE_DETECT. */
|
||||
if (flags & PROBE_DETECT)
|
||||
@@ -515,11 +513,15 @@ Probe(DriverPtr drv, int flags)
|
||||
}
|
||||
|
||||
for (i = 0; i < numDevSections; i++) {
|
||||
int entity_num;
|
||||
dev = xf86FindOptionValue(devSections[i]->options, "kmsdev");
|
||||
if (probe_hw(dev, NULL)) {
|
||||
int entity_num = -1;
|
||||
ScrnInfoPtr scrn = NULL;
|
||||
const char *dev = xf86FindOptionValue(devSections[i]->options, "kmsdev");
|
||||
|
||||
if (probe_hw(dev, NULL)) {
|
||||
entity_num = xf86ClaimFbSlot(drv, 0, devSections[i], TRUE);
|
||||
}
|
||||
|
||||
if (entity_num != -1) {
|
||||
scrn = xf86ConfigFbEntity(scrn, 0, entity_num, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user