diff options
author | Dave Airlie <airlied@redhat.com> | 2012-06-02 17:14:14 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-06-02 17:24:28 +0100 |
commit | 89a4c79a43a2b6963e41d7812e8fe5beedb556af (patch) | |
tree | 6e96b3479c9e81a2fc730fc10773c6ddfab97cd7 | |
parent | c1b9b2c9d71a87a0b98ccdb542da8a30c8c4d99a (diff) |
radeon: fix smooth startup with tiling enabled.
We need to use the surface we worked out when we allocated the front bo,
not work out a new surface from scratch.
This fixes smooth handover from plymouth to gdm on F17.
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | src/drmmode_display.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index a304c1d0..d407a889 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -53,7 +53,7 @@ static PixmapPtr drmmode_create_bo_pixmap(ScrnInfoPtr pScrn, int width, int height, int depth, int bpp, int pitch, int tiling, - struct radeon_bo *bo) + struct radeon_bo *bo, struct radeon_surface *psurf) { RADEONInfoPtr info = RADEONPTR(pScrn); ScreenPtr pScreen = pScrn->pScreen; @@ -73,7 +73,9 @@ static PixmapPtr drmmode_create_bo_pixmap(ScrnInfoPtr pScrn, radeon_set_pixmap_bo(pixmap, bo); if (info->ChipFamily >= CHIP_FAMILY_R600) { surface = radeon_get_pixmap_surface(pixmap); - if (surface) { + if (surface && psurf) + *surface = *psurf; + else if (surface) { memset(surface, 0, sizeof(struct radeon_surface)); surface->npix_x = width; surface->npix_y = height; @@ -223,7 +225,7 @@ create_pixmap_for_fbcon(drmmode_ptr drmmode, pixmap = drmmode_create_bo_pixmap(pScrn, fbcon->width, fbcon->height, fbcon->depth, fbcon->bpp, - fbcon->pitch, 0, bo); + fbcon->pitch, 0, bo, NULL); if (!pixmap) return NULL; @@ -278,7 +280,7 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode) dst = drmmode_create_bo_pixmap(pScrn, pScrn->virtualX, pScrn->virtualY, pScrn->depth, pScrn->bitsPerPixel, pitch, - tiling_flags, info->front_bo); + tiling_flags, info->front_bo, &info->front_surface); if (!dst) goto out_free_src; @@ -551,7 +553,7 @@ drmmode_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height) pScrn->depth, pScrn->bitsPerPixel, rotate_pitch, - 0, drmmode_crtc->rotate_bo); + 0, drmmode_crtc->rotate_bo, NULL); if (rotate_pixmap == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Couldn't allocate shadow pixmap for rotated CRTC\n"); |