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
This commit is contained in:
Vlad Zahorodnii 2021-09-27 21:44:59 +03:00 committed by Nate Graham
parent eb1daa0aad
commit 6bbda88ab5

View file

@ -425,7 +425,7 @@ bool DrmGpu::commitCombination(const QVector<DrmPipeline *> &pipelines)
pipeline->setup(); pipeline->setup();
} }
if (DrmPipeline::commitPipelines(pipelines, DrmPipeline::CommitMode::Commit)) { if (DrmPipeline::commitPipelines(pipelines, DrmPipeline::CommitMode::Test)) {
return true; return true;
} else { } else {
for (const auto &pipeline : qAsConst(pipelines)) { for (const auto &pipeline : qAsConst(pipelines)) {
@ -519,7 +519,7 @@ static void pageFlipHandler(int fd, unsigned int frame, unsigned int sec, unsign
return; 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 // sizeof(time_t) == sizeof(unsigned int) == 4 . Putting @p sec
// into a time_t cuts off the most-significant bit (after the // into a time_t cuts off the most-significant bit (after the
// year 2038), similarly long can't hold all the bits of an // year 2038), similarly long can't hold all the bits of an