D24112: [platforms/drm] Disable setting 90° transformation s

Bhushan Shah <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.