mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 01:34:11 +00:00
modesetting: Fail in ScreenInit if we can't get a gbm device
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
committed by
Enrico Weigelt
parent
0de74bf2e9
commit
0ac903f4b9
@@ -1986,6 +1986,10 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!ms->drmmode.gbm) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* HW dependent - FIXME */
|
||||
pScrn->displayWidth = pScrn->virtualX;
|
||||
if (!drmmode_create_initial_bos(pScrn, &ms->drmmode))
|
||||
@@ -2315,7 +2319,7 @@ CloseScreen(ScreenPtr pScreen)
|
||||
|
||||
#ifdef GLAMOR_HAS_GBM
|
||||
/* If we didn't get the gbm device from glamor, we have to free it ourserves */
|
||||
if (!ms->drmmode.glamor && ms->drmmode.gbm) {
|
||||
if (!ms->drmmode.glamor) {
|
||||
gbm_device_destroy(ms->drmmode.gbm);
|
||||
ms->drmmode.gbm = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user