[PATCH xserver] glamor: Fix crash when master gpu is using glamor and another gpu is hotplugged

Eric Anholt eric at anholt.net
Tue Sep 6 20:22:28 UTC 2016


Hans de Goede <hdegoede at redhat.com> writes:

> When a GPU gets hotplugged while X is already running, glamor_egl_init()
> gets called and changes the current egl context at a point where glamor
> does not expect this.
>
> This causes glamor to e.g. crash in the next glamor_create_pixmap() call
> (caled through the master's screen->CreatePixmap), note this is not the
> only troublesome entry point I've seen other backtraces when using a
> composting window manager.
>
> Adding glamor_make_current calls to all entry points is quite expensive,
> so this commit consists of a miminal fix for this problem by restoring the
> original egl context when leaving glamor_egl_init() with an error, based
> on only usb gpu's getting hotplugged and they do not support glamor.

I think the problem is just mismatching our lastGLContext with the
actual makecurrent state.  Couldn't we just use glamor_make_current()
instead of our own eglMakeCurrent() call in this function?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160906/167b2310/attachment.sig>


More information about the xorg-devel mailing list