kmsro: add error message on drm ioctl failure

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16949>
This commit is contained in:
Mike Blumenkrantz 2022-06-09 11:21:05 -04:00 committed by Marge Bot
parent c24d8ba316
commit 8987e266e4
1 changed files with 4 additions and 1 deletions

View File

@ -33,6 +33,7 @@
#include <stdint.h>
#include <string.h>
#include <limits.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/mman.h>
@ -187,8 +188,10 @@ kms_sw_displaytarget_create(struct sw_winsys *ws,
create_req.width = width;
create_req.height = height;
ret = drmIoctl(kms_sw->fd, DRM_IOCTL_MODE_CREATE_DUMB, &create_req);
if (ret)
if (ret) {
fprintf(stderr, "KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: %s\n", strerror(errno));
goto free_bo;
}
kms_sw_dt->size = create_req.size;
kms_sw_dt->handle = create_req.handle;