|
|
@ -676,10 +676,9 @@ static bool drm_connector_init_renderer(struct wlr_drm_connector *conn,
|
|
|
|
|
|
|
|
|
|
|
|
int width = mode.hdisplay;
|
|
|
|
int width = mode.hdisplay;
|
|
|
|
int height = mode.vdisplay;
|
|
|
|
int height = mode.vdisplay;
|
|
|
|
uint32_t format = DRM_FORMAT_ARGB8888;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool modifiers = drm->addfb2_modifiers;
|
|
|
|
bool modifiers = drm->addfb2_modifiers;
|
|
|
|
if (!drm_plane_init_surface(plane, drm, width, height, format, modifiers) ||
|
|
|
|
if (!drm_plane_init_surface(plane, drm, width, height, modifiers) ||
|
|
|
|
!drm_connector_pageflip_renderer(conn, state)) {
|
|
|
|
!drm_connector_pageflip_renderer(conn, state)) {
|
|
|
|
if (!modifiers) {
|
|
|
|
if (!modifiers) {
|
|
|
|
wlr_drm_conn_log(conn, WLR_ERROR, "Failed to initialize renderer:"
|
|
|
|
wlr_drm_conn_log(conn, WLR_ERROR, "Failed to initialize renderer:"
|
|
|
@ -694,8 +693,7 @@ static bool drm_connector_init_renderer(struct wlr_drm_connector *conn,
|
|
|
|
"retrying without modifiers");
|
|
|
|
"retrying without modifiers");
|
|
|
|
modifiers = false;
|
|
|
|
modifiers = false;
|
|
|
|
|
|
|
|
|
|
|
|
if (!drm_plane_init_surface(plane, drm, width, height, format,
|
|
|
|
if (!drm_plane_init_surface(plane, drm, width, height, modifiers)) {
|
|
|
|
modifiers)) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!drm_connector_pageflip_renderer(conn, state)) {
|
|
|
|
if (!drm_connector_pageflip_renderer(conn, state)) {
|
|
|
@ -860,8 +858,7 @@ static bool drm_connector_set_cursor(struct wlr_output *output,
|
|
|
|
ret = drmGetCap(drm->fd, DRM_CAP_CURSOR_HEIGHT, &h);
|
|
|
|
ret = drmGetCap(drm->fd, DRM_CAP_CURSOR_HEIGHT, &h);
|
|
|
|
h = ret ? 64 : h;
|
|
|
|
h = ret ? 64 : h;
|
|
|
|
|
|
|
|
|
|
|
|
if (!drm_plane_init_surface(plane, drm, w, h,
|
|
|
|
if (!drm_plane_init_surface(plane, drm, w, h, true)) {
|
|
|
|
DRM_FORMAT_ARGB8888, true)) {
|
|
|
|
|
|
|
|
wlr_drm_conn_log(conn, WLR_ERROR, "Cannot allocate cursor resources");
|
|
|
|
wlr_drm_conn_log(conn, WLR_ERROR, "Cannot allocate cursor resources");
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|