summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnisse Astier <anisse@astier.eu>2012-05-10 17:22:59 +0200
committerMichel Dänzer <michel.daenzer@amd.com>2012-05-10 17:44:33 +0200
commitfaea3aafa8c9a7c1bc866ffcd847972c5569c8bc (patch)
tree3250dc6ae62639cedaac30c5e751aa1ade023480 /src
parentb0b7d8d26fd107df342b5c87b0a38e5bb08101a9 (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')
-rw-r--r--src/radeon_kms.c5
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;