From d41684d54592cf93554a4d6534e7ea74562b1798 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 7 Jun 2010 11:18:09 -0700 Subject: [PATCH] Allocate rotate shadow buffers using the usual framebuffer allocator. This means we can get tiling on them, which should significantly boost performance, and also allow for FBC. --- src/drmmode_display.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 63ff9f38..6f7e5f11 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -470,18 +470,15 @@ static void * drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height) { ScrnInfoPtr scrn = crtc->scrn; - intel_screen_private *intel = intel_get_screen_private(scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; - int size, ret; + int ret; unsigned long rotate_pitch; - width = i830_pad_drawable_width(width); - rotate_pitch = width * drmmode->cpp; - size = rotate_pitch * height; - - drmmode_crtc->rotate_bo = - drm_intel_bo_alloc(intel->bufmgr, "rotate", size, 4096); + drmmode_crtc->rotate_bo = i830_allocate_framebuffer(scrn, + width, height, + drmmode->cpp, + &rotate_pitch); if (!drmmode_crtc->rotate_bo) { xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, @@ -489,8 +486,6 @@ drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height) return NULL; } - drm_intel_bo_disable_reuse(drmmode_crtc->rotate_bo); - ret = drmModeAddFB(drmmode->fd, width, height, crtc->scrn->depth, crtc->scrn->bitsPerPixel, rotate_pitch, drmmode_crtc->rotate_bo->handle,