1. 22 Apr, 2021 1 commit
  2. 20 Apr, 2021 1 commit
    • Vlad Zahorodnii's avatar
      Revert "platforms/drm: Introduce DrmPipeline" · 15f1b979
      Vlad Zahorodnii authored
      This reverts commit 5a22deda.
      
      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.
      15f1b979
  3. 19 Apr, 2021 1 commit
  4. 16 Apr, 2021 1 commit
    • Xaver Hugl's avatar
      platforms/drm: Introduce DrmPipeline · 5a22deda
      Xaver Hugl authored
      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.
      5a22deda
  5. 08 Apr, 2021 1 commit
  6. 07 Apr, 2021 1 commit
    • Vlad Zahorodnii's avatar
      wayland: Move Wayland-specific code out of AbstractWaylandOutput · c2723071
      Vlad Zahorodnii authored
      Currently, output properties are looked up either on the wl_output
      object or the output device object. This puts a hard dependency on the
      wayland server in the platforms.
      
      This change intends to fix some flaws in the current output
      abstractions, and allow creating/destroying wayland-specific globals as
      we wish.
      
      With the work done in this patch, the need for the AbstractWaylandOutput
      class is unclear, and it might be a good idea to merge it with the base
      AbstractOutput class.
      c2723071
  7. 06 Apr, 2021 1 commit
  8. 01 Apr, 2021 1 commit
  9. 31 Mar, 2021 1 commit
  10. 23 Mar, 2021 1 commit
  11. 15 Feb, 2021 1 commit
  12. 10 Feb, 2021 1 commit
    • Vlad Zahorodnii's avatar
      Move source code to src/ directory · 93e0265e
      Vlad Zahorodnii authored
      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.
      93e0265e
  13. 06 Jan, 2021 1 commit
    • Vlad Zahorodnii's avatar
      Introduce RenderLoop · b8a70e62
      Vlad Zahorodnii authored
      At the moment, our frame scheduling infrastructure is still heavily
      based on Xinerama-style rendering. Specifically, we assume that painting
      is driven by a single timer, etc.
      
      This change introduces a new type - RenderLoop. Its main purpose is to
      drive compositing on a specific output, or in case of X11, on the
      overlay window.
      
      With RenderLoop, compositing is synchronized to vblank events. It
      exposes the last and the next estimated presentation timestamp. The
      expected presentation timestamp can be used by effects to ensure that
      animations are synchronized with the upcoming vblank event.
      
      On Wayland, every outputs has its own render loop. On X11, per screen
      rendering is not possible, therefore the platform exposes the render
      loop for the overlay window. Ideally, the Scene has to expose the
      RenderLoop, but as the first step towards better compositing scheduling
      it's good as is for the time being.
      
      The RenderLoop tries to minimize the latency by delaying compositing as
      close as possible to the next vblank event. One tricky thing about it is
      that if compositing is too close to the next vblank event, animations
      may become a little bit choppy. However, increasing the latency reduces
      the choppiness.
      
      Given that, there is no any "silver bullet" solution for the choppiness
      issue, a new option has been added in the Compositing KCM to specify the
      amount of latency. By default, it's "Medium," but if a user is not
      satisfied with the upstream default, they can tweak it.
      b8a70e62
  14. 17 Dec, 2020 1 commit
  15. 15 Dec, 2020 1 commit
  16. 28 Nov, 2020 1 commit
  17. 29 Oct, 2020 1 commit
  18. 28 Oct, 2020 1 commit
  19. 16 Oct, 2020 1 commit
    • Vlad Zahorodnii's avatar
      platforms/drm: Compute correct cursor transform matrix · 3b8e489b
      Vlad Zahorodnii authored
      Currently, when the DRM platform uses cursor planes, the cursor on
      a rotated output may be cropped because the math behind the current
      cursor transform matrix is off.
      
      In order to fix the cropping issue, this change replaces the current
      cursor transform matrix with the core part of the surface-to-buffer
      matrix, which was written against the wl_output spec.
      
      BUG: 427605
      CCBUG: 427060
      3b8e489b
  20. 05 Oct, 2020 1 commit
  21. 19 Aug, 2020 1 commit
  22. 07 Aug, 2020 2 commits
    • Vlad Zahorodnii's avatar
      Prettify license headers · 4ce853e8
      Vlad Zahorodnii authored
      4ce853e8
    • Vlad Zahorodnii's avatar
      Switch to SPDX license markers · 1fb9f6f1
      Vlad Zahorodnii authored
      The main advantage of SPDX license identifiers over the traditional
      license headers is that it's more difficult to overlook inappropriate
      licenses for kwin, for example GPL 3. We also don't have to copy a
      lot of boilerplate text.
      
      In order to create this change, I ran licensedigger -r -c from the
      toplevel source directory.
      1fb9f6f1
  23. 27 Jul, 2020 1 commit
  24. 30 Apr, 2020 1 commit
  25. 08 Apr, 2020 1 commit
  26. 02 Apr, 2020 1 commit
    • Aleix Pol Gonzalez's avatar
      Make it possible to have a separate cursor for the tablet · 6abd23ed
      Aleix Pol Gonzalez authored
      Summary:
      As is KWin only had 1 Cursor which was a singleton. This made it impossible for
      us to properly implement the tablet (as in drawing tablets) support and show where
      we're drawing.
      This patch makes it possible to have different Cursors in KWin, it makes all the
      current code still follow the mouse but the tablet can still render a cursor.
      
      Test Plan: Tests pass, been using it and works as well as before but with beautiful tablet cursors.
      
      Reviewers: #kwin, cblack, davidedmundson
      
      Reviewed By: #kwin, cblack, davidedmundson
      
      Subscribers: davidedmundson, cblack, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D28155
      6abd23ed
  27. 29 Feb, 2020 1 commit
    • Roman Gilg's avatar
      Remove orientation sensor · 2c66e1f6
      Roman Gilg authored and Bhushan Shah's avatar Bhushan Shah committed
      Summary:
      This functionality will instead be implemented in KScreen such that manual and
      automatic output rotation can be used and configured through a single UI in
      unison together.
      
      Test Plan: Compiles.
      
      Reviewers: #kwin, davidedmundson, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: kwin, bshah, davidedmundson, zzag
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D26036
      2c66e1f6
  28. 28 Feb, 2020 1 commit
    • Roman Gilg's avatar
      [platforms/drm] Add hardware transformation API · dfea5798
      Roman Gilg authored and David Edmundson's avatar David Edmundson committed
      Summary:
      Planes might be able to do transformations without compositing required.
      When changing the current transform try this with the primary plane. If this
      fails fall back to no transformation at all through hardware and communicate
      the fact and other information through some getters.
      
      Also adds an environment variable to never do hardware transformations.
      
      Test Plan: Compiles.
      
      Reviewers: #kwin
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D25906
      dfea5798
  29. 27 Nov, 2019 1 commit
    • Roman Gilg's avatar
      Use Transform enum internally · e827d0a8
      Roman Gilg authored
      Summary:
      Instead of using Qt::ScreenOrientation use an enum class that is directly
      mapped to KWayland's transformation enums. This simplifies the code.
      
      Test Plan: Compiles and transformations work as before.
      
      Reviewers: #kwin, zzag
      
      Reviewed By: #kwin, zzag
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T11670
      
      Differential Revision: https://phabricator.kde.org/D25558
      e827d0a8
  30. 26 Nov, 2019 1 commit
    • Roman Gilg's avatar
      Associate output transforms and orientations · 6bfa931f
      Roman Gilg authored
      Summary:
      We use internally Qt:ScreenOrientation for representing output transforms.
      
      This is not ideal since the values do not map directly to Wayland transform
      values, but we can make it work by using OR combinations of
      Qt:ScreenOrientations.
      
      Do this for now and see if we should not better introduce an internal enum
      mapped directly.
      
      Additionally the OR combinations need to be handled in the drm backend at
      various places accordingly as well (see TODOs).
      
      Test Plan: Compiles
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T11670
      
      Differential Revision: https://phabricator.kde.org/D25505
      6bfa931f
  31. 05 Sep, 2019 2 commits
    • Roman Gilg's avatar
      [platforms/drm] Rework enablement and dpms switching · df3c1de8
      Roman Gilg authored
      Summary:
      This patch further refines output management.
      
      We go now through AbstractWaylandOutput virtual functions to enable and
      disable outputs.
      
      Dpms changes and enablement switches use separate code paths at start in the
      Drm backend code since they are similar but not the directly same. Common code
      is shared though, functions are renamed accordingly.
      
      Asserts have been put in place to better understand and check the control
      flow. A seemingly unnecessary call to DrmOutput::pageFlipped on reactivation
      after Vt switch has been removed to allow for that.
      
      In future patches we need to look additionally at the legacy mode switching
      code path which was and is still not working and better handling of the
      current monitor Dpms state. For example a monitor being switched off is not
      properly acted on and the workspace still expanded.
      
      Test Plan:
      With one and two monitors:
      * Dpms off/on
      * Vt switches
      * Screen disable/enable
      
      Reviewers: #kwin
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T11459
      
      Differential Revision: https://phabricator.kde.org/D23600
      df3c1de8
    • Roman Gilg's avatar
      Lift output enablement into Platform · f7ff62e2
      Roman Gilg authored
      Summary:
      This lifts the enablement code for outputs from the DRM backend to Platform
      allowing other Wayland backends in the future to use this interface as well.
      
      To do that we also create some helper functions on Platform level and have to
      spill some KWayland classes into AbstractOutput what motivates a further split
      of Platform into a Wayland child class like for AbstractOutput.
      
      Test Plan: Disabled and enabled an output in DRM session.
      
      Reviewers: #kwin
      
      Subscribers: zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D23545
      f7ff62e2
  32. 28 Aug, 2019 1 commit
    • Roman Gilg's avatar
      Get output pixel size from output device · dbb2cede
      Roman Gilg authored
      Summary:
      Get the pixel size directly from the always available output device
      interface instead of saving an additional copy in the backends.
      
      Test Plan: Nested Wayland, Drm, virtual backends tested.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Maniphest Tasks: T11459
      
      Differential Revision: https://phabricator.kde.org/D23495
      dbb2cede
  33. 02 Jul, 2019 1 commit
    • Vlad Zahorodnii's avatar
      [platforms/drm] Refactor out Edid class · 1892bd33
      Vlad Zahorodnii authored
      Summary:
      The new class is responsible for parsing EDID blobs. It has pretty
      straightforward API: you hand blob data to the constructor and after
      that you're ready to query parsed data, e.g. physical size, etc.
      
      The main reason to extract EDID parsing code into a class is to clean up
      drm_output.cpp a bit.
      
      Test Plan: Compiles, the DRM platform still works.
      
      Reviewers: #kwin, davidedmundson
      
      Reviewed By: #kwin, davidedmundson
      
      Subscribers: davidedmundson, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D22211
      1892bd33
  34. 17 Jun, 2019 1 commit
    • Vlad Zahorodnii's avatar
      Backport Night Color feature to X11 · 0d381846
      Vlad Zahorodnii authored
      Summary:
      The color correction manager doesn't make any specific assumptions about
      underlying platform, e.g. whether it's x11, etc. The platform just
      has to be capable of setting gamma ramps. Given that, there are no any
      significant technical blockers for making this feature work on x.
      
      Reviewers: #kwin, davidedmundson, romangg
      
      Reviewed By: #kwin, davidedmundson, romangg
      
      Subscribers: romangg, neobrain, GB_2, filipf, davidedmundson, ngraham, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D21345
      0d381846
  35. 13 Jun, 2019 1 commit
    • Roman Gilg's avatar
      [platforms/x11/standalone] Port to AbstractOutput · 1a11abc8
      Roman Gilg authored
      Summary:
      Represent outputs in the X11 session via AbstractOutput. For that we
      move all Wayland specific parts of AbstractOutput into a new subclass
      AbstractWaylandOutput and let the outputs of our Wayland backends inherit
      from there.
      
      This should allow us to get rid of the Screens class later on.
      
      Test Plan: Manually in X session.
      
      Reviewers: #kwin, zzag, davidedmundson
      
      Reviewed By: #kwin, zzag, davidedmundson
      
      Subscribers: ngraham, zzag, kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D19208
      1a11abc8
  36. 08 May, 2019 1 commit
  37. 26 Apr, 2019 1 commit
  38. 16 Apr, 2019 1 commit