From edd88170836ec985ab1a59179de69d50644b8dff Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Sat, 22 Sep 2007 13:02:08 +0200 Subject: [PATCH] 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. --- exa/exa.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/exa/exa.c b/exa/exa.c index eac2d91ce..620502730 100644 --- a/exa/exa.c +++ b/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