From 75304afe0feb0bf51cbd9c0bd857018dfe03b1ff Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Mon, 13 Nov 2023 23:48:45 +0100 Subject: [PATCH] backends/drm: only disallow direct scanout with mismatching color descriptions Generically disabling it with color management is a bit overkill --- src/backends/drm/drm_egl_layer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backends/drm/drm_egl_layer.cpp b/src/backends/drm/drm_egl_layer.cpp index 08b852d712..39a349bed9 100644 --- a/src/backends/drm/drm_egl_layer.cpp +++ b/src/backends/drm/drm_egl_layer.cpp @@ -104,8 +104,8 @@ bool EglGbmLayer::scanout(SurfaceItem *surfaceItem) if (directScanoutDisabled) { return false; } - // TODO use GAMMA_LUT, CTM and DEGAMMA_LUT to allow direct scanout with HDR - if (m_pipeline->output()->needsColormanagement()) { + if (surfaceItem->colorDescription() != m_pipeline->colorDescription() || m_pipeline->output()->channelFactors() != QVector3D(1, 1, 1) || m_pipeline->iccProfile()) { + // TODO use GAMMA_LUT, CTM and DEGAMMA_LUT to allow direct scanout with HDR return false; }