[PATCH xf86-video-amdgpu] sync: Check if miSyncShmScreenInit symbol is resolved at runtime

Michel Dänzer michel at daenzer.net
Thu Dec 10 01:51:33 PST 2015


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.

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

diff --git a/src/amdgpu_sync.c b/src/amdgpu_sync.c
index baade0e..e92f658 100644
--- a/src/amdgpu_sync.c
+++ b/src/amdgpu_sync.c
@@ -87,6 +87,13 @@ amdgpu_sync_init(ScreenPtr screen)
 	AMDGPUInfoPtr info = AMDGPUPTR(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.6.2



More information about the xorg-driver-ati mailing list