summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-06-07 11:18:09 -0700
committerEric Anholt <eric@anholt.net>2010-06-07 11:18:09 -0700
commitd41684d54592cf93554a4d6534e7ea74562b1798 (patch)
treee6f1599913334aab508f7e27becdec1491d97cbe
parentb5c9de10ba3a811f312e622b97ee5e601bd3b74f (diff)
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.
-rw-r--r--src/drmmode_display.c15
1 files 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,