summaryrefslogtreecommitdiff
path: root/src/radeon_glamor.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2013-03-12 18:59:19 +0100
committerMichel Dänzer <michel@daenzer.net>2013-03-18 15:12:16 +0100
commit462d8d3b86038438ab854072e546cc7a9efacdd7 (patch)
treeb703e96663ae324bd611b5fbdb2e4db79e71b5a9 /src/radeon_glamor.c
parent3e5350bedf50a1a140e0eba08c39ed2451fb9115 (diff)
glamor: Bail if the glamoregl module wasn't loaded early
Trying to initialize glamor in that case crashes. Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'src/radeon_glamor.c')
-rw-r--r--src/radeon_glamor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
index 5a7561f2..ef7d95ca 100644
--- a/src/radeon_glamor.c
+++ b/src/radeon_glamor.c
@@ -93,6 +93,13 @@ radeon_glamor_pre_init(ScrnInfoPtr scrn)
if (strcasecmp(s, "glamor") != 0)
return FALSE;
+ if (!xf86LoaderCheckSymbol("glamor_egl_init")) {
+ xf86DrvMsg(scrn->scrnIndex, s ? X_ERROR : X_WARNING,
+ "glamor requires Load \"glamoregl\" in "
+ "Section \"Module\", disabling.\n");
+ return FALSE;
+ }
+
/* Load glamor module */
if ((glamor_module = xf86LoadSubModule(scrn, GLAMOR_EGL_MODULE_NAME))) {
version = xf86GetModuleVersion(glamor_module);