|
|
@ -140,7 +140,7 @@ dri2_connect(struct x11_compositor *c) |
|
|
|
xcb_dri2_query_version_reply (c->conn, |
|
|
|
xcb_dri2_query_version_reply (c->conn, |
|
|
|
dri2_query_cookie, &error); |
|
|
|
dri2_query_cookie, &error); |
|
|
|
if (dri2_query == NULL || error != NULL) { |
|
|
|
if (dri2_query == NULL || error != NULL) { |
|
|
|
fprintf(stderr, "DRI2: failed to query version"); |
|
|
|
fprintf(stderr, "DRI2: failed to query version\n"); |
|
|
|
free(error); |
|
|
|
free(error); |
|
|
|
return EGL_FALSE; |
|
|
|
return EGL_FALSE; |
|
|
|
} |
|
|
|
} |
|
|
@ -152,7 +152,8 @@ dri2_connect(struct x11_compositor *c) |
|
|
|
connect_cookie, NULL); |
|
|
|
connect_cookie, NULL); |
|
|
|
if (connect == NULL || |
|
|
|
if (connect == NULL || |
|
|
|
connect->driver_name_length + connect->device_name_length == 0) { |
|
|
|
connect->driver_name_length + connect->device_name_length == 0) { |
|
|
|
fprintf(stderr, "DRI2: failed to authenticate"); |
|
|
|
fprintf(stderr, "DRI2: failed to connect, DRI2 version: %u.%u\n", |
|
|
|
|
|
|
|
c->dri2_major, c->dri2_minor); |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -177,7 +178,7 @@ dri2_connect(struct x11_compositor *c) |
|
|
|
fd = open(path, O_RDWR); |
|
|
|
fd = open(path, O_RDWR); |
|
|
|
if (fd < 0) { |
|
|
|
if (fd < 0) { |
|
|
|
fprintf(stderr, |
|
|
|
fprintf(stderr, |
|
|
|
"DRI2: could not open %s (%s)", path, strerror(errno)); |
|
|
|
"DRI2: could not open %s (%s)\n", path, strerror(errno)); |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -197,7 +198,7 @@ dri2_authenticate(struct x11_compositor *c, uint32_t magic) |
|
|
|
xcb_dri2_authenticate_reply(c->conn, |
|
|
|
xcb_dri2_authenticate_reply(c->conn, |
|
|
|
authenticate_cookie, NULL); |
|
|
|
authenticate_cookie, NULL); |
|
|
|
if (authenticate == NULL || !authenticate->authenticated) { |
|
|
|
if (authenticate == NULL || !authenticate->authenticated) { |
|
|
|
fprintf(stderr, "DRI2: failed to authenticate"); |
|
|
|
fprintf(stderr, "DRI2: failed to authenticate\n"); |
|
|
|
free(authenticate); |
|
|
|
free(authenticate); |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
} |
|
|
|
} |
|
|
@ -222,7 +223,7 @@ x11_compositor_init_egl(struct x11_compositor *c) |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
|
|
|
|
|
|
|
|
if (drmGetMagic(c->base.drm.fd, &magic)) { |
|
|
|
if (drmGetMagic(c->base.drm.fd, &magic)) { |
|
|
|
fprintf(stderr, "DRI2: failed to get drm magic"); |
|
|
|
fprintf(stderr, "DRI2: failed to get drm magic\n"); |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|