Comment # 31 on bug 835975 from
After doing an hour or so of tracing the code, it appears that the issue is in
the for loop at line 125 in xf86Bus.c. In the loop, it calls
xf86CallDriverProbe with args xf86DriverList[i] and FALSE.

This is _supposed_ to append a new entry to the xf86Screens[] array according
to the comments in the code. However, from reading through the code, this
comment seems to be stale, since it returns an int, not an array, and the call
itself does not push anything onto that array either.

On top of that, the logic for this section of code seems a bit screwy, since
normally, we'd want that returned INTO something, but it just sits there in
void return context.

Walking through xf86CallDriverProbe, the call returns foundScreen as TRUE, but
if you look, there is no assignment to store how many screens were detected.
This causes the if block right after that to fail.

Honestly, I'm pretty unsure how this works even for other cards in the series,
since it seems that this would occur more often.

I _think_ the right change for this would be to change the code like so:

@@ -125,3 +125,3 @@
     for (i = 0; i < xf86NumDrivers; i++) {
-         xf86CallDriverProbe(xf86DriverList[i], FALSE);
+         xf86NumScreens = xf86CallDriverProbe(xf86DriverList[i], FALSE);
     }


You are receiving this mail because: