From 6bbda88ab5a64810605cce1471f9a0de365acdef Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 27 Sep 2021 21:44:59 +0300 Subject: [PATCH] platforms/drm: Avoid making real commits while searching for output config This change limits the brute force output configuration search routine to test only commits, it's way more efficient than real commits. CCBUG: 442603 --- src/plugins/platforms/drm/drm_gpu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/drm/drm_gpu.cpp b/src/plugins/platforms/drm/drm_gpu.cpp index 3ecf2a2110..7449eb02a6 100644 --- a/src/plugins/platforms/drm/drm_gpu.cpp +++ b/src/plugins/platforms/drm/drm_gpu.cpp @@ -425,7 +425,7 @@ bool DrmGpu::commitCombination(const QVector &pipelines) pipeline->setup(); } - if (DrmPipeline::commitPipelines(pipelines, DrmPipeline::CommitMode::Commit)) { + if (DrmPipeline::commitPipelines(pipelines, DrmPipeline::CommitMode::Test)) { return true; } else { for (const auto &pipeline : qAsConst(pipelines)) { @@ -519,7 +519,7 @@ static void pageFlipHandler(int fd, unsigned int frame, unsigned int sec, unsign return; } - // The static_cast<> here are for a 32-bit environment where + // The static_cast<> here are for a 32-bit environment where // sizeof(time_t) == sizeof(unsigned int) == 4 . Putting @p sec // into a time_t cuts off the most-significant bit (after the // year 2038), similarly long can't hold all the bits of an