Commit graph

13 commits

Author SHA1 Message Date
Xaver Hugl
5a2177a51c platforms/drm: use surfaceless context
On multi-gpu systems it could happen that the primary GPU
has no working outputs attached, yet we still need the
egl context.
2021-04-21 09:06:17 +00:00
Aleix Pol
b82840d7e0 drm: Don't call virtual methods from a parent class destructor
We'd be relying on AbstractEglDrmBackend on calling cleanup but we'd be
doing it when cleanupSurfaces cannot be reached out anymore, turning it
into a half-baked cleanup.

Instead call cleanup from the leaf class destructors.
2021-04-20 13:02:46 +02:00
Xaver Hugl
18f857b1f3 platforms/drm: fix crash with multi-gpu 2021-04-11 20:52:08 +02:00
Xaver Hugl
50f03ac6dc platforms/drm: improve buffer handling with GbmBuffer 2021-04-06 23:18:25 +02:00
Vlad Zahorodnii
913d242bd9 platforms/drm: Fix crash in EglGbmBackend::presentOnOutput()
If the damage history is empty and EGL_KHR_partial_update is supported,
kwin may crash.
2021-04-06 11:53:26 +03:00
Vlad Zahorodnii
2ade92d69b platform: Make OpenGLBackend::scanout take SurfaceItem
This allows removing SurfaceInterface::trackedDamage().
2021-03-31 13:56:55 +00:00
Xaver Hugl
eb7703cd64 Only use drmModeAddFB2WithModifiers if supported 2021-03-23 22:13:00 +00:00
Xaver Hugl
c737fde3da DRM: Use QSharedPointer 2021-03-23 15:47:59 +00:00
Xaver Hugl
a8055e4546 Refactor DRM presentation
Presentation doesn't have to go through DrmBackend and by moving
DrmGpu::deleteBufferAfterPageflip into DrmBuffer some code can be
simplified
2021-03-22 13:52:50 +00:00
Xaver Hugl
6569bf80c3 EglGbmBackend: use output reference
CCBUG: 432707
2021-03-18 15:22:31 +01:00
Aleix Pol
58debd72a3 Only scanout when the texture matches the display size
Otherwise drmModeAtomicCommit() in DrmOutput::doAtomicCommit() fails due
to unmatched buffer sizes.

While rendering continues working properly, this makes drm freak out and
try to go back to a previous state (see the test commit in
presentAtomically()) that in turn starts issuing screen events to every
process even though it's just to say the same thing. The fact that this
happens per frame makes the system unusable as soon as fullscreen starts
happening on a scaled display.

Another thing we could do is get EglGbmBackend::scanout() to take care
of the resizing.
2021-03-11 15:01:09 +01:00
Xaver Hugl
7cc95d931b Improvements for direct scanout
Instead of cancelling direct scanout if the client buffer is not
fitting, adjust the atomic planes. Also ignore all toplevels from
other screens.
2021-03-02 17:17:36 +00:00
Vlad Zahorodnii
93e0265e4e Move source code to src/ directory
Once in a while, we receive complaints from other fellow KDE developers
about the file organization of kwin. This change addresses some of those
complaints by moving all of source code in a separate directory, src/,
thus making the project structure more traditional. Things such as tests
are kept in their own toplevel directories.

This change may wreak havoc on merge requests that add new files to kwin,
but if a patch modifies an already existing file, git should be smart
enough to figure out that the file has been relocated.

We may potentially split the src/ directory further to make navigating
the source code easier, but hopefully this is good enough already.
2021-02-10 15:31:43 +00:00
Renamed from plugins/platforms/drm/egl_gbm_backend.cpp (Browse further)