e2a0863843
Hardware constraints limit the number of crtcs and which connector + crtc combinations can work together. The current code is searching for working combinations when a hotplug happens but that's not enough, it also needs to happen when the user enables or disables outputs and when modesets are done, and the configuration change needs to be applied with a single atomic commit. This commit removes the hard dependency of DrmPipeline on crtcs by moving the pending state of outputs from the drm objects to DrmPipeline itself, which ensures that it's independent from the set of drm objects currently used. It also changes requests from KScreen to be applied truly atomically.
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
/*
|
|
KWin - the KDE window manager
|
|
This file is part of the KDE project.
|
|
|
|
SPDX-FileCopyrightText: 2021 Xaver Hugl <xaver.hugl@gmail.com>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
#include "waylandoutputconfig.h"
|
|
|
|
namespace KWin
|
|
{
|
|
|
|
QSharedPointer<OutputChangeSet> WaylandOutputConfig::changeSet(AbstractWaylandOutput *output)
|
|
{
|
|
const auto ptr = constChangeSet(output);
|
|
m_properties[output] = ptr;
|
|
return ptr;
|
|
}
|
|
|
|
QSharedPointer<OutputChangeSet> WaylandOutputConfig::constChangeSet(AbstractWaylandOutput *output) const
|
|
{
|
|
if (!m_properties.contains(output)) {
|
|
auto props = QSharedPointer<OutputChangeSet>::create();
|
|
props->enabled = output->isEnabled();
|
|
props->pos = output->geometry().topLeft();
|
|
props->scale = output->scale();
|
|
props->modeSize = output->modeSize();
|
|
props->refreshRate = output->refreshRate();
|
|
props->transform = output->transform();
|
|
props->overscan = output->overscan();
|
|
props->rgbRange = output->rgbRange();
|
|
props->vrrPolicy = output->vrrPolicy();
|
|
return props;
|
|
}
|
|
return m_properties[output];
|
|
}
|
|
|
|
}
|