[PATCH xf86-video-ati 2/6] sync: Check if miSyncShmScreenInit symbol is resolved at runtime

Michel Dänzer michel at daenzer.net
Tue Feb 16 08:29:05 UTC 2016


From: Michel Dänzer <michel.daenzer at amd.com>

It may be disabled in the Xorg build, either explicitly or because the
xshmfence library isn't available.

(ported from amdgpu commit 1d0b0c1794e65e581a48aa9fb19679d928d82a5d)

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/radeon_sync.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/radeon_sync.c b/src/radeon_sync.c
index d9ffbaf..86e0283 100644
--- a/src/radeon_sync.c
+++ b/src/radeon_sync.c
@@ -85,6 +85,13 @@ radeon_sync_init(ScreenPtr screen)
 	RADEONInfoPtr info = RADEONPTR(scrn);
 	SyncScreenFuncsPtr screen_funcs;
 
+	if (!xf86LoaderCheckSymbol("miSyncShmScreenInit")) {
+		xf86DrvMsg(scrn->scrnIndex, X_WARNING,
+			   "SYNC extension fences disabled because "
+			   "miSyncShmScreenInit symbol unresolved\n");
+		return FALSE;
+	}
+
 	if (!miSyncShmScreenInit(screen)) {
 		xf86DrvMsg(scrn->scrnIndex, X_WARNING,
 			   "SYNC extension fences disabled because "
-- 
2.7.0



More information about the xorg-driver-ati mailing list