|Summary:||[Regression] Weston on DRM backend won't start with new version of mesa|
|Product:||Mesa||Reporter:||Boyan Ding <stu_dby>|
|Component:||Drivers/DRI/i965||Assignee:||Ian Romanick <idr>|
|Status:||RESOLVED FIXED||QA Contact:||Intel 3D Bugs Mailing List <intel-3d-bugs>|
|Priority:||medium||CC:||cornogle, daniel, derekf, lantw44, lukasz, lviggiani, ppaalanen|
|i915 platform:||i915 features:|
|Bug Depends on:|
|Attachments:||dri/i965: Add XRGB8888 to dri config|
Description Boyan Ding 2015-03-20 08:37:36 UTC
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.
Comment 1 Pekka Paalanen 2015-03-20 10:39:34 UTC
There is a workaround patch proposed for Weston: http://patchwork.freedesktop.org/patch/45123/ 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?
Comment 2 Boyan Ding 2015-03-21 04:39:26 UTC
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.
Comment 3 Boyan Ding 2015-03-21 06:01:13 UTC
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.
Comment 4 Daniel Stone 2015-03-23 16:35:20 UTC
(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?
Comment 5 Boyan Ding 2015-03-24 00:31:36 UTC
(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.
Comment 6 Michel Dänzer 2015-03-24 02:07:44 UTC
This problem doesn't occur with the radeonsi driver.
Comment 7 Boyan Ding 2015-03-26 14:53:14 UTC
By the way, the patch for mesa has been posted at http://patchwork.freedesktop.org/patch/45603/
Comment 8 Tomasz Paweł Gajc 2015-03-29 09:34:46 UTC
(In reply to Boyan Ding from comment #7) > By the way, the patch for mesa has been posted at > http://patchwork.freedesktop.org/patch/45603/ I can confirm that mesa 10.5.1/2 with this patch applied allows to start weston on Lenovo T440 with i915 onboard.
Comment 9 James 2015-04-28 18:53:18 UTC
Presumably, there must be a similar patch, to be applied also to: src/mesa/drivers/dri/i915/intel_screen.c Yes/no? 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.
Comment 10 Pekka Paalanen 2015-05-15 07:23:50 UTC
*** Bug 90026 has been marked as a duplicate of this bug. ***
Comment 11 Pekka Paalanen 2015-05-18 09:03:19 UTC
FYI, the following patches have landed: Mesa master (the fix): commit 28090b30dd6b5977de085f48c620574214b6b4ba Author: Boyan Ding <firstname.lastname@example.org> 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): commit c4cfe85d3af007e9fa30f10d10fa502ca1336fa6 Author: Derek Foreman <email@example.com> Date: Fri May 15 12:12:40 2015 -0500 compositor-drm: pass ARGB fallback to gl create functions for XRGB formats
Comment 12 Emil Velikov 2015-07-06 12:04:35 UTC
As mentioned by Pekka, the fixes have landed.