With mesa 10.5.1 and on, weston won't start with DRM backend, saying that it can't find EGL config. I looked into it a little, weston attempts to find XRGB8888 but it only gets ARGB8888 and RGB565.
Reverting commit 65c8965d033cf9ade5e6f3c88bda6d247d46af9d: egl: Take alpha bits into account when selecting GBM formats, which has been backported to 10.5 and 10.4 branches eliminates the problem.
There is a workaround patch proposed for Weston:
Still, ARGB for a framebuffer format is a bit funny. XRGB is what we'd want, since the alpha is not supposed to be interpreted by scanout.
Should Weston just take the ARGB from Mesa/GBM and tell KMS it's XRGB?
It seems that commit 65c8965d is doing nothing wrong and the problem lies in the i965 dri driver.
The function intel_screen_make_config in src/mesa/drivers/dri/i965/intel_screen.c only adds ARGB8888 and RGB565 configs. Before commit 65c8965d, the drm platform of EGL wrongly recognizes ARGB8888 as XRGB8888 so weston works okay. Now EGL recognizes things correctly so weston won't find the config it wants.
Created attachment 114500 [details] [review]
dri/i965: Add XRGB8888 to dri config
I hacked the i965 driver and wrote this patch. After applying this to mesa, weston seems to work.
I'm not familiar with mesa and I don't know what I'm doing is actually right.
(In reply to Boyan Ding from comment #3)
> Created attachment 114500 [details] [review] [review]
> dri/i965: Add XRGB8888 to dri config
> I hacked the i965 driver and wrote this patch. After applying this to mesa,
> weston seems to work.
> I'm not familiar with mesa and I don't know what I'm doing is actually right.
Thanks for looking into this. Adding the format to intel_screen_make_configs() definitely seems like the right thing to do to me, but I don't think the depth/stencil changes are required. Have you tried just adding XRGB to the list without modifying depth/stencil?
(In reply to Daniel Stone from comment #4)
> Have you tried just adding XRGB to the list without modifying depth/stencil?
I tried just now and it also works.
This problem doesn't occur with the radeonsi driver.
By the way, the patch for mesa has been posted at http://patchwork.freedesktop.org/patch/45603/
(In reply to Boyan Ding from comment #7)
> By the way, the patch for mesa has been posted at
I can confirm that mesa 10.5.1/2 with this patch applied allows to start weston on Lenovo T440 with i915 onboard.
Presumably, there must be a similar patch, to be applied also to:
I confirm that mesa with patches applied for both i965 and i915, to the mesa git 10.6 master branch, allows weston to run on a Toshiba Satellite L655. Yay!
Hmm - obviously the patch has not made it to the git repository yet.
*** Bug 90026 has been marked as a duplicate of this bug. ***
FYI, the following patches have landed:
Mesa master (the fix):
Author: Boyan Ding <email@example.com>
Date: Wed Mar 25 19:36:54 2015 +0800
i965: Add XRGB8888 format to intel_screen_make_configs
Weston master (a workaround in case you have buggy Mesa):
Author: Derek Foreman <firstname.lastname@example.org>
Date: Fri May 15 12:12:40 2015 -0500
compositor-drm: pass ARGB fallback to gl create functions for XRGB formats
As mentioned by Pekka, the fixes have landed.