[platforms/drm] Do plane and object chore
ClosedPublic

Authored by romangg on Dec 11 2019, 2:47 AM.

Details

Summary

This cleans up some of the code, moves and deletes superfluous functions,
improves in-code docs and runtime warnings.

Test Plan

On vt.

EDIT: And on full session from SDDM (on vt some issues were hidden interestingly).

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
romangg created this revision.Dec 11 2019, 2:47 AM
Restricted Application added a project: KWin. · View Herald TranscriptDec 11 2019, 2:47 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Dec 11 2019, 2:47 AM
romangg added inline comments.Dec 11 2019, 9:09 AM
plugins/platforms/drm/drm_object_plane.h
55

Note: this got switched so it matches how the kernel defines the enum. That's just cosmetics. It does not make a difference logic-wise since we map the enum at runtime anyway.

romangg planned changes to this revision.Dec 11 2019, 4:39 PM
romangg added inline comments.
plugins/platforms/drm/drm_object_plane.cpp
173

This 1 is a problem.

romangg updated this revision to Diff 71297.Dec 11 2019, 4:51 PM
  • Fix plane atomic populate
romangg marked an inline comment as done.Dec 11 2019, 4:51 PM

For better accountability in case something breaks I have excluded the changes to the Type enum and the return on initializing properties. I will commit them separately.

This revision was not accepted when it landed; it landed in state Needs Review.Dec 11 2019, 5:05 PM
This revision was automatically updated to reflect the committed changes.
romangg edited the test plan for this revision. (Show Details)Dec 11 2019, 5:15 PM
zzag added a subscriber: zzag.Dec 11 2019, 5:26 PM
zzag added inline comments.
plugins/platforms/drm/drm_object.cpp
157

Simpler way

qCWarning(KWIN_DRM, "%1 has unrecogrnized enum '%2'", m_propName, en->name);

I didn't test whether my code compiles though...

romangg added inline comments.Dec 11 2019, 5:34 PM
plugins/platforms/drm/drm_object.cpp
157

True, if you want you can push it. Thanks.