Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_output.cpp
Show First 20 Lines • Show All 903 Lines • ▼ Show 20 Line(s) | 902 | if (!LogindIntegration::self()->isActiveSession()) { | |||
---|---|---|---|---|---|
904 | return false; | 904 | return false; | ||
905 | } | 905 | } | ||
906 | 906 | | |||
907 | if (m_pageFlipPending) { | 907 | if (m_pageFlipPending) { | ||
908 | qCWarning(KWIN_DRM) << "Page not yet flipped."; | 908 | qCWarning(KWIN_DRM) << "Page not yet flipped."; | ||
909 | return false; | 909 | return false; | ||
910 | } | 910 | } | ||
911 | 911 | | |||
912 | #if HAVE_EGL_STREAMS | ||||
913 | if (m_backend->useEglStreams() && !m_modesetRequested) { | ||||
914 | // EglStreamBackend queues normal page flips through EGL, | ||||
915 | // modesets are still performed through DRM-KMS | ||||
916 | m_pageFlipPending = true; | ||||
917 | return true; | ||||
918 | } | ||||
919 | #endif | ||||
920 | | ||||
912 | m_primaryPlane->setNext(buffer); | 921 | m_primaryPlane->setNext(buffer); | ||
913 | m_nextPlanesFlipList << m_primaryPlane; | 922 | m_nextPlanesFlipList << m_primaryPlane; | ||
914 | 923 | | |||
915 | if (!doAtomicCommit(AtomicCommitMode::Test)) { | 924 | if (!doAtomicCommit(AtomicCommitMode::Test)) { | ||
916 | //TODO: When we use planes for layered rendering, fallback to renderer instead. Also for direct scanout? | 925 | //TODO: When we use planes for layered rendering, fallback to renderer instead. Also for direct scanout? | ||
917 | //TODO: Probably should undo setNext and reset the flip list | 926 | //TODO: Probably should undo setNext and reset the flip list | ||
918 | qCDebug(KWIN_DRM) << "Atomic test commit failed. Aborting present."; | 927 | qCDebug(KWIN_DRM) << "Atomic test commit failed. Aborting present."; | ||
919 | // go back to previous state | 928 | // go back to previous state | ||
▲ Show 20 Lines • Show All 127 Lines • ▼ Show 20 Line(s) | 1006 | { | |||
1047 | } | 1056 | } | ||
1048 | 1057 | | |||
1049 | if (mode == AtomicCommitMode::Real) { | 1058 | if (mode == AtomicCommitMode::Real) { | ||
1050 | if (m_dpmsModePending == DpmsMode::On) { | 1059 | if (m_dpmsModePending == DpmsMode::On) { | ||
1051 | if (!(flags & DRM_MODE_ATOMIC_ALLOW_MODESET)) { | 1060 | if (!(flags & DRM_MODE_ATOMIC_ALLOW_MODESET)) { | ||
1052 | // TODO: Evaluating this condition should only be necessary, as long as we expect older kernels than 4.10. | 1061 | // TODO: Evaluating this condition should only be necessary, as long as we expect older kernels than 4.10. | ||
1053 | flags |= DRM_MODE_ATOMIC_NONBLOCK; | 1062 | flags |= DRM_MODE_ATOMIC_NONBLOCK; | ||
1054 | } | 1063 | } | ||
1064 | | ||||
1065 | #if HAVE_EGL_STREAMS | ||||
1066 | if (!m_backend->useEglStreams()) | ||||
1067 | // EglStreamBackend uses the NV_output_drm_flip_event EGL extension | ||||
1068 | // to register the flip event through eglStreamConsumerAcquireAttribNV | ||||
1069 | #endif | ||||
1055 | flags |= DRM_MODE_PAGE_FLIP_EVENT; | 1070 | flags |= DRM_MODE_PAGE_FLIP_EVENT; | ||
1056 | } | 1071 | } | ||
1057 | } else { | 1072 | } else { | ||
1058 | flags |= DRM_MODE_ATOMIC_TEST_ONLY; | 1073 | flags |= DRM_MODE_ATOMIC_TEST_ONLY; | ||
1059 | } | 1074 | } | ||
1060 | 1075 | | |||
1061 | bool ret = true; | 1076 | bool ret = true; | ||
1062 | // TODO: Make sure when we use more than one plane at a time, that we go through this list in the right order. | 1077 | // TODO: Make sure when we use more than one plane at a time, that we go through this list in the right order. | ||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |