Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_output.cpp
Show First 20 Lines • Show All 882 Lines • ▼ Show 20 Line(s) | 881 | if (!LogindIntegration::self()->isActiveSession()) { | |||
---|---|---|---|---|---|
883 | return false; | 883 | return false; | ||
884 | } | 884 | } | ||
885 | 885 | | |||
886 | if (m_pageFlipPending) { | 886 | if (m_pageFlipPending) { | ||
887 | qCWarning(KWIN_DRM) << "Page not yet flipped."; | 887 | qCWarning(KWIN_DRM) << "Page not yet flipped."; | ||
888 | return false; | 888 | return false; | ||
889 | } | 889 | } | ||
890 | 890 | | |||
891 | #if HAVE_EGL_STREAMS | ||||
892 | if (m_backend->useEglStreams() && !m_modesetRequested) { | ||||
893 | // EglStreamBackend queues normal page flips through EGL, | ||||
894 | // modesets are still performed through DRM-KMS | ||||
895 | m_pageFlipPending = true; | ||||
896 | return true; | ||||
897 | } | ||||
898 | #endif | ||||
899 | | ||||
891 | m_primaryPlane->setNext(buffer); | 900 | m_primaryPlane->setNext(buffer); | ||
892 | m_nextPlanesFlipList << m_primaryPlane; | 901 | m_nextPlanesFlipList << m_primaryPlane; | ||
893 | 902 | | |||
894 | if (!doAtomicCommit(AtomicCommitMode::Test)) { | 903 | if (!doAtomicCommit(AtomicCommitMode::Test)) { | ||
895 | //TODO: When we use planes for layered rendering, fallback to renderer instead. Also for direct scanout? | 904 | //TODO: When we use planes for layered rendering, fallback to renderer instead. Also for direct scanout? | ||
896 | //TODO: Probably should undo setNext and reset the flip list | 905 | //TODO: Probably should undo setNext and reset the flip list | ||
897 | qCDebug(KWIN_DRM) << "Atomic test commit failed. Aborting present."; | 906 | qCDebug(KWIN_DRM) << "Atomic test commit failed. Aborting present."; | ||
898 | // go back to previous state | 907 | // go back to previous state | ||
▲ Show 20 Lines • Show All 127 Lines • ▼ Show 20 Line(s) | 985 | { | |||
1026 | } | 1035 | } | ||
1027 | 1036 | | |||
1028 | if (mode == AtomicCommitMode::Real) { | 1037 | if (mode == AtomicCommitMode::Real) { | ||
1029 | if (m_dpmsModePending == DpmsMode::On) { | 1038 | if (m_dpmsModePending == DpmsMode::On) { | ||
1030 | if (!(flags & DRM_MODE_ATOMIC_ALLOW_MODESET)) { | 1039 | if (!(flags & DRM_MODE_ATOMIC_ALLOW_MODESET)) { | ||
1031 | // TODO: Evaluating this condition should only be necessary, as long as we expect older kernels than 4.10. | 1040 | // TODO: Evaluating this condition should only be necessary, as long as we expect older kernels than 4.10. | ||
1032 | flags |= DRM_MODE_ATOMIC_NONBLOCK; | 1041 | flags |= DRM_MODE_ATOMIC_NONBLOCK; | ||
1033 | } | 1042 | } | ||
1043 | | ||||
1044 | #if HAVE_EGL_STREAMS | ||||
1045 | if (!m_backend->useEglStreams()) | ||||
1046 | // EglStreamBackend uses the NV_output_drm_flip_event EGL extension | ||||
1047 | // to register the flip event through eglStreamConsumerAcquireAttribNV | ||||
1048 | #endif | ||||
1034 | flags |= DRM_MODE_PAGE_FLIP_EVENT; | 1049 | flags |= DRM_MODE_PAGE_FLIP_EVENT; | ||
1035 | } | 1050 | } | ||
1036 | } else { | 1051 | } else { | ||
1037 | flags |= DRM_MODE_ATOMIC_TEST_ONLY; | 1052 | flags |= DRM_MODE_ATOMIC_TEST_ONLY; | ||
1038 | } | 1053 | } | ||
1039 | 1054 | | |||
1040 | bool ret = true; | 1055 | bool ret = true; | ||
1041 | // TODO: Make sure when we use more than one plane at a time, that we go through this list in the right order. | 1056 | // 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 |