D24112: [platforms/drm] Disable setting 90° transformations

Bhushan Shah noreply at phabricator.kde.org
Fri Sep 27 11:59:43 BST 2019


bshah added a comment.


  Also one of my initial suspicion was that we are not setting transformation wl_output in case commit fails:
  
  So I tried following but it didn't make any difference.
  
    diff --git a/plugins/platforms/drm/drm_output.cpp b/plugins/platforms/drm/drm_output.cpp
    index bfc9d4026..3e5afb9a6 100644
    --- a/plugins/platforms/drm/drm_output.cpp
    +++ b/plugins/platforms/drm/drm_output.cpp
    @@ -849,6 +849,8 @@ bool DrmOutput::presentAtomically(DrmBuffer *buffer)
     
         m_primaryPlane->setNext(buffer);
         m_nextPlanesFlipList << m_primaryPlane;
    +    
    +    auto wlOutput = waylandOutput();
     
         if (!doAtomicCommit(AtomicCommitMode::Test)) {
             //TODO: When we use planes for layered rendering, fallback to renderer instead. Also for direct scanout?
    @@ -862,6 +864,9 @@ bool DrmOutput::presentAtomically(DrmBuffer *buffer)
                 if (m_primaryPlane) {
                     m_primaryPlane->setTransformation(m_lastWorkingState.planeTransformations);
                 }
    +            if (wlOutput) {
    +                wlOutput->setTransform(m_lastWorkingState.outputTransformation);
    +            }
                 m_modesetRequested = true;
                 // the cursor might need to get rotated
                 updateCursor();
    @@ -886,6 +891,9 @@ bool DrmOutput::presentAtomically(DrmBuffer *buffer)
             if (m_primaryPlane) {
                 m_lastWorkingState.planeTransformations = m_primaryPlane->transformation();
             }
    +        if (wlOutput) {
    +            m_lastWorkingState.outputTransformation = wlOutput->transform();
    +        }
             m_lastWorkingState.valid = true;
         }
         m_pageFlipPending = true;
    diff --git a/plugins/platforms/drm/drm_output.h b/plugins/platforms/drm/drm_output.h
    index a8ec22e54..62b6aa58b 100644
    --- a/plugins/platforms/drm/drm_output.h
    +++ b/plugins/platforms/drm/drm_output.h
    @@ -153,6 +153,7 @@ private:
             Qt::ScreenOrientation orientation;
             drmModeModeInfo mode;
             DrmPlane::Transformations planeTransformations;
    +        KWayland::Server::OutputInterface::Transform outputTransformation;
             QPoint globalPos;
             bool valid = false;
         } m_lastWorkingState;

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D24112

To: romangg, #kwin
Cc: bshah, zzag, apol, kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20190927/c89ba3f9/attachment.html>


More information about the kwin mailing list