EXA: Check ABI compatibility earlier.

If the driver isn't compatible to the server, all bets are off anyway wrt
the contents of the fields that we're validating, which can lead to bogus
error messages.
This commit is contained in:
Tilman Sauerbeck 2007-09-22 13:02:08 +02:00
parent abe0a51f3f
commit edd8817083

View File

@ -660,6 +660,17 @@ exaDriverInit (ScreenPtr pScreen,
if (!pScreenInfo)
return FALSE;
if (pScreenInfo->exa_major != EXA_VERSION_MAJOR ||
pScreenInfo->exa_minor > EXA_VERSION_MINOR)
{
LogMessage(X_ERROR, "EXA(%d): driver's EXA version requirements "
"(%d.%d) are incompatible with EXA version (%d.%d)\n",
pScreen->myNum,
pScreenInfo->exa_major, pScreenInfo->exa_minor,
EXA_VERSION_MAJOR, EXA_VERSION_MINOR);
return FALSE;
}
if (!pScreenInfo->memoryBase) {
LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::memoryBase must be "
"non-zero\n", pScreen->myNum);
@ -696,17 +707,6 @@ exaDriverInit (ScreenPtr pScreen,
return FALSE;
}
if (pScreenInfo->exa_major != EXA_VERSION_MAJOR ||
pScreenInfo->exa_minor > EXA_VERSION_MINOR)
{
LogMessage(X_ERROR, "EXA(%d): driver's EXA version requirements "
"(%d.%d) are incompatible with EXA version (%d.%d)\n",
pScreen->myNum,
pScreenInfo->exa_major, pScreenInfo->exa_minor,
EXA_VERSION_MAJOR, EXA_VERSION_MINOR);
return FALSE;
}
#ifdef RENDER
ps = GetPictureScreenIfSet(pScreen);
#endif