From a80785f79268ed3701fc69cbd9194ad12822c82c Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 11 Feb 2013 09:56:25 +1000 Subject: nouveau: fix build against old servers (part 2) Should fix next bit of https://bugs.freedesktop.org/show_bug.cgi?id=60369 Signed-off-by: Dave Airlie --- src/drmmode_display.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 71c9ff9..9eca60f 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -346,9 +346,12 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, drmmode_ConvertToKMode(crtc->scrn, &kmode, mode); fb_id = drmmode->fb_id; +#ifdef NOUVEAU_PIXMAP_SHARING if (crtc->randr_crtc->scanout_pixmap) x = y = 0; - else if (drmmode_crtc->rotate_fb_id) { + else +#endif + if (drmmode_crtc->rotate_fb_id) { fb_id = drmmode_crtc->rotate_fb_id; x = 0; y = 0; @@ -539,11 +542,11 @@ drmmode_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue, } } +#ifdef NOUVEAU_PIXMAP_SHARING static Bool drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix) { ScreenPtr screen = xf86ScrnToScreen(crtc->scrn); - drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; PixmapPtr screenpix = screen->GetScreenPixmap(screen); if (!ppix) { @@ -566,6 +569,7 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix) PixmapStartDirtyTracking(ppix, screenpix, 0, 0); return TRUE; } +#endif static const xf86CrtcFuncsRec drmmode_crtc_funcs = { .dpms = drmmode_crtc_dpms, @@ -579,7 +583,9 @@ static const xf86CrtcFuncsRec drmmode_crtc_funcs = { .shadow_destroy = drmmode_crtc_shadow_destroy, .gamma_set = drmmode_gamma_set, +#ifdef NOUVEAU_PIXMAP_SHARING .set_scanout_pixmap = drmmode_set_scanout_pixmap, +#endif }; -- cgit v1.2.1