diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2006-03-03 16:27:37 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2006-03-03 16:27:37 +0000 |
commit | ab4c2f3bf4b26fdd597ea7b7a726ae77778617b2 (patch) | |
tree | 4317142f872bffbc8d2e57018be122383456b056 /src | |
parent | be6216cd8c6a47dd053240f7a5d1445b61f79038 (diff) |
Check the version of shadow being used and turn off rotation if it isn't thexf86-video-i810-1_5_1_0
right one.
Bump the Xvideo resolution support from 1920x1080 to 1920x1088.
Diffstat (limited to 'src')
-rw-r--r-- | src/i810.h | 2 | ||||
-rw-r--r-- | src/i830.h | 1 | ||||
-rw-r--r-- | src/i830_dri.h | 2 | ||||
-rw-r--r-- | src/i830_driver.c | 53 | ||||
-rw-r--r-- | src/i830_video.c | 4 |
5 files changed, 43 insertions, 19 deletions
@@ -67,7 +67,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define I810_DRIVER_NAME "i810" #define I810_MAJOR_VERSION 1 #define I810_MINOR_VERSION 5 -#define I810_PATCHLEVEL 0 +#define I810_PATCHLEVEL 1 /* HWMC Surfaces */ @@ -221,6 +221,7 @@ typedef struct _I830Rec { #endif unsigned int LinearAlloc; + XF86ModReqInfo shadowReq; /* to test for later libshadow */ I830MemRange RotatedMem; I830MemRange RotatedMem2; Rotation rotation; diff --git a/src/i830_dri.h b/src/i830_dri.h index b1cb5887..e511ac7f 100644 --- a/src/i830_dri.h +++ b/src/i830_dri.h @@ -10,7 +10,7 @@ #define I830_MAJOR_VERSION 1 #define I830_MINOR_VERSION 5 -#define I830_PATCHLEVEL 0 +#define I830_PATCHLEVEL 1 #define I830_REG_SIZE 0x80000 diff --git a/src/i830_driver.c b/src/i830_driver.c index 622565c8..fb748752 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -3516,9 +3516,26 @@ I830BIOSPreInit(ScrnInfoPtr pScrn, int flags) } #endif - if (!xf86LoadSubModule(pScrn, "shadow")) { - PreInitCleanup(pScrn); - return FALSE; + /* rotation requires the newer libshadow */ + if (I830IsPrimary(pScrn)) { + int errmaj, errmin; + pI830->shadowReq.majorversion = 1; + pI830->shadowReq.minorversion = 1; + + if (!LoadSubModule(pScrn->module, "shadow", NULL, NULL, NULL, + &pI830->shadowReq, &errmaj, &errmin)) { + pI830->shadowReq.minorversion = 0; + if (!LoadSubModule(pScrn->module, "shadow", NULL, NULL, NULL, + &pI830->shadowReq, &errmaj, &errmin)) { + LoaderErrorMsg(NULL, "shadow", errmaj, errmin); + return FALSE; + } + } + } else { + I830Ptr pI8301 = I830PTR(pI830->entityPrivate->pScrn_1); + pI830->shadowReq.majorversion = pI8301->shadowReq.majorversion; + pI830->shadowReq.minorversion = pI8301->shadowReq.minorversion; + pI830->shadowReq.patchlevel = pI8301->shadowReq.patchlevel; } xf86LoaderReqSymLists(I810shadowSymbols, NULL); @@ -5104,17 +5121,21 @@ I830BIOSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) pI830->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = I830BIOSCloseScreen; - /* Rotation */ - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "RandR enabled, ignore the following RandR disabled message.\n"); - xf86DisableRandR(); /* Disable built-in RandR extension */ - - shadowSetup(pScreen); - /* support all rotations */ - I830RandRInit(pScreen, RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270); - pI830->PointerMoved = pScrn->PointerMoved; - pScrn->PointerMoved = I830PointerMoved; - pI830->CreateScreenResources = pScreen->CreateScreenResources; - pScreen->CreateScreenResources = I830CreateScreenResources; + if (pI830->shadowReq.minorversion >= 1) { + /* Rotation */ + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "RandR enabled, ignore the following RandR disabled message.\n"); + xf86DisableRandR(); /* Disable built-in RandR extension */ + shadowSetup(pScreen); + /* support all rotations */ + I830RandRInit(pScreen, RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270); + pI830->PointerMoved = pScrn->PointerMoved; + pScrn->PointerMoved = I830PointerMoved; + pI830->CreateScreenResources = pScreen->CreateScreenResources; + pScreen->CreateScreenResources = I830CreateScreenResources; + } else { + /* Rotation */ + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "libshadow is version %d.%d.%d, required 1.1.0 or greater for rotation.\n",pI830->shadowReq.majorversion,pI830->shadowReq.minorversion,pI830->shadowReq.patchlevel); + } if (serverGeneration == 1) xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options); @@ -5827,7 +5848,9 @@ I830BIOSCloseScreen(int scrnIndex, ScreenPtr pScreen) pI830->used3D = NULL; } - pScrn->PointerMoved = pI830->PointerMoved; + if (pI830->shadowReq.minorversion >= 1) + pScrn->PointerMoved = pI830->PointerMoved; + pScrn->vtSema = FALSE; pI830->closing = FALSE; pScreen->CloseScreen = pI830->CloseScreen; diff --git a/src/i830_video.c b/src/i830_video.c index 28e95be9..b655280d 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -118,9 +118,9 @@ static Atom xvBrightness, xvContrast, xvColorKey, xvPipe, xvDoubleBuffer; static Atom xvGamma0, xvGamma1, xvGamma2, xvGamma3, xvGamma4, xvGamma5; #define IMAGE_MAX_WIDTH 1920 -#define IMAGE_MAX_HEIGHT 1080 +#define IMAGE_MAX_HEIGHT 1088 #define IMAGE_MAX_WIDTH_LEGACY 1024 -#define IMAGE_MAX_HEIGHT_LEGACY 1080 +#define IMAGE_MAX_HEIGHT_LEGACY 1088 #if !VIDEO_DEBUG #define ErrorF Edummy |