https://bugs.kde.org/show_bug.cgi?id=521333
Bug ID: 521333
Summary: KWin does not properly fallback to drmModeAddFB when
drmModeAddFB2 fails
Classification: Plasma
Product: kwin
Version First unspecified
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: platform-drm
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
DESCRIPTION
When drmModeAddFB2 fails, KWin has a fallback path to drmModeAddFB, but that
one is guarded by ret == EOPNOTSUPP
https://github.com/KDE/kwin/blob/master/src/backends/drm/drm_gpu.cpp#L996,
while the kernel returns -EONOTSUPP.
This is problematic for some drm drivers on big endian (like for radeon driver)
since kernel returns -EOPNOTSUPP for everything unless
quirk_addfb_prefer_host_byte_order is set (and radeon does not).
#ifdef __BIG_ENDIAN
if (!dev->mode_config.quirk_addfb_prefer_host_byte_order)
return -EOPNOTSUPP;
#endif
So the check should probably be more robust, possibly something like:
if (ret < 0 && (ret == -EOPNOTSUPP || errno == EOPNOTSUPP))
STEPS TO REPRODUCE
1. Start kwin on a big endian machine with some driver without modifiers that
does not have modifiers and quirk_addfb_prefer_host_byte_order. Or hack the
kernel to always return -EOPNOTSUPP from drmModeAddFB2
OBSERVED RESULT
kwin fails to start since it cannot ge t a framebuffer.
EXPECTED RESULT
kwin starts
SOFTWARE/OS VERSIONS
Operating System: linux
kwin-6.6.5
--
You are receiving this mail because:
You are watching all bug changes.