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:
parent
abe0a51f3f
commit
edd8817083
22
exa/exa.c
22
exa/exa.c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue