[PATCH xserver] modesetting: Fix page flipping under DRI 3.2.

Olivier Fourdan ofourdan at redhat.com
Tue Mar 27 08:10:17 UTC 2018


Hi,

On Mon, Mar 26, 2018 at 7:54 PM, Mario Kleiner <mario.kleiner.de at gmail.com>
wrote:

> [...]
> I haven't had time to retest with the latest patch on master of Adam
> "modesetting: Fix up some XXX from removing GLAMOR_HAS_DRM_*"
> yet, so maybe that makes a positive difference? My testing was with
> master as of "modesetting: Fix page flipping under DRI 3.2." plus the
> argb8888 -> xrgb8888 snippet to make modesetting work at all on
> Ivybridge/Ironlake.
>

commit  ba0c75177 (ajax latest commit) makes no difference for the
incompatible format issue, it's more about clean-up and being able to work
if atomic modesetting is not available, which is not the case here.

The funny thing is, I noticed it works (as in “a mode is set”) when using
drmModeAddFB() (as“before”) instead of drmModeAddFB2WithModifiers() in
drmmode_bo_import() - Thus the perceived regression, it worked before.

drmModeAddFB() and drmModeAddFB2WithModifiers()  translate respectively as
drm_mode_addfb() and drm_mode_addfb2() in the kernel
(drivers/gpu/drm/drm_framebuffer.c), and drm_mode_addfb() will eventually
call drm_mode_addfb2() after determining itself the format to use with
drm_mode_legacy_fb_format() [1].

drm_mode_legacy_fb_format() is defined in drivers/gpu/drm/drm_fourcc.c [2]
and will use DRM_FORMAT_XRGB8888 for depth 24 and DRM_FORMAT_XRGB2101010
for depth 30, and DRM_FORMAT_ARGB8888 for anything else.

Cheers,
Olivier

[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/drm_framebuffer.c#n95
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/drm_fourcc.c#n38
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20180327/e70e0906/attachment.html>


More information about the xorg-devel mailing list