platforms/drm: drop unused methods

This commit is contained in:
Xaver Hugl 2021-08-04 15:06:43 +02:00
parent 7db6ea0c15
commit 81136a0448
2 changed files with 0 additions and 42 deletions

View file

@ -48,44 +48,6 @@ void DrmCrtc::flipBuffer()
m_blackBuffer = nullptr;
}
bool DrmCrtc::setGammaRamp(const GammaRamp &gamma)
{
uint16_t *red = const_cast<uint16_t *>(gamma.red());
uint16_t *green = const_cast<uint16_t *>(gamma.green());
uint16_t *blue = const_cast<uint16_t *>(gamma.blue());
const bool isError = drmModeCrtcSetGamma(gpu()->fd(), id(),
gamma.size(), red, green, blue);
return !isError;
}
bool DrmCrtc::setVrr(bool enable)
{
if (const auto &prop = m_props[static_cast<int>(PropertyIndex::VrrEnabled)]) {
if (prop->pending() == enable) {
return false;
}
prop->setPending(enable);
if (!gpu()->atomicModeSetting() || gpu()->useEglStreams()) {
if (drmModeObjectSetProperty(gpu()->fd(), id(), DRM_MODE_OBJECT_CRTC, prop->propId(), enable) != 0) {
qCWarning(KWIN_DRM) << "drmModeObjectSetProperty(VRR_ENABLED) failed";
return false;
}
}
return true;
}
return false;
}
bool DrmCrtc::isVrrEnabled() const
{
if (const auto &prop = m_props[static_cast<int>(PropertyIndex::VrrEnabled)]) {
return prop->pending();
}
return false;
}
drmModeModeInfo DrmCrtc::queryCurrentMode()
{
m_crtc.reset(drmModeGetCrtc(gpu()->fd(), id()));

View file

@ -63,10 +63,6 @@ public:
}
return m_crtc->gamma_size;
}
bool setGammaRamp(const GammaRamp &gamma);
bool setVrr(bool enable);
bool isVrrEnabled() const;
drmModeModeInfo queryCurrentMode();