backends/drm: remove the now unnecessary check for supported formats

As formats are per output and also checked on crtc changes, there
is no reason to restrict used formats to those that are supported
by all primary planes anymore.
This commit is contained in:
Xaver Hugl 2022-01-14 19:50:42 +01:00
parent fe9a3f45c0
commit de7b429528
3 changed files with 0 additions and 19 deletions

View file

@ -593,20 +593,6 @@ void DrmGpu::removeVirtualOutput(DrmVirtualOutput *output)
}
}
bool DrmGpu::isFormatSupported(uint32_t drmFormat) const
{
if (!m_atomicModeSetting) {
return drmFormat == DRM_FORMAT_XRGB8888 || drmFormat == DRM_FORMAT_ARGB8888;
} else {
for (const auto &plane : qAsConst(m_planes)) {
if (plane->type() == DrmPlane::TypeIndex::Primary && !plane->formats().contains(drmFormat)) {
return false;
}
}
return true;
}
}
DrmLeaseOutput *DrmGpu::findLeaseOutput(quint32 connector)
{
auto it = std::find_if(m_leaseOutputs.constBegin(), m_leaseOutputs.constEnd(), [connector] (DrmLeaseOutput *o) {

View file

@ -56,7 +56,6 @@ public:
bool atomicModeSetting() const;
bool addFB2ModifiersSupported() const;
bool isNVidia() const;
bool isFormatSupported(uint32_t drmFormat) const;
gbm_device *gbmDevice() const;
EGLDisplay eglDisplay() const;
EglGbmBackend *eglBackend() const;

View file

@ -408,10 +408,6 @@ bool EglGbmBackend::initBufferConfigs()
EGLint gbmFormat;
eglGetConfigAttrib(eglDisplay(), configs[i], EGL_NATIVE_VISUAL_ID, &gbmFormat);
if (!m_gpu->isFormatSupported(gbmFormat)) {
continue;
}
GbmFormat format;
format.drmFormat = gbmFormat;
// Query number of bits for color channel