Commit graph

15 commits

Author SHA1 Message Date
Xaver Hugl
d6de38c1d6 platforms/drm: use drm formats instead of gbm formats
There's no need to guard the code, gbm and drm format definitions
are the same. Using GBM_BO_FORMAT_* even caused bugs, as that is
an enum and not a proper format identifier.

BUG: 441253
2021-08-27 11:56:36 +00:00
Xaver Hugl
1e572a4299 platforms/drm: make debug logging less verbose 2021-08-23 21:53:21 +00:00
Xaver Hugl
26dff99f78 platforms/drm: explicit modifiers
IN_FORMATS contains information about which buffer formats can be
scanned out with a given drm plane. Using these plane-specific
format+modifier combinations as well as explicit modifiers in
general can yield bandwidth and performance improvements,
especially in multi-gpu systems.
2021-08-16 16:56:32 +02:00
Xaver Hugl
2977ae8e37 platforms/drm: don't take the rotation property for granted
Should fix the crash on the pinephone
2021-07-12 14:28:38 +02:00
Xaver Hugl
5ad0d18476 platforms/drm: update properties on VT switch and failing commits 2021-07-10 21:18:37 +02:00
Xaver Hugl
586efe94d4 platforms/drm: Introduce DrmPipeline
DrmPipeline is now what contains all the thing related to drm calls,
instead of DrmOutput. This allows for some more flexibility and tidies
the code up a bit. Additionally instead of rolling back changes if
presentation fails, changes are directly tested with atomic test only
commits.
2021-07-10 21:18:33 +02:00
Vlad Zahorodnii
15f1b9792b Revert "platforms/drm: Introduce DrmPipeline"
This reverts commit 5a22deda3b.

We still need more work to finish the DrmPipeline. At the moment, there
are a few major issues, e.g. some outputs not turning on, output
transforms not working correctly, a crash when changing dpms mode.

Let's merge this change back once all major issues are fixed and after
more testing.
2021-04-20 11:34:04 +00:00
Xaver Hugl
5a22deda3b platforms/drm: Introduce DrmPipeline
DrmPipeline is what now contains all the drm bits related to
modesetting and presentation, instead of that being in DrmOutput.
This gives a lot more freedom for managing drm resources and
enables far better usage of the atomic API with guaranteed
immutability for failed tests.
2021-04-16 20:26:34 +02:00
Vlad Zahorodnii
d883cccfd3 platforms/drm: Minor coding style fixes
This reformats some code according to the KF coding style.
2021-04-01 14:41:05 +03:00
Vlad Zahorodnii
7926fce598 platforms/drm: Make DrmObject::m_id private
There's already a getter for the object id.
2021-04-01 14:19:48 +03:00
Vlad Zahorodnii
f534b64e5c platforms/drm: Associate drm objects with their gpus
This makes the code more consistent. At the moment, we initialize drm
objects either with the corresponding gpu object or with its fd.
2021-04-01 14:15:42 +03:00
Xaver Hugl
c0c3ec09af Refactor DrmObject 2021-03-31 10:19:42 +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
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/drm_object_plane.cpp (Browse further)