aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c9
-rw-r--r--backend/drm/renderer.c4
2 files changed, 6 insertions, 7 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 9e2c870b..c9d3b54a 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -676,10 +676,9 @@ static bool drm_connector_init_renderer(struct wlr_drm_connector *conn,
int width = mode.hdisplay;
int height = mode.vdisplay;
- uint32_t format = DRM_FORMAT_ARGB8888;
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)) {
if (!modifiers) {
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");
modifiers = false;
- if (!drm_plane_init_surface(plane, drm, width, height, format,
- modifiers)) {
+ if (!drm_plane_init_surface(plane, drm, width, height, modifiers)) {
return false;
}
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);
h = ret ? 64 : h;
- if (!drm_plane_init_surface(plane, drm, w, h,
- DRM_FORMAT_ARGB8888, true)) {
+ if (!drm_plane_init_surface(plane, drm, w, h, true)) {
wlr_drm_conn_log(conn, WLR_ERROR, "Cannot allocate cursor resources");
return false;
}
diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c
index 5ca7ed46..1e2888fa 100644
--- a/backend/drm/renderer.c
+++ b/backend/drm/renderer.c
@@ -193,7 +193,9 @@ static struct wlr_drm_format *create_linear_format(uint32_t format) {
bool drm_plane_init_surface(struct wlr_drm_plane *plane,
struct wlr_drm_backend *drm, int32_t width, uint32_t height,
- uint32_t format, bool with_modifiers) {
+ bool with_modifiers) {
+ uint32_t format = DRM_FORMAT_ARGB8888;
+
if (!wlr_drm_format_set_has(&plane->formats, format, DRM_FORMAT_MOD_INVALID)) {
const struct wlr_pixel_format_info *info =
drm_get_pixel_format_info(format);