Commit 49c650ee authored by Xaver Hugl's avatar Xaver Hugl
Browse files

platforms/drm: don't ignore blob properties without valid blobs

Instead of deleting all blob properties without a valid
blob check for the blob existing before using it. This is
necessary because some properties are needed even without
currently valid blobs.

BUG: 435786
parent ee181ef7
......@@ -52,9 +52,6 @@ bool DrmObject::initProps(const QVector<PropertyDefinition> &&vector, uint32_t o
drmModePropertyBlobRes *blob = nullptr;
if (prop->flags & DRM_MODE_PROP_BLOB) {
blob = drmModeGetPropertyBlob(m_gpu->fd(), properties->prop_values[i]);
if (!blob) {
break;
}
}
qCDebug(KWIN_DRM, "Found property %s with value %lu", def.name.data(), properties->prop_values[i]);
m_props[j] = new Property(prop.data(), properties->prop_values[i], def.enumNames, blob);
......
......@@ -50,15 +50,16 @@ bool DrmConnector::init()
}
// parse edid
if (auto edidProp = m_props[static_cast<uint32_t>(PropertyIndex::Edid)]) {
auto edidProp = m_props[static_cast<uint32_t>(PropertyIndex::Edid)];
if (edidProp && edidProp->blob() && edidProp->blob()->data) {
m_edid = Edid(edidProp->blob()->data, edidProp->blob()->length);
if (!m_edid.isValid()) {
qCWarning(KWIN_DRM, "Couldn't parse EDID for connector with id %d", id());
}
deleteProp(PropertyIndex::Edid);
} else {
qCDebug(KWIN_DRM) << "Could not find edid for connector" << this;
}
deleteProp(PropertyIndex::Edid);
// check the physical size
if (m_edid.physicalSize().isEmpty()) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment