mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
modesetting: Handle bo allocation failure
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
committed by
Enrico Weigelt
parent
4c4fb5f5f1
commit
585810fb13
@@ -4910,6 +4910,16 @@ drmmode_create_initial_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
|
||||
min_height = MIN(height, min_height);
|
||||
|
||||
drmmode_crtc->cursor.bo = dumb_bo_create(drmmode->fd, width, height, bpp);
|
||||
if (!drmmode_crtc->cursor.bo) {
|
||||
drmmode_bo_destroy(drmmode, &drmmode->front_bo);
|
||||
for (int j = 0; j < i; j++) {
|
||||
xf86CrtcPtr free_crtc = xf86_config->crtc[j];
|
||||
drmmode_crtc_private_ptr free_drmmode_crtc = free_crtc->driver_private;
|
||||
dumb_bo_destroy(drmmode->fd, free_drmmode_crtc->cursor.bo);
|
||||
free_drmmode_crtc->cursor.bo = NULL;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
ms->cursor_image_width = min_width;
|
||||
|
||||
Reference in New Issue
Block a user