diff options
author | Anisse Astier <anisse@astier.eu> | 2012-05-10 17:22:59 +0200 |
---|---|---|
committer | Michel Dänzer <michel.daenzer@amd.com> | 2012-05-10 17:44:33 +0200 |
commit | faea3aafa8c9a7c1bc866ffcd847972c5569c8bc (patch) | |
tree | 3250dc6ae62639cedaac30c5e751aa1ade023480 /src/radeon_kms.c | |
parent | b0b7d8d26fd107df342b5c87b0a38e5bb08101a9 (diff) |
Fail more gracefully when drm surface manager can't be initialized
Should make bugs like https://bugs.freedesktop.org/show_bug.cgi?id=48138
easier to diagnose.
[ Michel Dänzer: Appended newline to error message. ]
Signed-off-by: Anisse Astier <anisse@astier.eu>
Singed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src/radeon_kms.c')
-rw-r--r-- | src/radeon_kms.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c index edc8fe3d..ae4953e4 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -1256,6 +1256,11 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen) screen_size = RADEON_ALIGN(pScrn->virtualY, drmmode_get_height_align(pScrn, tiling_flags)) * pitch; base_align = drmmode_get_base_align(pScrn, cpp, tiling_flags); if (info->ChipFamily >= CHIP_FAMILY_R600) { + if(!info->surf_man) { + xf86DrvMsg(pScreen->myNum, X_ERROR, + "failed to initialise surface manager\n"); + return FALSE; + } memset(&surface, 0, sizeof(struct radeon_surface)); surface.npix_x = pScrn->displayWidth; surface.npix_y = pScrn->virtualY; |