From ee293fab58da190943426a6d23380dd04200a4ff Mon Sep 17 00:00:00 2001 From: emersion Date: Tue, 29 Jan 2019 12:04:12 +0100 Subject: backend/drm: fix GBM format mismatch We create the EGL config with GBM_FORMAT_ARGB8888, but then initialize GBM BOs with GBM_FORMAT_XRGB8888. This mismatch confuses Mesa. Instead, we can always use GBM_FORMAT_ARGB8888, and use DRM_FORMAT_XRGB8888 when calling drmModeAddFB2. Fixes https://github.com/swaywm/wlroots/issues/1438 --- backend/drm/atomic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backend/drm/atomic.c') diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c index fc649d68..c9fb1f45 100644 --- a/backend/drm/atomic.c +++ b/backend/drm/atomic.c @@ -172,7 +172,8 @@ static bool atomic_crtc_set_cursor(struct wlr_drm_backend *drm, atomic_begin(crtc, &atom); if (bo) { - set_plane_props(&atom, plane, crtc->id, get_fb_for_bo(bo), false); + uint32_t fb_id = get_fb_for_bo(bo, plane->drm_format); + set_plane_props(&atom, plane, crtc->id, fb_id, false); } else { atomic_add(&atom, plane->id, plane->props.fb_id, 0); atomic_add(&atom, plane->id, plane->props.crtc_id, 0); -- cgit v1.2.3