Skip to contentSkip to conversation

uxa: only call intel_sync_close when built with HAVE_DRI3

PATCH In review Jonathan Gray 2 participants 4 messages Sep 2, 2016 – Sep 5, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uxa: only call intel_sync_close when built with HAVE_DRI3

Avoid calling a function only built with dri3, fixes an undefined symbol crash when opting into uxa reported by Walter Alejandro Iglesias when running OpenBSD.

---
 src/uxa/intel_driver.c | 2 ++
 1 file changed, 2 insertions(+)
src/uxa/intel_driver.c +2 -0
index 3703c41..9fb05c4 100644
@@ -1191,7 +1191,9 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL)
 		intel->dri3 = DRI_NONE;
 	}
 
+#if HAVE_DRI3
 	intel_sync_close(screen);
+#endif
 
 	scrn->vtSema = FALSE;
 	return TRUE;
Signature · 6 lines
2.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 14 lines · Jonathan Gray

Avoid calling a function only built with dri3, fixes an undefined symbol crash when opting into uxa reported by Walter Alejandro Iglesias when running OpenBSD.

---
 src/uxa/intel_driver.c | 2 ++
 1 file changed, 2 insertions(+)
src/uxa/intel_driver.c +0 -0
index 3703c41..9fb05c4 100644

src/uxa/intel_driver.c static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL) · line 1196

Quoted 6 lines
src/uxa/intel_driver.c +2 -0
@@ -1191,7 +1191,9 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL)
 		intel->dri3 = DRI_NONE;
 	}
 
+#if HAVE_DRI3
 	intel_sync_close(screen);
+#endif

In src/uxa/intel.h, we have

#if HAVE_DRI3
Bool intel_sync_init(ScreenPtr screen);
void intel_sync_close(ScreenPtr screen);
#else
static inline Bool intel_sync_init(ScreenPtr screen) { return 0; } static inline void intel_sync_close(ScreenPtr screen) { } #endif

Ideas?
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 32 lines · Chris Wilson
Quoted 14 lines · Jonathan Gray

Avoid calling a function only built with dri3, fixes an undefined symbol crash when opting into uxa reported by Walter Alejandro Iglesias when running OpenBSD.

---
 src/uxa/intel_driver.c | 2 ++
 1 file changed, 2 insertions(+)
src/uxa/intel_driver.c +0 -0
index 3703c41..9fb05c4 100644

src/uxa/intel_driver.c static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL) · line 1196

Quoted 6 lines
src/uxa/intel_driver.c +2 -0
@@ -1191,7 +1191,9 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL)
 		intel->dri3 = DRI_NONE;
 	}
 
+#if HAVE_DRI3
 	intel_sync_close(screen);
+#endif

In src/uxa/intel.h, we have

#if HAVE_DRI3
Bool intel_sync_init(ScreenPtr screen);
void intel_sync_close(ScreenPtr screen);
#else
static inline Bool intel_sync_init(ScreenPtr screen) { return 0; } static inline void intel_sync_close(ScreenPtr screen) { } #endif

Quoted 2 lines

Ideas?
-Chris

Sorry I should have mentioned it was with 2.99.916 which has

#if HAVE_DRI3
Bool intel_sync_init(ScreenPtr screen);
void intel_sync_close(ScreenPtr screen);
#else
static inline Bool intel_sync_init(ScreenPtr screen) { return 0; } void intel_sync_close(ScreenPtr screen);
#endif

As the latest 2.99.917 release was causing some issues on broadwell before we made broadwell use modesetting.

I'll revert the patch locally and pull in

commit 067115a51b2646538a38ba603c688233c61e23cd

Author: Chris Wilson <[email protected]>
Date:   Mon Sep 15 08:44:41 2014 +0100

uxa: Stub out intel_sync_init|fini when not compiled in

In order to fix the build without DRI3, we need to stub out the functions not compiled in, such as intel_sync_fini().

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
Quoted 46 lines · Jonathan Gray
Quoted 32 lines · Chris Wilson
Quoted 14 lines · Jonathan Gray

Avoid calling a function only built with dri3, fixes an undefined symbol crash when opting into uxa reported by Walter Alejandro Iglesias when running OpenBSD.

---
 src/uxa/intel_driver.c | 2 ++
 1 file changed, 2 insertions(+)
src/uxa/intel_driver.c +0 -0
index 3703c41..9fb05c4 100644

src/uxa/intel_driver.c static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL) · line 1196

Quoted 6 lines
src/uxa/intel_driver.c +2 -0
@@ -1191,7 +1191,9 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL)
 		intel->dri3 = DRI_NONE;
 	}
 
+#if HAVE_DRI3
 	intel_sync_close(screen);
+#endif

In src/uxa/intel.h, we have

#if HAVE_DRI3
Bool intel_sync_init(ScreenPtr screen);
void intel_sync_close(ScreenPtr screen);
#else
static inline Bool intel_sync_init(ScreenPtr screen) { return 0; } static inline void intel_sync_close(ScreenPtr screen) { } #endif

Quoted 2 lines

Ideas?
-Chris

Sorry I should have mentioned it was with 2.99.916 which has

#if HAVE_DRI3
Bool intel_sync_init(ScreenPtr screen);
void intel_sync_close(ScreenPtr screen);
#else
static inline Bool intel_sync_init(ScreenPtr screen) { return 0; } void intel_sync_close(ScreenPtr screen);
#endif

Quoted 2 lines

As the latest 2.99.917 release was causing some issues on broadwell before we made broadwell use modesetting.

That is more likely to be a bug in your kernel.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx