summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-02-10 01:54:23 -0800
committerKenneth Graunke <[email protected]>2014-02-11 02:23:22 -0800
commiteaf3358e0a1323ed417b6875e70fdcdc30ed97e0 (patch)
tree2f4e0b7e61e4f664976f7719b67be38cb96f3ddc /src
parentb47d231526821f5cff99546a984103a7222bc66c (diff)
i965: Don't call abort() on an unknown device.
If we don't recognize the PCI ID, we can't reasonably load the driver. However, calling abort() is quite rude - it means the application that tried to initialize us (possibly the X server) can't continue via fallback paths. We already have a more polite mechanism - failing to create the context. So, just use that. While we're at it, improve the error message. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73024 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Tested-by: Lu Hua <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_device_info.c4
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_device_info.c b/src/mesa/drivers/dri/i965/brw_device_info.c
index eb1df79ce49..d931091ee6e 100644
--- a/src/mesa/drivers/dri/i965/brw_device_info.c
+++ b/src/mesa/drivers/dri/i965/brw_device_info.c
@@ -229,7 +229,7 @@ brw_get_device_info(int devid)
#define CHIPSET(id, family, name) case id: return &brw_device_info_##family;
#include "pci_ids/i965_pci_ids.h"
default:
- fprintf(stderr, "Unknown Intel device.");
- abort();
+ fprintf(stderr, "i965_dri.so does not support the 0x%x PCI ID.\n", devid);
+ return NULL;
}
}
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 6ab3609c4ed..acdb5f393b9 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -1328,6 +1328,8 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
intelScreen->deviceID = drm_intel_bufmgr_gem_get_devid(intelScreen->bufmgr);
intelScreen->devinfo = brw_get_device_info(intelScreen->deviceID);
+ if (!intelScreen->devinfo)
+ return false;
intelScreen->hw_must_use_separate_stencil = intelScreen->devinfo->gen >= 7;