mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-06 15:30:11 +01:00
xwayland/glamor: Disable GLAMOR after GBM cleanup
The cleanup function for GBM is called on the various error paths.
Once xwl_glamor_gbm_cleanup() has been called, GBM support is no longer
usable (and the corresponding data structures are freed), so there is
no way we can keep using GLAMOR after that point.
Make sure to explicitly disable GLAMOR support in that case, so we do
not crash later on trying to use GBM.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit e8784b7d89)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1766>
This commit is contained in:
parent
f7e3397e4d
commit
f18a83d6f1
1 changed files with 4 additions and 0 deletions
|
|
@ -634,6 +634,10 @@ xwl_glamor_gbm_cleanup(struct xwl_screen *xwl_screen)
|
|||
if (!xwl_gbm)
|
||||
return;
|
||||
|
||||
/* Cannot use GBM after clean-up, disable GLAMOR support from now on */
|
||||
ErrorF("XWAYLAND: Disabling GLAMOR support\n");
|
||||
xwl_screen->glamor = XWL_GLAMOR_NONE;
|
||||
|
||||
if (xwl_gbm->device_name)
|
||||
free(xwl_gbm->device_name);
|
||||
drmFreeDevice(&xwl_gbm->device);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue