diff options
Diffstat (limited to 'hw/xfree86')
-rw-r--r-- | hw/xfree86/drivers/modesetting/driver.c | 11 | ||||
-rw-r--r-- | hw/xfree86/drivers/modesetting/drmmode_display.c | 8 | ||||
-rw-r--r-- | hw/xfree86/drivers/modesetting/vblank.c | 7 |
3 files changed, 20 insertions, 6 deletions
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c index 149040e30..d00e4a739 100644 --- a/hw/xfree86/drivers/modesetting/driver.c +++ b/hw/xfree86/drivers/modesetting/driver.c @@ -1368,7 +1368,6 @@ static Bool CreateScreenResources(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); - rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen); modesettingPtr ms = modesettingPTR(pScrn); PixmapPtr rootPixmap; Bool ret; @@ -1434,10 +1433,14 @@ CreateScreenResources(ScreenPtr pScreen) } } - pScrPriv->rrEnableSharedPixmapFlipping = msEnableSharedPixmapFlipping; - pScrPriv->rrDisableSharedPixmapFlipping = msDisableSharedPixmapFlipping; + if (dixPrivateKeyRegistered(rrPrivKey)) { + rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen); - pScrPriv->rrStartFlippingPixmapTracking = msStartFlippingPixmapTracking; + pScrPriv->rrEnableSharedPixmapFlipping = msEnableSharedPixmapFlipping; + pScrPriv->rrDisableSharedPixmapFlipping = msDisableSharedPixmapFlipping; + + pScrPriv->rrStartFlippingPixmapTracking = msStartFlippingPixmapTracking; + } return ret; } diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 9a6abc249..b826bee6a 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -3245,13 +3245,19 @@ static void drmmode_validate_leases(ScrnInfoPtr scrn) { ScreenPtr screen = scrn->pScreen; - rrScrPrivPtr scr_priv = rrGetScrPriv(screen); + rrScrPrivPtr scr_priv; modesettingPtr ms = modesettingPTR(scrn); drmmode_ptr drmmode = &ms->drmmode; drmModeLesseeListPtr lessees; RRLeasePtr lease, next; int l; + /* Bail out if RandR wasn't initialized. */ + if (!dixPrivateKeyRegistered(rrPrivKey)) + return; + + scr_priv = rrGetScrPriv(screen); + /* We can't talk to the kernel about leases when VT switched */ if (!scrn->vtSema) return; diff --git a/hw/xfree86/drivers/modesetting/vblank.c b/hw/xfree86/drivers/modesetting/vblank.c index ac4c71e38..dec5cad97 100644 --- a/hw/xfree86/drivers/modesetting/vblank.c +++ b/hw/xfree86/drivers/modesetting/vblank.c @@ -220,7 +220,7 @@ static RRCrtcPtr ms_covering_randr_crtc(ScreenPtr pScreen, BoxPtr box, Bool screen_is_ms) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); - rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen); + rrScrPrivPtr pScrPriv; RRCrtcPtr crtc, best_crtc; int coverage, best_coverage; int c; @@ -230,6 +230,11 @@ ms_covering_randr_crtc(ScreenPtr pScreen, BoxPtr box, Bool screen_is_ms) best_crtc = NULL; best_coverage = 0; + if (!dixPrivateKeyRegistered(rrPrivKey)) + return NULL; + + pScrPriv = rrGetScrPriv(pScreen); + if (!pScrPriv) return NULL; |