diff options
author | Jerome Glisse <jglisse@redhat.com> | 2009-07-23 20:13:15 +0200 |
---|---|---|
committer | Jerome Glisse <jglisse@redhat.com> | 2009-07-23 20:15:08 +0200 |
commit | 2afc46fa74ce7730f766a3370d323c6b59694186 (patch) | |
tree | b90b30e41b2feac824968688649dd122f23cd4f4 | |
parent | 328e4c816348b6f867df30b39856dbe78c8e0dcc (diff) |
radeon: fix KMS shadowfb for r6xx and newer hw.
We need to map front buffer and also to avoid EXA initialization
when falling back to shadowfb on newer r6xx/r7xx when KMS is enabled.
-rw-r--r-- | src/radeon_kms.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 8a14f881..148386b1 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -543,7 +543,9 @@ Bool RADEONScreenInit_KMS(int scrnIndex, ScreenPtr pScreen, pScrn->defaultVisual)) return FALSE; miSetPixmapDepths (); - info->directRenderingEnabled = radeon_dri2_screen_init(pScreen); + info->directRenderingEnabled = FALSE; + if (info->r600_shadow_fb == FALSE) + info->directRenderingEnabled = radeon_dri2_screen_init(pScreen); front_ptr = info->FB; @@ -689,6 +691,8 @@ Bool RADEONScreenInit_KMS(int scrnIndex, ScreenPtr pScreen, if (info->r600_shadow_fb == TRUE) { if (!shadowSetup(pScreen)) { + xf86DrvMsg(scrnIndex, X_ERROR, + "Shadowfb initialization failed\n"); return FALSE; } } @@ -811,9 +815,11 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen) xf86DrvMsg(pScreen->myNum, X_ERROR, "Memory map already initialized\n"); return FALSE; } - info->accel_state->exa = exaDriverAlloc(); - if (info->accel_state->exa == NULL) - return FALSE; + if (info->r600_shadow_fb == FALSE) { + info->accel_state->exa = exaDriverAlloc(); + if (info->accel_state->exa == NULL) + return FALSE; + } screen_size = RADEON_ALIGN(pScrn->virtualY, 16) * stride; { @@ -849,6 +855,11 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen) info->front_bo = radeon_bo_open(info->bufmgr, 0, screen_size, 0, RADEON_GEM_DOMAIN_VRAM, 0); + if (info->r600_shadow_fb == TRUE) { + if (radeon_bo_map(info->front_bo, 1)) { + ErrorF("Failed to map cursor buffer memory\n"); + } + } xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Front buffer size: %dK\n", info->front_bo->size/1024); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Remaining VRAM size (used for pixmaps): %dK\n", remain_size_bytes/1024); |