https://bugs.freedesktop.org/show_bug.cgi?id=54570
--- Comment #14 from Mike Lothian <[email protected]> 2012-09-08 11:06:54 UTC --- Trying out patch 7 diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 9b9fc83..6bb882b 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1553,7 +1553,8 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp) xf86ProviderSetup(pScrn, NULL, "radeon"); #endif - xf86InitialConfiguration(pScrn, TRUE); + if (drmmode->mode_res->count_connectors != 0) + xf86InitialConfiguration(pScrn, TRUE); drmmode->event_context.version = DRM_EVENT_CONTEXT_VERSION; drmmode->event_context.vblank_handler = drmmode_vblank_handler; diff --git a/src/radeon_kms.c b/src/radeon_kms.c index e953082..518e0ba 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -954,7 +954,7 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags) if (!xf86LoadSubModule(pScrn, "ramdac")) return FALSE; } - if (pScrn->modes == NULL) { + if (!pScrn->is_gpu && pScrn->modes == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No modes.\n"); goto fail; } @@ -1152,37 +1152,42 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "radeon_setup_kernel_mem failed\n"); return FALSE; } - front_ptr = info->front_bo->ptr; - if (info->r600_shadow_fb) { - info->fb_shadow = calloc(1, - pScrn->displayWidth * pScrn->virtualY * - ((pScrn->bitsPerPixel + 7) >> 3)); - if (info->fb_shadow == NULL) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "Failed to allocate shadow framebuffer\n"); - info->r600_shadow_fb = FALSE; - } else { - if (!fbScreenInit(pScreen, info->fb_shadow, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth, - pScrn->bitsPerPixel)) - return FALSE; - } - } - - if (info->r600_shadow_fb == FALSE) { - /* Init fb layer */ - if (!fbScreenInit(pScreen, front_ptr, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth, - pScrn->bitsPerPixel)) - return FALSE; + ErrorF("front bo is %p\n", info->front_bo); + if (info->front_bo) { + front_ptr = info->front_bo->ptr; + + if (info->r600_shadow_fb) { + info->fb_shadow = calloc(1, + pScrn->displayWidth * pScrn->virtualY * + ((pScrn->bitsPerPixel + 7) >> 3)); + if (info->fb_shadow == NULL) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to allocate shadow framebuffer\n"); + info->r600_shadow_fb = FALSE; + } else { + if (!fbScreenInit(pScreen, info->fb_shadow, + pScrn->virtualX, pScrn->virtualY, + pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth, + pScrn->bitsPerPixel)) + return FALSE; + } + } + + if (info->r600_shadow_fb == FALSE) { + /* Init fb layer */ + if (!fbScreenInit(pScreen, front_ptr, + pScrn->virtualX, pScrn->virtualY, + pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth, + pScrn->bitsPerPixel)) + return FALSE; + } } xf86SetBlackWhitePixels(pScreen); - if (pScrn->bitsPerPixel > 8) { + ErrorF("bpp is %d\n", pScrn->bitsPerPixel); + if (pScrn->bitsPerPixel > 8 && pScreen->visuals) { VisualPtr visual; visual = pScreen->visuals + pScreen->numVisuals; @@ -1201,6 +1206,7 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL) /* Must be after RGB order fixed */ fbPictureInit (pScreen, 0, 0); + ErrorF("after pic init\n"); #ifdef RENDER if ((s = xf86GetOptValString(info->Options, OPTION_SUBPIXEL_ORDER))) { if (strcmp(s, "RGB") == 0) subPixelOrder = SubPixelHorizontalRGB; @@ -1210,6 +1216,7 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL) } #endif + ErrorF("pre vt sema\n"); pScrn->vtSema = TRUE; /* Backing store setup */ xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, @@ -1427,6 +1434,9 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen) } else tiling_flags |= RADEON_TILING_MACRO; } + + if (pScrn->is_gpu && !pScrn->virtualX && !pScrn->virtualY) + return; pitch = RADEON_ALIGN(pScrn->virtualX, drmmode_get_pitch_align(pScrn, cpp, tiling_flags)) * cpp; screen_size = RADEON_ALIGN(pScrn->virtualY, drmmode_get_height_align(pScrn, tiling_flags)) * pitch; base_align = drmmode_get_base_align(pScrn, cpp, tiling_flags); -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ xorg-driver-ati mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-driver-ati
